Re: PR 19893 array_ref bug

2005-03-16 Thread Dorit Naishlos
Steve Ellcey wrote: Most of the gcc.dg/vect/* tests contain something like: typedef float afloat __attribute__ ((__aligned__(16))); afloat a[N]; It looks like what is really intended here is to apply the alignment to the array type. The point is that the entire array has to

Re: PR 19893 array_ref bug

2005-03-16 Thread Gabriel Dos Reis
Mark Mitchell [EMAIL PROTECTED] writes: | Joe Buck wrote: | On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: | | The simplest solution would probably be to ignore __aligned__ attributes | completely when we have an array. Or to do the change you suggested for | the vector tests

Re: PR 19893 array_ref bug

2005-03-16 Thread Gabriel Dos Reis
Mark Mitchell [EMAIL PROTECTED] writes: | Steve Ellcey wrote: | What do people think about this idea for changing the vect tests using | gcc.dg/vect/vect-56.c as an example. The arguments (pa, pb, pc) would | remain afloat type (vs. float) but the arrays would be changed from | 'array of

Re: PR 19893 array_ref bug

2005-03-16 Thread Steve Ellcey
From: Gabriel Dos Reis [EMAIL PROTECTED] | | Make them array arguments, instead of pointer arguments. I'm not sure | if GCC is smart enough to still vectorize them in that case, but | that's the right way to express it. An aligned array-of-floats decays | to an aligned pointer-to-float,

Re: PR 19893 array_ref bug

2005-03-15 Thread Steve Ellcey
This program should generate an error; it's illogical. If the alignment of the element is greater than the element size, then arrays of such a type should be disallowed. Otherwise, stuff in either the compiler or the program itself could make the justified assumption that things of that

Re: PR 19893 array_ref bug

2005-03-15 Thread Mark Mitchell
Steve Ellcey wrote: Most of the gcc.dg/vect/* tests contain something like: typedef float afloat __attribute__ ((__aligned__(16))); afloat a[N]; It looks like what is really intended here is to apply the alignment to the array type. The point is that the entire array has to be

Re: PR 19893 array_ref bug

2005-03-15 Thread Steve Ellcey
The gcc.dg/compat/struct-layout problems seem to stem from struct-layout-1_generate.c. In generate_fields() it generates random types, some of these are arrays of some base type. Then based on another random number we might add an attribute like alignment. There is no check to ensure

Re: PR 19893 array_ref bug

2005-03-15 Thread Mark Mitchell
Joe Buck wrote: On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: The simplest solution would probably be to ignore __aligned__ attributes completely when we have an array. Or to do the change you suggested for the vector tests and have the attribute attached to the array and not the