diff options
author | Marek Polacek <polacek@redhat.com> | 2017-01-26 11:37:33 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2017-01-26 11:37:33 +0000 |
commit | 0a38b341a8c6e6ee8357ca78c3105b7082337611 (patch) | |
tree | 882bcee393cd010c57edabcd8c3e0e1059edea07 /gcc/fold-const.c | |
parent | 237499040f67c64bd509efe133f7463816bef933 (diff) | |
download | gcc-0a38b341a8c6e6ee8357ca78c3105b7082337611.zip gcc-0a38b341a8c6e6ee8357ca78c3105b7082337611.tar.gz gcc-0a38b341a8c6e6ee8357ca78c3105b7082337611.tar.bz2 |
re PR c/79199 (ICE with -Wduplicated-branches)
PR c/79199
* fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
for the third operand.
* c-c++-common/Wduplicated-branches-13.c: New test.
From-SVN: r244928
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 5576d59..a8bb8af 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3147,7 +3147,7 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) TREE_OPERAND (arg1, 0), flags)); case COND_EXPR: - if (! OP_SAME (1) || ! OP_SAME (2)) + if (! OP_SAME (1) || ! OP_SAME_WITH_NULL (2)) return 0; flags &= ~OEP_ADDRESS_OF; return OP_SAME (0); |