Commit 93e544c1 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/85140 (ICE with invalid use of alignas)

	PR c++/85140
	* name-lookup.c (handle_namespace_attrs): Return early if attributes
	is error_mark_node.

	* g++.dg/cpp0x/gen-attrs-64.C: New test.

From-SVN: r259039
parent b0493acb
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR c++/85140
* name-lookup.c (handle_namespace_attrs): Return early if attributes
is error_mark_node.
PR c++/85134
* decl.c (cp_finish_decl): If ensure_literal_type_for_constexpr_object
fails, after clearing DECL_DECLARED_CONSTEXPR_P don't return early,
......
......@@ -5044,6 +5044,9 @@ handle_namespace_attrs (tree ns, tree attributes)
tree d;
bool saw_vis = false;
if (attributes == error_mark_node)
return false;
for (d = attributes; d; d = TREE_CHAIN (d))
{
tree name = get_attribute_name (d);
......
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR c++/85140
* g++.dg/cpp0x/gen-attrs-64.C: New test.
PR c++/85134
* g++.dg/gomp/pr85134.C: New test.
* g++.dg/cpp0x/constexpr-ice19.C: Expect one further error.
......
// PR c++/85140
// { dg-do compile { target c++11 } }
namespace N alignas() {} // { dg-error "expected" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment