This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
testcase for incomplete structure element
- From: Geoffrey Keating <geoffk at redhat dot com>
- To: gcc-patches at Gcc dot gnu dot org
- Date: Thu, 22 Aug 2002 13:05:13 -0700
- Subject: testcase for incomplete structure element
GCC reports the error, but if -O -g is in use, it then crashes.
--
Geoff Keating <geoffk@redhat.com>
===File ~/patches/test-incompletestructel.patch=============
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.2037
diff -p -u -p -r1.2037 ChangeLog
--- ChangeLog 20 Aug 2002 01:27:39 -0000 1.2037
+++ ChangeLog 22 Aug 2002 20:03:52 -0000
@@ -1,3 +1,7 @@
+2002-08-22 Geoffrey Keating <geoffk@redhat.com>
+
+ * gcc.dg/noncompile/incomplete-1.c: New test.
+
2002-08-19 Ziemowit Laski <zlaski@apple.com>
* objc.dg/bitfield-1.m: New test.
Index: gcc.dg/noncompile/incomplete-1.c
===================================================================
RCS file: gcc.dg/noncompile/incomplete-1.c
diff -N gcc.dg/noncompile/incomplete-1.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc.dg/noncompile/incomplete-1.c 22 Aug 2002 20:03:52 -0000
@@ -0,0 +1,4 @@
+struct a
+{
+ struct b t; /* { dg-error "has incomplete type" } */
+};
============================================================