re PR c/85094 (-g with any optimization suppresses -Wduplicated-branches)
authorJakub Jelinek <jakub@redhat.com>
Thu, 29 Mar 2018 10:37:58 +0000 (12:37 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 29 Mar 2018 10:37:58 +0000 (12:37 +0200)
commit063700a6d28128dcabfb1d54b5fea4e7408df56c
treec59d98270fe371507005e2bd264ca89f620eb47a
parent52df8bd93305f5ccd6a78eeebef9eb85c2208fed
re PR c/85094 (-g with any optimization suppresses -Wduplicated-branches)

PR c/85094
* fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
OEP_NO_HASH_CHECK for recursive call, to avoid exponential
checking.

* c-c++-common/Wduplicated-branches-14.c: New test.

From-SVN: r258950
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wduplicated-branches-14.c [new file with mode: 0644]