summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/zero-strct-4.c
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-17 01:55:05 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-17 01:55:05 +0000
commit37c33a593b56d5a4136cf4fc9be4a46b803986df (patch)
treed00c8bb96337b5b35ec229a136bbb9fbfed3ba57 /gcc/testsuite/gcc.c-torture/compile/zero-strct-4.c
parent2edea10bab166259529c6a1abf0e98009938a982 (diff)
downloadgcc-37c33a593b56d5a4136cf4fc9be4a46b803986df.tar.gz
2005-08-16 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/23402 * gcc.c-torture/compile/zero-strct-3.c: New test. * gcc.c-torture/compile/zero-strct-4.c: New test. 2005-08-16 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/23402 * gimplify.c (zero_sized_type): New function. (gimplify_modify_expr_rhs): If we have a zero sized type, replace the statement with an empty statement. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103191 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/zero-strct-4.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/zero-strct-4.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/zero-strct-4.c b/gcc/testsuite/gcc.c-torture/compile/zero-strct-4.c
new file mode 100644
index 00000000000..4a5889f80f3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/zero-strct-4.c
@@ -0,0 +1,14 @@
+typedef struct {} raw_spinlock_t;
+typedef struct {
+ raw_spinlock_t raw_lock;
+} spinlock_t;
+struct sk_buff_head {
+ int i;
+ spinlock_t lock;
+};
+struct sk_buff_head audit_skb_queue;
+void audit_init(void)
+{
+ struct sk_buff_head *list = &audit_skb_queue;
+ audit_skb_queue.lock = (spinlock_t) { .raw_lock = { } };
+}