===================================================================
@@ -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 ())
===================================================================
@@ -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" }
===================================================================
@@ -0,0 +1,5 @@
+// PR c++/58600
+// { dg-do compile { target c++11 } }
+
+namespace N {}
+using namespace N alignas(X); // { dg-error "declared" }