PR c++/83553
commit779086e2639fcd008894d209fe305abf68164f18
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 23 Dec 2017 08:40:19 +0000 (23 08:40 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 23 Dec 2017 08:40:19 +0000 (23 08:40 +0000)
tree25950ee9e5606ae3ad5f16ee90324afb8f864ac5
parentde10a5f601162527d4784fceb1413c274853dae4
PR c++/83553
* fold-const.c (struct contains_label_data): New type.
(contains_label_1): Return non-NULL even for CASE_LABEL_EXPR, unless
inside of a SWITCH_BODY seen during the walk.
(contains_label_p): Use walk_tree instead of
walk_tree_without_duplicates, prepare data for contains_label_1 and
provide own pset.

* c-c++-common/torture/pr83553.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255987 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/torture/pr83553.c [new file with mode: 0644]