diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-01-01 12:55:59 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-01-01 12:55:59 +0100 |
commit | 942a13194f3efa752dbb1d9b8fbe6ceb9d104e13 (patch) | |
tree | 6bbd05fe88d18b607a5a7d9e9d474829afc13197 /gcc/tree-ssa-math-opts.c | |
parent | 10dff63f98807e6b7f65c9c3b9f69623f8f619b3 (diff) | |
download | gcc-942a13194f3efa752dbb1d9b8fbe6ceb9d104e13.zip gcc-942a13194f3efa752dbb1d9b8fbe6ceb9d104e13.tar.gz gcc-942a13194f3efa752dbb1d9b8fbe6ceb9d104e13.tar.bz2 |
re PR tree-optimization/69070 (ICE: tree check: expected real_cst, have ssa_name in gimple_expand_builtin_pow, at tree-ssa-math-opts.c:1541 with -fsignaling-nans and powl())
PR tree-optimization/69070
* tree-ssa-math-opts.c (gimple_expand_builtin_pow): Only test
REAL_VALUE_ISSIGNALING_NAN on arg0 if arg0 is a REAL_CST.
* gcc.dg/pr69070.c: New test.
From-SVN: r232025
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r-- | gcc/tree-ssa-math-opts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index 244cf19..5cb8ba2 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -1538,7 +1538,8 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc, /* Don't perform the operation if flag_signaling_nans is on and the operand is a signaling NaN. */ if (HONOR_SNANS (TYPE_MODE (TREE_TYPE (arg1))) - && (REAL_VALUE_ISSIGNALING_NAN (TREE_REAL_CST (arg0)) + && ((TREE_CODE (arg0) == REAL_CST + && REAL_VALUE_ISSIGNALING_NAN (TREE_REAL_CST (arg0))) || REAL_VALUE_ISSIGNALING_NAN (TREE_REAL_CST (arg1)))) return NULL_TREE; |