In gcc/:
authorGeoffrey Keating <geoffk@redhat.com>
Sat, 9 Mar 2002 19:14:15 +0000 (19:14 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Sat, 9 Mar 2002 19:14:15 +0000 (19:14 +0000)
* config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Don't define.
In gcc/testsuite/:
* gcc.dg/ppc-ldstruct.c: New test.

From-SVN: r50503

gcc/ChangeLog
gcc/config/rs6000/sysv4.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ppc-ldstruct.c [new file with mode: 0644]

index 9f329be7ede43a49c3be217eb07fa4b9d4cec8d8..4e86ffc3b5647a251e5446c1f31fe1bd0693a1ce 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-09  Geoffrey Keating  <geoffk@redhat.com>
+
+       * config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Don't define.
+
 2002-03-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/5877
index aa1c0cccb7187e53c717afe42b54389d75357bc4..6b5f48a12ec8ab0836031c07e758a4c9cb7d71c5 100644 (file)
@@ -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)                                  \
index 1db2c2bf3dcf593f17ed968f2927fd4ec9b63e88..5fef1185b73c0b5cf36ae523e10d802bcad368ae 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-09  Geoffrey Keating  <geoffk@redhat.com>
+
+       * gcc.dg/ppc-ldstruct.c: New test.
+
 2002-03-09  Jakub Jelinek  <jakub@redhat.com>
 
        * 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 (file)
index 0000000..e3912d5
--- /dev/null
@@ -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);
+}