------- Comment #2 from rguenth at gcc dot gnu dot org  2010-01-29 22:41 -------
Yep:

f2 ()
{
  volatile struct hardware * ptr;
  struct hardware set;

  ptr = 287454020B;
  set = {};
  set.parm1 = 42;
  set.parm2 = -3;
  set.parm3 = 11850;
  set.parm4 = -1;
  *ptr = set;
}

f1 ()
{
  volatile struct hardware * ptr;

  ptr = 287454020B;
  *ptr = {};
  ptr->parm1 = 42;
  ptr->parm2 = -3;
  ptr->parm3 = 11850;
  ptr->parm4 = -1;
}

we need to gimplify f1 exactly the same as f2, using a temporary.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end
            Summary|[4.3/4.4/4.5 Regression]    |[4.3/4.4/4.5 Regression]
                   |volatile structures and     |volatile structures and
                   |compound literals           |compound literal
                   |                            |initializers


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42898

Reply via email to