re PR c++/79652 (ICE on invalid c++ code in warn_extern_redeclared_static in cp/decl...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 25 May 2017 22:29:40 +0000 (22:29 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 25 May 2017 22:29:40 +0000 (22:29 +0000)
2017-05-25  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/79652
* g++.dg/cpp0x/pr79652.C: New.

From-SVN: r248474

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr79652.C [new file with mode: 0644]

index 2afca6a2c02a4a19d21cb95aa771334816773322..0adf5cb7b21e0d69942a1de14c48a79c1f9c138a 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/79652
+       * g++.dg/cpp0x/pr79652.C: New.
+
 2017-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/71451
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr79652.C b/gcc/testsuite/g++.dg/cpp0x/pr79652.C
new file mode 100644 (file)
index 0000000..7f86f5f
--- /dev/null
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++11 } }
+
+namespace {
+  struct S {
+    int n;
+  } T;
+  using T = decltype(S :: n);  // { dg-error "redeclared" }
+  namespace {
+    extern int x;
+    extern int x;
+  }
+}