diff options
author | Dodji Seketeli <dodji@redhat.com> | 2012-01-05 23:00:14 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2012-01-06 00:00:14 +0100 |
commit | 45a29025db259d111bcb5093ddda1ef4ef416a19 (patch) | |
tree | 2b51c15cf590457b8907aa8174ec15416d537865 /gcc/testsuite | |
parent | c3e686a350915a66b0761fa825fc162ef0010c3e (diff) | |
download | gcc-45a29025db259d111bcb5093ddda1ef4ef416a19.zip gcc-45a29025db259d111bcb5093ddda1ef4ef416a19.tar.gz gcc-45a29025db259d111bcb5093ddda1ef4ef416a19.tar.bz2 |
PR c++/51541 - ICE with invalid identifier in alias-declaration
gcc/cp/
PR c++/51541
* parser.c (cp_parser_alias_declaration): Get out early upon
errors in the identifier or the attributes.
gcc/testsuite/
PR c++/51541
* g++.dg/cpp0x/alias-decl-18.C: New test.
From-SVN: r182935
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5fdcd11..5980066 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-05 Dodji Seketeli <dodji@redhat.com> + + PR c++/51541 + * g++.dg/cpp0x/alias-decl-18.C: New test. + 2012-01-05 Eric Botcazou <ebotcazou@adacore.com> diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C new file mode 100644 index 0000000..ba65561 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C @@ -0,0 +1,9 @@ +// Origin: PR c++/51541 +// { dg-options -std=c++11 } + +template<typename Z> using ::T = void(int n); // { dg-error "" } +template<typename Z> using operator int = void(int n); // { dg-error "" } +template<typename Z> using typename U = void; // { dg-error "" } +template<typename Z> using typename ::V = void(int n); // { dg-error "" } +template<typename Z> using typename ::operator bool = void(int n); // { dg-error "" } +using foo __attribute__((aligned(4)) = int; // { dg-error "" } |