diff options
author | David Malcolm <dmalcolm@redhat.com> | 2020-01-16 09:46:30 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-01-17 16:41:34 -0500 |
commit | 07c86323a199ca15177d99ad6c488b8f5fb5c729 (patch) | |
tree | e9da8dfdc507949b6c74aa2df72774704eca663c /libgfortran/io/unit.c | |
parent | 82033483fd74b1dcedab416d98673e212258498d (diff) | |
download | gcc-07c86323a199ca15177d99ad6c488b8f5fb5c729.zip gcc-07c86323a199ca15177d99ad6c488b8f5fb5c729.tar.gz gcc-07c86323a199ca15177d99ad6c488b8f5fb5c729.tar.bz2 |
analyzer: prevent ICE on isnan (PR 93290)
PR analyzer/93290 reports an ICE on calls to isnan().
The root cause is that an UNORDERED_EXPR is passed
to region_model::eval_condition_without_cm, and there's
a stray gcc_unreachable () in the case where we're comparing
an svalue against itself.
I attempted a more involved patch that properly handled NaN in general
but it seems I've baked the assumption of reflexivity too deeply into
the constraint_manager code.
For now, this patch avoids the ICE and documents the limitation.
gcc/analyzer/ChangeLog:
PR analyzer/93290
* region-model.cc (region_model::eval_condition_without_cm): Avoid
gcc_unreachable for unexpected operations for the case where
we're comparing an svalue against itself.
gcc/ChangeLog
* doc/analyzer.texi (Limitations): Add note about NaN.
gcc/testsuite/ChangeLog:
PR analyzer/93290
* gcc.dg/analyzer/pr93290.c: New test.
Diffstat (limited to 'libgfortran/io/unit.c')
0 files changed, 0 insertions, 0 deletions