diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9f329be7ede..4e86ffc3b56 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-03-09 Geoffrey Keating + + * config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Don't define. + 2002-03-09 Jakub Jelinek PR middle-end/5877 diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index aa1c0cccb71..6b5f48a12ec 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -383,14 +383,6 @@ do { \ /* Real stack boundary as mandated by the appropriate ABI. */ #define ABI_STACK_BOUNDARY ((TARGET_EABI && !TARGET_ALTIVEC_ABI) ? 64 : 128) -/* No data type wants to be aligned rounder than this. */ -/* FIXME: This should be keyed off of TARGET_ALTIVEC_ABI instead but - TARGET_ALTIVEC_ABI uses rs6000_altivec_abi which is only defined in - rs6000.c. Consequently, genconstants will fail to link because it - uses rtl.c which uses BIGGEST_ALIGNMENT. */ -#undef BIGGEST_ALIGNMENT -#define BIGGEST_ALIGNMENT ((TARGET_EABI && !TARGET_ALTIVEC) ? 64 : 128) - /* An expression for the alignment of a structure field FIELD if the alignment computed in the usual way is COMPUTED. */ #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1db2c2bf3dc..5fef1185b73 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-03-09 Geoffrey Keating + + * gcc.dg/ppc-ldstruct.c: New test. + 2002-03-09 Jakub Jelinek * gcc.c-torture/execute/va-arg-22.c: New test. diff --git a/gcc/testsuite/gcc.dg/ppc-ldstruct.c b/gcc/testsuite/gcc.dg/ppc-ldstruct.c new file mode 100644 index 00000000000..e3912d52826 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ppc-ldstruct.c @@ -0,0 +1,19 @@ +/* { dg-do run { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* } } */ +/* { dg-options "-O -mlong-double-128" } */ + +/* SVR4 and EABI both specify that 'long double' is aligned to a 128-bit + boundary in structures. */ + +struct { + int x; + long double d; +} s; + +int main(void) +{ + if (sizeof (s) != 32) + abort (); + if ((char *)&s.d - (char *)&s != 16) + abort (); + exit (0); +}