Commit c1bbfd3c by Dale Johannesen Committed by Dale Johannesen

Fix PR 17408 and PR 17409.

From-SVN: r87468
parent 3590f0a6
2004-09-13 Dale Johannesen <dalej@apple.com>
PR 17408
PR 17409
* c-decl.c (start_decl): Repair TREE_STATIC for initialized
objects declared extern.
2004-09-14 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_expand_prologue): Make args_to_push a
......
......@@ -3012,8 +3012,11 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs,
TEM may equal DECL or it may be a previous decl of the same name. */
tem = pushdecl (decl);
if (initialized)
DECL_EXTERNAL (tem) = 0;
if (initialized && DECL_EXTERNAL (tem))
{
DECL_EXTERNAL (tem) = 0;
TREE_STATIC (tem) = 1;
}
return tem;
}
......
2004-09-13 Dale Johannesen <dalej@apple.com>
* gcc.c-torture/compile/pr17408.c: New test case.
2004-09-13 Mark Mitchell <mark@codesourcery.com>
PR c++/16716
......
/* PRs 17408 and 17409, with different options. */
extern int t;
extern int t = 0;
void f(){t =0;}
void g(){h(&t);}
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