This is the mail archive of the gcc-patches@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]

Re: fix for strct-pack-1.c regressions


>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:

 >> This is the one in gcc.c-torture/execute?

Yes, strct-pack-1.c

typedef struct
{
  short s __attribute__ ((aligned(2), packed));
  double d __attribute__ ((aligned(2), packed));
} TRIAL;

s and d end up sharing different bits of the same memory and
having to do ANDs/ORs to get the values in correctly.

The scheduler moves things around and ends up putting the store before
a load of the same memory:

	z <= load from [x]
	twiddle z's bits
	z => store into [x]

the store is moved up before the load because we calculate wrong
dependence information.

 > Yes.  IIRC powerpc-eabi -mlittle showed the problem; Aldy
 > can confirm the proper configuration.

powerpc-eabialtivec
-mlittle -mstrict-align -O[2s]

cheers
aldy


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