diff options
author | Marek Polacek <polacek@redhat.com> | 2017-03-09 09:53:03 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2017-03-09 09:53:03 +0000 |
commit | 410a590c2a718861487e2fc354da02c1394bbcb1 (patch) | |
tree | 393d20fe3d284a100d6bf59d7c0938881e9e3534 /gcc/tree.c | |
parent | f084a22e98e995d405569046bde9bb009017d4a1 (diff) | |
download | gcc-410a590c2a718861487e2fc354da02c1394bbcb1.zip gcc-410a590c2a718861487e2fc354da02c1394bbcb1.tar.gz gcc-410a590c2a718861487e2fc354da02c1394bbcb1.tar.bz2 |
re PR c++/79672 (ICE with -Wduplicated-branches -fopenmp)
PR c++/79672
* tree.c (inchash::add_expr): Handle TREE_VEC.
* g++.dg/warn/Wduplicated-branches2.C: Fix PR.
* g++.dg/warn/Wduplicated-branches3.C: New test.
From-SVN: r245996
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -7865,6 +7865,10 @@ add_expr (const_tree t, inchash::hash &hstate, unsigned int flags) inchash::add_expr (tsi_stmt (i), hstate, flags); return; } + case TREE_VEC: + for (int i = 0; i < TREE_VEC_LENGTH (t); ++i) + inchash::add_expr (TREE_VEC_ELT (t, i), hstate, flags); + return; case FUNCTION_DECL: /* When referring to a built-in FUNCTION_DECL, use the __builtin__ form. Otherwise nodes that compare equal according to operand_equal_p might |