aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2002-03-09 19:14:15 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2002-03-09 19:14:15 +0000
commit79b51cd7d8d2fed42734c83ad00e26aa0cc751b4 (patch)
treeca560adc0c5a676c0cb720610a33ef657b7af559 /gcc
parent32c1620024756f8695f6e1d909b05e3b9873b55f (diff)
downloadgcc-79b51cd7d8d2fed42734c83ad00e26aa0cc751b4.zip
gcc-79b51cd7d8d2fed42734c83ad00e26aa0cc751b4.tar.gz
gcc-79b51cd7d8d2fed42734c83ad00e26aa0cc751b4.tar.bz2
In gcc/:
* config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Don't define. In gcc/testsuite/: * gcc.dg/ppc-ldstruct.c: New test. From-SVN: r50503
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/rs6000/sysv4.h8
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/ppc-ldstruct.c19
4 files changed, 27 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9f329be..4e86ffc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index aa1c0cc..6b5f48a 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 1db2c2b..5fef118 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..e3912d5
--- /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);
+}