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 2afca6a2c02..0adf5cb7b21 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-05-25 Paolo Carlini + + PR c++/79652 + * g++.dg/cpp0x/pr79652.C: New. + 2017-05-25 Paolo Carlini 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 index 00000000000..7f86f5ff629 --- /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.30.2