This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Aligned attribute incorrectly applied to a type.
- To: Catherine Moore <clm at cygnus dot com>
- Subject: Re: [patch] Aligned attribute incorrectly applied to a type.
- From: Richard Henderson <rth at cygnus dot com>
- Date: Thu, 29 Jun 2000 14:31:43 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200006292103.OAA00219@cygint.cygnus.com>
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~