Commit 4f543d15 by Volker Reichelt Committed by Volker Reichelt

re PR c++/28343 (ICE with invalid asm specifier for struct member)

	PR c++/28343
	* decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
	* decl2.c (grokfield): Likewise.

	* g++.dg/ext/asmspec1.C: New test.

From-SVN: r115436
parent a7929aa4
2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28343
* decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
* decl2.c (grokfield): Likewise.
2006-07-12 Geoffrey Keating <geoffk@apple.com>
* decl2.c (determine_visibility): Don't change visibility of
......
......@@ -5056,7 +5056,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
/* If a name was specified, get the string. */
if (global_scope_p (current_binding_level))
asmspec_tree = maybe_apply_renaming_pragma (decl, asmspec_tree);
if (asmspec_tree)
if (asmspec_tree && asmspec_tree != error_mark_node)
asmspec = TREE_STRING_POINTER (asmspec_tree);
if (current_class_type
......
......@@ -837,7 +837,7 @@ grokfield (const cp_declarator *declarator,
return void_type_node;
}
if (asmspec_tree)
if (asmspec_tree && asmspec_tree != error_mark_node)
asmspec = TREE_STRING_POINTER (asmspec_tree);
if (init)
......
2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28343
* g++.dg/ext/asmspec1.C: New test.
2006-07-13 Janis Johnson <janis187@us.ibm.com>
* lib/gcc-dg.exp (tool_load): Wrapper to support shouldfail tests.
// PR c++/28343
// { dg-do compile }
struct A
{
int i __asm__(int); // { dg-error "before" }
static int j __asm__(int); // { dg-error "before" }
};
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