From 19eab74014d78f800c2cef9aabb7ce3d8a0e8b4e Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 28 Jan 2018 01:28:05 +0000 Subject: [PATCH] re PR c++/83924 (ICE: Error reporting routines re-entered with -Wduplicated-branches) 2018-01-27 Paolo Carlini PR c++/83924 * g++.dg/warn/Wduplicated-branches5.C: New. From-SVN: r257131 --- gcc/testsuite/ChangeLog | 5 +++++ .../g++.dg/warn/Wduplicated-branches5.C | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/warn/Wduplicated-branches5.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 42ba2fd857b..9470667df30 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-01-27 Paolo Carlini + + PR c++/83924 + * g++.dg/warn/Wduplicated-branches5.C: New. + 2018-01-26 Segher Boessenkool * gcc.target/powerpc/safe-indirect-jump-1.c: Build on all targets. diff --git a/gcc/testsuite/g++.dg/warn/Wduplicated-branches5.C b/gcc/testsuite/g++.dg/warn/Wduplicated-branches5.C new file mode 100644 index 00000000000..d23a3e7ed32 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wduplicated-branches5.C @@ -0,0 +1,16 @@ +// PR c++/83924 +// { dg-do compile { target c++11 } } +// { dg-options "-Wduplicated-branches" } + +class GenVectorS {}; + +template +using VectorS = GenVectorS; + +template +void runB(const VectorS<(n > m ? n : m)>) +{} + +void runA() { + runB<1, 1>(VectorS<1>{}); +} -- 2.30.2