diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-23 09:34:28 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-23 09:34:28 +0000 |
commit | d4cf8ff76d20953c1113f02bddfc22b61d7dd195 (patch) | |
tree | b61cf5aa1683abc17ffef926b5895ba08f2bb920 /gcc/testsuite/gcc.dg/pr28755.c | |
parent | 5630bb44873071d2482705164bdfadf1ba7d5a4d (diff) | |
download | gcc-d4cf8ff76d20953c1113f02bddfc22b61d7dd195.tar.gz |
PR middle-end/28755
* expr.c (expand_constructor): New function.
(expand_expr_real_1) <case CONSTRUCTOR>: Call it.
(expand_expr_real_1) <case ARRAY_REF>: Call it if VALUE is
CONSTRUCTOR.
* gcc.dg/pr28755.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128685 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr28755.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr28755.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr28755.c b/gcc/testsuite/gcc.dg/pr28755.c new file mode 100644 index 00000000000..9a01f88d0d9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr28755.c @@ -0,0 +1,22 @@ +/* PR middle-end/28755 */ +/* { dg-do compile } */ +/* { dg-options "-Os" } */ +/* { dg-final { scan-assembler-times "2112543726\|7deadbee" 2 } } */ + +struct S +{ + void *s1; + unsigned s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14; +}; + +const struct S array[] = { + { (void *) 0, 60, 640, 2112543726, 39682, 48, 16, 33, 10, 96, 2, 0, 0, 4 }, + { (void *) 0, 60, 2112543726, 192, 18251, 16, 33, 10, 96, 2, 0, 0, 4, 212 } +}; + +void +foo (struct S *x) +{ + x[0] = array[0]; + x[5] = array[1]; +} |