This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/18287] Unaligned access to fields inside packed records


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-03 18:02 -------
Are you sure that 4.0.0 does not work, as it no longer does the transformation for &(a->b) into a + 
offsetof(a,b).
>From the last tree dump for 4.0.0:
;; Function Assign_Hour_Of (Assign_Hour_Of)

Assign_Hour_Of (t)
{
<bb 0>:
  t->Hour = 44;
  return;

}



;; Function Clobber_Hour_Of (Clobber_Hour_Of)

Clobber_Hour_Of (dt)
{
  struct Time_T * D.1128;

<bb 0>:
  D.1128 = &dt->Time;
  Assign_Hour_Of (D.1128);
  return;

}



;; Function main (main)

main ()
{
  struct Date_And_Time_T dt;
  int D.1135;

<bb 0>:
  dt.Time.Hour = 22;
  Clobber_Hour_Of (&dt);
  D.1135 = 0;
  return D.1135;

}


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]