refers to a visible entity with internal linkage, use the old DECL
rather than the new one.
testsuite:
* gcc.c-torture/compile/
20041005-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88570
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-10-05 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * c-decl.c (pushdecl): When an extern declaration at block scope
+ refers to a visible entity with internal linkage, use the old DECL
+ rather than the new one.
+
2004-10-05 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (cleanup_tree_cfg): Remove extra parentheses in
2004-10-05 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (cleanup_tree_cfg): Remove extra parentheses in
just need to fall through to make the declaration in
this scope. */
nested = true;
just need to fall through to make the declaration in
this scope. */
nested = true;
+2004-10-05 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * gcc.c-torture/compile/20041005-1.c: New test.
+
2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/17829
2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/17829
--- /dev/null
+/* This wrongly caused duplicate definitions of x in the assembler
+ output. */
+/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
+
+static int x = 1;
+void f (void) { extern int x; }