summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.old-deja/g++.other/scope1.C
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-28 01:16:08 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-28 01:16:08 +0000
commit6f0e4ddaf64669adb08779cbd6cbf0471d6cda08 (patch)
treee2496e43b37d7c4c672ec630c8be922f91b318bb /gcc/testsuite/g++.old-deja/g++.other/scope1.C
parent788747a77cf625670169cd7846669ede9cd1d8a2 (diff)
downloadppe42-gcc-6f0e4ddaf64669adb08779cbd6cbf0471d6cda08.tar.gz
ppe42-gcc-6f0e4ddaf64669adb08779cbd6cbf0471d6cda08.zip
* decl.c (pushdecl): Matching decls for local externs are found in
the current level. Propagate linkage information from previous declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36011 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/scope1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/scope1.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/scope1.C b/gcc/testsuite/g++.old-deja/g++.other/scope1.C
new file mode 100644
index 00000000000..8b6354cc63f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/scope1.C
@@ -0,0 +1,12 @@
+// Testcase for proper scoping of local externs.
+
+int x = 1;
+
+int main()
+{
+ int x = 2;
+ {
+ extern int x;
+ return (x != 1);
+ }
+}
OpenPOWER on IntegriCloud