summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/struct-parse-1.c
diff options
context:
space:
mode:
authorcarlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-20 00:21:51 +0000
committercarlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-20 00:21:51 +0000
commitf6cf83a8650cd8be625333ccc98792f0640b8b35 (patch)
tree2915a6e02f9f6c44b4b02c47404a627e46d27ab4 /gcc/testsuite/gcc.dg/struct-parse-1.c
parent4d6470ab2b9edf806bce900c16fa30432143cadf (diff)
downloadgcc-f6cf83a8650cd8be625333ccc98792f0640b8b35.tar.gz
gcc/
2006-04-19 Carlos O'Donell <carlos@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> PR c/26774 * stor-layout.c (update_alignment_for_field): Do not align ERROR_MARK nodes. (place_union_field): Place union field at the start of the union. (place_field): Move ERROR_MARK check later, and use the current allocation position to maintain monotonicity. gcc/testsuite/ 2006-04-19 Carlos O'Donell <carlos@codesourcery.com> PR c/26774 * gcc.dg/struct-parse-1.c: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113107 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/struct-parse-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/struct-parse-1.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/struct-parse-1.c b/gcc/testsuite/gcc.dg/struct-parse-1.c
new file mode 100644
index 00000000000..32c115797fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/struct-parse-1.c
@@ -0,0 +1,11 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc. */
+/* Contributed by Carlos O'Donell on 2006-03-31 */
+
+/* This code caused the C frontend to loop
+ forever exhausting all system memory, or ICE */
+/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
+
+/* { dg-options "-std=c99" } */
+struct s { int a; int b; struct t c; }; /* { dg-error "error: field 'c' has incomplete type" } */
+struct s d = { .b = 0 };
+