OSDN Git Service

* c-decl.c (pushdecl): When an extern declaration at block scope
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / compile / 20041005-1.c
diff --git a/gcc/testsuite/gcc.c-torture/compile/20041005-1.c b/gcc/testsuite/gcc.c-torture/compile/20041005-1.c
new file mode 100644 (file)
index 0000000..b0a6511
--- /dev/null
@@ -0,0 +1,6 @@
+/* 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; }