re PR middle-end/79396 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O2 -march=haswell)
PR middle-end/79396 * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle FMA_EXPR like tcc_binary or tcc_unary. * g++.dg/opt/pr79396.C: New test. From-SVN: r245735
This commit is contained in:
parent
9d975cb6a6
commit
98561a9b58
4 changed files with 26 additions and 2 deletions
|
@ -1,5 +1,9 @@
|
|||
2017-02-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/79396
|
||||
* tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
|
||||
FMA_EXPR like tcc_binary or tcc_unary.
|
||||
|
||||
* tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
|
||||
|
||||
PR debug/77589
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2017-02-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/79396
|
||||
* g++.dg/opt/pr79396.C: New test.
|
||||
|
||||
2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
|
||||
|
||||
PR fortran/79597
|
||||
|
|
13
gcc/testsuite/g++.dg/opt/pr79396.C
Normal file
13
gcc/testsuite/g++.dg/opt/pr79396.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// PR middle-end/79396
|
||||
// { dg-do compile }
|
||||
// { dg-options "-fnon-call-exceptions -O2" }
|
||||
// { dg-additional-options "-mfma" { target i?86-*-* x86_64-*-* } }
|
||||
|
||||
struct A { A (); ~A (); };
|
||||
|
||||
float
|
||||
foo (float x)
|
||||
{
|
||||
A a;
|
||||
return __builtin_pow (x, 2) + 2;
|
||||
}
|
|
@ -2513,7 +2513,8 @@ operation_could_trap_p (enum tree_code op, bool fp_operation, bool honor_trapv,
|
|||
|
||||
if (TREE_CODE_CLASS (op) != tcc_comparison
|
||||
&& TREE_CODE_CLASS (op) != tcc_unary
|
||||
&& TREE_CODE_CLASS (op) != tcc_binary)
|
||||
&& TREE_CODE_CLASS (op) != tcc_binary
|
||||
&& op != FMA_EXPR)
|
||||
return false;
|
||||
|
||||
return operation_could_trap_helper_p (op, fp_operation, honor_trapv,
|
||||
|
@ -2738,7 +2739,8 @@ stmt_could_throw_1_p (gimple *stmt)
|
|||
|
||||
if (TREE_CODE_CLASS (code) == tcc_comparison
|
||||
|| TREE_CODE_CLASS (code) == tcc_unary
|
||||
|| TREE_CODE_CLASS (code) == tcc_binary)
|
||||
|| TREE_CODE_CLASS (code) == tcc_binary
|
||||
|| code == FMA_EXPR)
|
||||
{
|
||||
if (is_gimple_assign (stmt)
|
||||
&& TREE_CODE_CLASS (code) == tcc_comparison)
|
||||
|
|
Loading…
Add table
Reference in a new issue