re PR c++/83924 (ICE: Error reporting routines re-entered with -Wduplicated-branches)
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 28 Jan 2018 01:28:05 +0000 (01:28 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 28 Jan 2018 01:28:05 +0000 (01:28 +0000)
2018-01-27  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83924
* g++.dg/warn/Wduplicated-branches5.C: New.

From-SVN: r257131

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wduplicated-branches5.C [new file with mode: 0644]

index 42ba2fd857b1c6a5951a97d65b60df1b995d8a55..9470667df305d6be858aad337702c6dbd5e0ac30 100644 (file)
@@ -1,3 +1,8 @@
+2018-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/83924
+       * g++.dg/warn/Wduplicated-branches5.C: New.
+
 2018-01-26  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * 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 (file)
index 0000000..d23a3e7
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/83924
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wduplicated-branches" }
+
+class GenVectorS {};
+
+template<int N>
+using  VectorS = GenVectorS;
+
+template<int n, int m>
+void runB(const VectorS<(n > m ? n : m)>)
+{}
+
+void runA() {
+       runB<1, 1>(VectorS<1>{});
+}