Commit 355b1741 by Eric Botcazou Committed by Eric Botcazou

re PR middle-end/42898 (volatile structures and compound literal initializers)

	PR middle-end/42898
	* gcc.dg/torture/pr42898-2.c: New test.

From-SVN: r156414
parent 44f89620
2010-01-31 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/42898
* gcc.dg/torture/pr42898-2.c: New test.
2010-01-31 Richard Guenther <rguenther@suse.de>
PR middle-end/42898
......
/* { dg-do compile } */
/* { dg-options "-fdump-tree-optimized" } */
struct hardware {
int parm1:8;
int :4;
int parm2:4;
int parm3:15;
int parm4:1;
};
const struct hardware h = {
.parm1=42,
.parm2=13,
.parm3=11850,
.parm4=1,
};
void f1(volatile struct hardware *ptr)
{
*ptr = h;
}
/* { dg-final { scan-tree-dump-times "\\*ptr" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment