aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@gcc.gnu.org>2003-10-04 16:53:19 +0000
committerFariborz Jahanian <fjahanian@gcc.gnu.org>2003-10-04 16:53:19 +0000
commite9ff9b17a7c2b5dc5d3dd383dbe191c2354cd859 (patch)
treeae3a615bcb36cfd70fdf2971aa0bbdb8d628c2e8 /gcc
parentb68a40b2805a9bc17fa85a661561f743c51fb679 (diff)
downloadgcc-e9ff9b17a7c2b5dc5d3dd383dbe191c2354cd859.zip
gcc-e9ff9b17a7c2b5dc5d3dd383dbe191c2354cd859.tar.gz
gcc-e9ff9b17a7c2b5dc5d3dd383dbe191c2354cd859.tar.bz2
Test for testing a global followed by extern declaration.
From-SVN: r72095
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/decl-global-ext.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/decl-global-ext.c b/gcc/testsuite/gcc.dg/decl-global-ext.c
new file mode 100644
index 0000000..97ffa7c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/decl-global-ext.c
@@ -0,0 +1,13 @@
+int merror = 0;
+extern int merror;
+
+void mtherr (int code)
+{
+ merror = code + 1;
+}
+
+int main()
+{
+ mtherr(7);
+ return 0;
+}