openmp: Avoid floating point comparison at the end of bb with -fnon-call-exceptions
authorJakub Jelinek <jakub@redhat.com>
Sat, 8 Aug 2020 09:07:09 +0000 (11:07 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sat, 8 Aug 2020 09:07:09 +0000 (11:07 +0200)
commit87d6dae308d604bad111b1c0bfea7835888eed8d
treef8720bf06846b88db70af1b92ce017cf640a5fd9
parent10c8507372f3e1c09df0bfe6449c126dee5075de
openmp: Avoid floating point comparison at the end of bb with -fnon-call-exceptions

The following testcase ICEs with -fexceptions -fnon-call-exceptions because
in that mode floating point comparisons should not be done at the end of bb
in GIMPLE_COND.  Fixed by forcing it into a bool SSA_NAME and comparing that against
false.

2020-08-08  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/96424
* omp-expand.c: Include tree-eh.h.
(expand_omp_for_init_vars): Handle -fexceptions -fnon-call-exceptions
by forcing floating point comparison into a bool temporary.

* c-c++-common/gomp/pr96424.c: New test.
gcc/omp-expand.c
gcc/testsuite/c-c++-common/gomp/pr96424.c [new file with mode: 0644]