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]

Re: [patch] Aligned attribute incorrectly applied to a type.


On Thu, Jun 29, 2000 at 02:03:13PM -0700, Catherine Moore wrote:
> 	* c-common.c (decl_attributes):  Differentiate between
> 	types and type decls for alignment.

Ok.

> typedef int new_int __attribute__ ((aligned(16)));
> int o_int;
> /* { dg-final { scan-assembler align-1.c "o_int,4,4" } } */

Not ok.  You're relying on the specifics of the COMMON declaration,
which does not universally apply -- not even as far as ia64-elf.

Try a gcc.c-torture/execute test like

typedef int new_int __attribute__ ((aligned(16)));
struct S { int x; };

int main()
{
  if (sizeof(struct S) != sizeof(int))
    abort ();
  return 0;
}

Perhaps I'm not imaginative enough, but I don't recall an ABI
that this would fail on.



r~

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