diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-12 11:12:39 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-12 11:12:39 +0000 |
commit | 82972775f53524f04053da5a13027a7649437d2f (patch) | |
tree | 152c25d48afd460f70909cee7507677f1f8c0bfa /gcc/testsuite/gcc.dg/tree-ssa/pr32901.c | |
parent | 29847ec4952258319a397b4a567dc31f942aac5c (diff) | |
download | gcc-82972775f53524f04053da5a13027a7649437d2f.tar.gz |
* gimplify.c (gimplify_modify_expr_rhs): Handle the case when we
are assigning from a constant constructor.
Fix wrapping in function comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130788 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/pr32901.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr32901.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr32901.c b/gcc/testsuite/gcc.dg/tree-ssa/pr32901.c new file mode 100644 index 00000000000..9102a88556d --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr32901.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-gimple" } */ + +struct foo { + unsigned a1: 1; + unsigned a2: 3; + unsigned : 4; +}; + +extern struct foo thefoo; + +void setup_foo(void) +{ + const struct foo init = { + .a1 = 1, + .a2 = 5, + }; + thefoo = init; +} + +/* { dg-final { scan-tree-dump-times "thefoo.0 = \{\}" 1 "gimple"} } */ +/* { dg-final { scan-tree-dump-times "thefoo.0.a1 = 1" 1 "gimple"} } */ +/* { dg-final { scan-tree-dump-times "thefoo.0.a2 = 5" 1 "gimple"} } */ +/* { dg-final { cleanup-tree-dump "gimple" } } */ |