diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2014-04-11 17:36:44 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2014-04-11 17:36:44 +0000 |
commit | 1b255e8f36ac3f4d8e3fc2cc67cc757ee5682e3b (patch) | |
tree | 11a75afb17e34aae15d446983e23b20c95316e7f | |
parent | 4561285bf4a239e6ae6cb03245baff788cea025a (diff) | |
download | gcc-1b255e8f36ac3f4d8e3fc2cc67cc757ee5682e3b.zip gcc-1b255e8f36ac3f4d8e3fc2cc67cc757ee5682e3b.tar.gz gcc-1b255e8f36ac3f4d8e3fc2cc67cc757ee5682e3b.tar.bz2 |
re PR c++/58600 ([c++11] ICE on wrong usage of alignas)
/cp
2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58600
* name-lookup.c (parse_using_directive): Return early if the
attribs argument is error_mark_node; use get_attribute_name.
/testsuite
2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58600
* g++.dg/cpp0x/gen-attrs-58.C: New.
* g++.dg/cpp0x/gen-attrs-59.C: Likewise.
From-SVN: r209310
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/gen-attrs-58.C | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/gen-attrs-59.C | 5 |
5 files changed, 27 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 77473fe..f722da3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2014-04-11 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58600 + * name-lookup.c (parse_using_directive): Return early if the + attribs argument is error_mark_node; use get_attribute_name. + 2014-04-11 Jason Merrill <jason@redhat.com> DR 1030 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 0137c3f..8ad0d06 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4019,13 +4019,14 @@ do_using_directive (tree name_space) void parse_using_directive (tree name_space, tree attribs) { - tree a; - do_using_directive (name_space); - for (a = attribs; a; a = TREE_CHAIN (a)) + if (attribs == error_mark_node) + return; + + for (tree a = attribs; a; a = TREE_CHAIN (a)) { - tree name = TREE_PURPOSE (a); + tree name = get_attribute_name (a); if (is_attribute_p ("strong", name)) { if (!toplevel_bindings_p ()) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0675d46..fdacc9c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-04-11 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58600 + * g++.dg/cpp0x/gen-attrs-58.C: New. + * g++.dg/cpp0x/gen-attrs-59.C: Likewise. + 2014-04-11 Steve Ellcey <sellcey@mips.com> Jakub Jelinek <jakub@redhat.com> diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-58.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-58.C new file mode 100644 index 0000000..f760f56 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-58.C @@ -0,0 +1,5 @@ +// PR c++/58600 +// { dg-do compile { target c++11 } } + +namespace N { int i; } +using namespace N alignas(int); // { dg-warning "ignored" } diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-59.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-59.C new file mode 100644 index 0000000..c7839fe --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-59.C @@ -0,0 +1,5 @@ +// PR c++/58600 +// { dg-do compile { target c++11 } } + +namespace N {} +using namespace N alignas(X); // { dg-error "declared" } |