aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/sizeof-1.c
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2006-05-30 13:33:17 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2006-05-30 13:33:17 +0000
commit16464cc1bba0fd0befabcb90bad7d28b3e229c93 (patch)
treee7c9695a52b0a71525c8ba2bc639cee7578958bc /gcc/testsuite/gcc.dg/sizeof-1.c
parentd91d2db759502aceabdc93e0fb0f5c02370953aa (diff)
downloadgcc-16464cc1bba0fd0befabcb90bad7d28b3e229c93.zip
gcc-16464cc1bba0fd0befabcb90bad7d28b3e229c93.tar.gz
gcc-16464cc1bba0fd0befabcb90bad7d28b3e229c93.tar.bz2
re PR c/27718 (ICE with sizeof of incomplete type)
PR c/27718 * c-typeck.c (c_expr_sizeof_type): Handle invalid types. * gcc.dg/sizeof-1.c: New test. From-SVN: r114234
Diffstat (limited to 'gcc/testsuite/gcc.dg/sizeof-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/sizeof-1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/sizeof-1.c b/gcc/testsuite/gcc.dg/sizeof-1.c
new file mode 100644
index 0000000..9541a4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sizeof-1.c
@@ -0,0 +1,4 @@
+/* PR c/27718 */
+/* { dg-do compile } */
+
+int i = sizeof(struct A[]); /* { dg-error "incomplete" } */