From c81ec254f9e295168f1666f4d7d6fd4ba0e89c58 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 25 May 2017 22:29:40 +0000 Subject: [PATCH] re PR c++/79652 (ICE on invalid c++ code in warn_extern_redeclared_static in cp/decl.c:1231) 2017-05-25 Paolo Carlini PR c++/79652 * g++.dg/cpp0x/pr79652.C: New. From-SVN: r248474 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/pr79652.C | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr79652.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2afca6a..0adf5cb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2017-05-25 Paolo Carlini + PR c++/79652 + * g++.dg/cpp0x/pr79652.C: New. + +2017-05-25 Paolo Carlini + PR c++/71451 * g++.dg/cpp0x/variadic170.C: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr79652.C b/gcc/testsuite/g++.dg/cpp0x/pr79652.C new file mode 100644 index 0000000..7f86f5f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr79652.C @@ -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; + } +} -- 2.7.4