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
This commit is contained in:
parent
a7929aa4bd
commit
4f543d151e
|
@ -1,3 +1,9 @@
|
|||
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)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// PR c++/28343
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
int i __asm__(int); // { dg-error "before" }
|
||||
static int j __asm__(int); // { dg-error "before" }
|
||||
};
|
Loading…
Reference in New Issue