summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/noncompile/20020130-1.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-31 01:01:02 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-31 01:01:02 +0000
commitb36e470aa729054c24a90e54cf766f83bfdb91cf (patch)
tree88534a3810db907c206b3f773ecae87f4368c065 /gcc/testsuite/gcc.dg/noncompile/20020130-1.c
parent1c9e59f7dbfceb80cbe09f8c882105b35c529955 (diff)
downloadppe42-gcc-b36e470aa729054c24a90e54cf766f83bfdb91cf.tar.gz
ppe42-gcc-b36e470aa729054c24a90e54cf766f83bfdb91cf.zip
* c-decl.c (grokdeclarator): Handle type being a typedef for an
invalid type. testsuite: * gcc.dg/noncompile/20020130-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49352 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/noncompile/20020130-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/20020130-1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/noncompile/20020130-1.c b/gcc/testsuite/gcc.dg/noncompile/20020130-1.c
new file mode 100644
index 00000000000..d820e062e71
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/20020130-1.c
@@ -0,0 +1,9 @@
+/* Test for ICE when using typedef for bad type. */
+/* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
+
+void
+foo (void)
+{
+ typedef int t[x]; /* { dg-error "undeclared|function" "x undeclared" } */
+ t bar;
+}
OpenPOWER on IntegriCloud