rs6000: Don't push stack frame for AIX when debugging and -fcompare-debug.
authorDavid Edelsohn <dje.gcc@gmail.com>
Thu, 9 Apr 2020 16:43:22 +0000 (12:43 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sun, 26 Apr 2020 02:57:35 +0000 (22:57 -0400)
AIX pushes a stack frame when debugging is enabled.  With -fcompare-debug
this generates comparison failures because code geneation is different.
This patch disables the stack push for -fcompare-debug that only is used
for internal testing and not for normal debug information generation that
will be consumed by AIX tools.

This patch also removes xfails from testsuite testcases that use
-fcompare-debug and no longer fail on AIX without the stack push difference.

        * config/rs6000/rs6000-logue.c (rs6000_stack_info): Don't push a
        stack frame when debugging and flag_compare_debug is enabled.

testsuite/
        * g++.dg/debug/dwarf2/pr61433.C: Unfail AIX.
        * g++.dg/opt/pr48549.C: Same.
        * g++.dg/opt/pr60002.C: Same.
        * g++.dg/opt/pr80436.C: Same.
        * g++.dg/opt/pr83084.C: Same.
        * g++.dg/other/pr42685.C: Same.
        * gcc.dg/pr41241.c: Same.
        * gcc.dg/pr42629.c: Same.
        * gcc.dg/pr42630.c: Same.
        * gcc.dg/pr42719.c: Same.
        * gcc.dg/pr42728.c: Same.
        * gcc.dg/pr42889.c: Same.
        * gcc.dg/pr42916.c: Same.
        * gcc.dg/pr43084.c: Same.
        * gcc.dg/pr43670.c: Same.
        * gcc.dg/pr44023.c: Same.
        * gcc.dg/pr44971.c: Same.
        * gcc.dg/pr45449.c: Same.
        * gcc.dg/pr46771.c: Same.
        * gcc.dg/pr47684.c: Same.
        * gcc.dg/pr47881.c: Same.
        * gcc.dg/pr48768.c: Same.
        * gcc.dg/pr50017.c: Same.
        * gcc.dg/pr56023.c: Same.
        * gcc.dg/pr64935-1.c: Same.
        * gcc.dg/pr64935-2.c: Same.
        * gcc.dg/pr65521.c: Same.
        * gcc.dg/pr65779.c: Same.
        * gcc.dg/pr65980.c: Same.
        * gcc.dg/pr66688.c: Same.
        * gcc.dg/pr70405.c: Same.
        * gcc.dg/vect/pr49352.c: Same.

44 files changed:
gcc/ChangeLog
gcc/config/rs6000/rs6000-logue.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C
gcc/testsuite/g++.dg/debug/pr46583.C
gcc/testsuite/g++.dg/debug/pr47106.C
gcc/testsuite/g++.dg/debug/pr56294.C
gcc/testsuite/g++.dg/debug/pr56819.C
gcc/testsuite/g++.dg/debug/pr71432.C
gcc/testsuite/g++.dg/debug/pr84704.C
gcc/testsuite/g++.dg/opt/pr48549.C
gcc/testsuite/g++.dg/opt/pr60002.C
gcc/testsuite/g++.dg/opt/pr80436.C
gcc/testsuite/g++.dg/opt/pr83084.C
gcc/testsuite/g++.dg/other/pr42685.C
gcc/testsuite/gcc.dg/pr41241.c
gcc/testsuite/gcc.dg/pr41345.c
gcc/testsuite/gcc.dg/pr42629.c
gcc/testsuite/gcc.dg/pr42630.c
gcc/testsuite/gcc.dg/pr42631.c
gcc/testsuite/gcc.dg/pr42719.c
gcc/testsuite/gcc.dg/pr42728.c
gcc/testsuite/gcc.dg/pr42889.c
gcc/testsuite/gcc.dg/pr42916.c
gcc/testsuite/gcc.dg/pr43084.c
gcc/testsuite/gcc.dg/pr43670.c
gcc/testsuite/gcc.dg/pr44023.c
gcc/testsuite/gcc.dg/pr44971.c
gcc/testsuite/gcc.dg/pr45449.c
gcc/testsuite/gcc.dg/pr46771.c
gcc/testsuite/gcc.dg/pr47684.c
gcc/testsuite/gcc.dg/pr47881.c
gcc/testsuite/gcc.dg/pr48768.c
gcc/testsuite/gcc.dg/pr50017.c
gcc/testsuite/gcc.dg/pr56023.c
gcc/testsuite/gcc.dg/pr64935-1.c
gcc/testsuite/gcc.dg/pr64935-2.c
gcc/testsuite/gcc.dg/pr65521.c
gcc/testsuite/gcc.dg/pr65779.c
gcc/testsuite/gcc.dg/pr65980.c
gcc/testsuite/gcc.dg/pr66688.c
gcc/testsuite/gcc.dg/pr70405.c
gcc/testsuite/gcc.dg/torture/pr59166.c
gcc/testsuite/gcc.dg/vect/pr49352.c

index 3d91fcd..38dd583 100644 (file)
@@ -1,3 +1,8 @@
+2020-04-25  David Edelsohn  <dje.gcc@gmail.com>
+
+       * config/rs6000/rs6000-logue.c (rs6000_stack_info): Don't push a
+       stack frame when debugging and flag_compare_debug is enabled.
+
 2020-04-25  Michael Meissner  <meissner@linux.ibm.com>
 
        * config/rs6000/linux64.h (PCREL_SUPPORTED_BY_OS): Define to
index 4cbf228..7226319 100644 (file)
@@ -909,7 +909,7 @@ rs6000_stack_info (void)
   else if (frame_pointer_needed)
     info->push_p = 1;
 
-  else if (TARGET_XCOFF && write_symbols != NO_DEBUG)
+  else if (TARGET_XCOFF && write_symbols != NO_DEBUG && !flag_compare_debug)
     info->push_p = 1;
 
   else
index 3a44abf..1035425 100644 (file)
@@ -1,5 +1,40 @@
 2020-04-25  David Edelsohn  <dje.gcc@gmail.com>
 
+       * g++.dg/debug/dwarf2/pr61433.C: Unfail AIX.
+       * g++.dg/opt/pr48549.C: Same.
+       * g++.dg/opt/pr60002.C: Same.
+       * g++.dg/opt/pr80436.C: Same.
+       * g++.dg/opt/pr83084.C: Same.
+       * g++.dg/other/pr42685.C: Same.
+       * gcc.dg/pr41241.c: Same.
+       * gcc.dg/pr42629.c: Same.
+       * gcc.dg/pr42630.c: Same.
+       * gcc.dg/pr42719.c: Same.
+       * gcc.dg/pr42728.c: Same.
+       * gcc.dg/pr42889.c: Same.
+       * gcc.dg/pr42916.c: Same.
+       * gcc.dg/pr43084.c: Same.
+       * gcc.dg/pr43670.c: Same.
+       * gcc.dg/pr44023.c: Same.
+       * gcc.dg/pr44971.c: Same.
+       * gcc.dg/pr45449.c: Same.
+       * gcc.dg/pr46771.c: Same.
+       * gcc.dg/pr47684.c: Same.
+       * gcc.dg/pr47881.c: Same.
+       * gcc.dg/pr48768.c: Same.
+       * gcc.dg/pr50017.c: Same.
+       * gcc.dg/pr56023.c: Same.
+       * gcc.dg/pr64935-1.c: Same.
+       * gcc.dg/pr64935-2.c: Same.
+       * gcc.dg/pr65521.c: Same.
+       * gcc.dg/pr65779.c: Same.
+       * gcc.dg/pr65980.c: Same.
+       * gcc.dg/pr66688.c: Same.
+       * gcc.dg/pr70405.c: Same.
+       * gcc.dg/vect/pr49352.c: Same.
+
+2020-04-25  David Edelsohn  <dje.gcc@gmail.com>
+
        * gcc.dg/ipa/ipa-sra-19.c: Add -Wno-psabi option on AIX.
 
 2020-04-25  David Edelsohn  <dje.gcc@gmail.com>
index ef2479f..12181d0 100644 (file)
@@ -1,6 +1,5 @@
 // PR c++/61433
 // { dg-do compile { target c++11 } }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
 // { dg-options "-O -fcompare-debug -fno-inline -fno-ipa-pure-const -fipa-sra" }
 // { dg-additional-options "-Wno-return-type" }
 
index 04b1fbf..c869576 100644 (file)
@@ -1,7 +1,7 @@
 // PR debug/46583
 // { dg-do compile }
 // { dg-options "-O -fno-inline -fipa-cp -fipa-cp-clone -fcompare-debug" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
+// { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } }
 
 template < typename = unsigned long >struct A
 {
index 84c6e3f..33c6e17 100644 (file)
@@ -1,7 +1,7 @@
 // { dg-do compile }
 // { dg-options "-O -fpartial-inlining -flto -fconserve-stack -fcompare-debug" }
 // { dg-require-effective-target lto }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
+// { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } }
 
 void end (int, int) __attribute__ ((__noreturn__));
 
index 301fcb1..d31ed1c 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-fno-ipa-sra -fcompare-debug" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
+// { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } }
 
 struct comp_cost { int cost; unsigned complexity; };
 struct cost_pair { struct iv_cand *cand; };
index 4aa86b0..b442c8e 100644 (file)
@@ -1,7 +1,7 @@
 // PR debug/56819
 // { dg-do compile }
 // { dg-options "-fcompare-debug" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
+// { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } }
 
 template <typename>
 struct A
index e9bc88c..00473be 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
+/* { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } } */
 
 namespace std
 {
index b9d4c5f..b7d29eb 100644 (file)
@@ -1,7 +1,7 @@
 // PR c++/84704
 // { dg-do compile }
 // { dg-options "-g -fcompare-debug -O2" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
+// { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } }
 
 int a[1] = { 0 };
 
index e113b15..93a38e4 100644 (file)
@@ -1,7 +1,6 @@
 // PR rtl-optimization/48549
 // { dg-do compile }
 // { dg-options "-fcompare-debug -O2" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
 
 __extension__ typedef __PTRDIFF_TYPE__ pdiff_t;
 
index ceba0b7..753f579 100644 (file)
@@ -1,7 +1,6 @@
 // PR tree-optimization/60002
 // { dg-do compile }
 // { dg-options "-O2 -fcompare-debug -fdeclone-ctor-dtor -fipa-cp-clone" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
 
 struct A {};
 
index b269b75..b5879bf 100644 (file)
@@ -1,7 +1,6 @@
 // PR debug/80436
 // { dg-do compile { target c++11 } }
 // { dg-options "-O3 -fcompare-debug" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
 
 void fn (...);
 void foo (int, int, int);
index 1e7abf6..d21e308 100644 (file)
@@ -1,7 +1,6 @@
 // PR debug/83084
 // { dg-do compile }
 // { dg-options "-O2 -fcompare-debug -Wno-return-type" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
 
 enum E { F };
 template <E = F> struct A {
index dd070c4..b8b1ad6 100644 (file)
@@ -1,6 +1,5 @@
 // { dg-do compile }
 // { dg-options "-O -funroll-loops -fcompare-debug" }
-// { dg-xfail-if "" { powerpc-ibm-aix* } }
 
 void Remap(int n, int *src, int *dst, int *map)
 {
index 8ba92ab..42fb2f7 100644 (file)
@@ -2,7 +2,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fcompare-debug -g" } */
 /* { dg-options "-O2 -fcompare-debug -g -march=i586 -mtune=i586 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 typedef struct { int t1; int t2; int t3; } *T;
 typedef struct { int s; } S;
index cb08091..5753967 100644 (file)
@@ -1,7 +1,7 @@
 /* PR bootstrap/41345 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -g -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
+/* { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } } */
 
 void
 foo (int *x)
index bb74221..7b5b232 100644 (file)
@@ -4,7 +4,6 @@
 /* { dg-options "-O1 -fsched-pressure -fschedule-insns -fcompare-debug" { target scheduling } } */
 /* { dg-options "-O1 -fcompare-debug" { target { ! scheduling } } } */
 /* { dg-require-effective-target int32plus } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 int lzo_adler32(int adler, char *buf)
 {
index 08427ab..34543da 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
 /* { dg-options "-O1 -fvariable-expansion-in-unroller -funroll-loops -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 int sum(int *buf, int len)
 {
index 9dd51a2..4f91444 100644 (file)
@@ -15,7 +15,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-g -O1 -funroll-loops -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
+/* { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } } */
 
 void foo()
 {
index a44b835..94a58e4 100644 (file)
@@ -1,7 +1,6 @@
 /* PR tree-optimization/42719 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftracer -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 int *v;
 
index 3ee919b..7b2fbb6 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/42728 */
 /* { dg-do compile } */
 /* { dg-options "-O1 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 void
 foo (char *a)
index a8e9e60..d342173 100644 (file)
@@ -1,7 +1,6 @@
 /* PR rtl-optimization/42889 */
 /* { dg-do compile } */
 /* { dg-options "-O -fgcse -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 extern int A[], B[];
 
index bbe4436..d32ba94 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
 /* { dg-options "-O1 -funroll-loops -ftree-vectorize -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 int seed;
 
index f70ed86..dc75982 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/43084 */
 /* { dg-do compile } */
 /* { dg-options "-O1 -fwhole-program -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 struct S
 {
index 45088fe..f152b4d 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/43670 */
 /* { dg-do compile } */
 /* { dg-options "-O -ftree-vrp -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 extern void abort (void);
 
index 90f8553..df22bba 100644 (file)
@@ -3,7 +3,6 @@
 /* { dg-options "-fcompare-debug -O2" } */
 /* { dg-options "-fcompare-debug -O2 -mcpu=ev67" { target alpha*-*-* } } */
 /* { dg-require-effective-target int32plus } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 void
 foo (unsigned f, long v, unsigned *w, unsigned a, unsigned b, unsigned e, unsigned c, unsigned d)
index 2096959..a1faef5 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fcompare-debug -w" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 typedef struct
 {
index 61ddcbc..d7b69a1 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-tree-pre -fno-tree-pta -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 struct S
 {
index 3ba00a1..b44dfd4 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/46771 */
 /* { dg-do compile } */
 /* { dg-options "-O -ftree-vectorize -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 unsigned char v[1600];
 
index 7c66d4d..475aa15 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/47684 */
 /* { dg-do compile } */
 /* { dg-options "-O3 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 int in[8][4];
 int out[4];
index ef0bd88..ee17073 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/47881 */
 /* { dg-do compile } */
 /* { dg-options "-O -fcompare-debug -fno-dce -funroll-loops -fno-web" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 extern int data[];
 
index 990c537..7d0383e 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/48768 */
 /* { dg-do compile } */
 /* { dg-options "-O -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 int a, b;
 
index e3f5f1f..66bef00 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/50017 */
 /* { dg-do compile } */
 /* { dg-options "-O3 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 struct S { int r, i; };
 
index d53a22c..f1942ac 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 void
 foo (char *c)
index c9c67eb..0fc6b58 100644 (file)
@@ -1,7 +1,6 @@
 /* PR rtl-optimization/64935 */
 /* { dg-do compile } */
 /* { dg-options "-std=gnu89 -Wno-shift-count-overflow -O2 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 int a[] = {}, b[] = {}, c[] = {}, d[] = {}, e[] = {}, f[] = {}, h[] = {};
 int g[] = { 0 };
index 33d9630..5d7a6b8 100644 (file)
@@ -2,7 +2,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fschedule-insns --param=max-sched-ready-insns=1 -fcompare-debug" } */
 /* { dg-require-effective-target scheduling } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 void
 foo (int *data, unsigned len, const int qlp_coeff[],
index 49d6a4c..97879e2 100644 (file)
@@ -1,7 +1,6 @@
 /* PR ipa/65521 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 struct S { int s; };
 int f6 (void *, unsigned long);
index fa6515f..7d5c522 100644 (file)
@@ -1,7 +1,6 @@
 /* PR debug/65779 */
 /* { dg-do assemble } */
 /* { dg-options "-O2 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 unsigned long
 foo (unsigned long x, unsigned char *y, unsigned int z)
index 4babad6..5139ae3 100644 (file)
@@ -1,7 +1,6 @@
 /* PR rtl-optimization/65980 */
 /* { dg-do compile } */
 /* { dg-options "-O3 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 typedef struct { int b; } A;
 void (*a) (int);
index c7f4ccb..af6f844 100644 (file)
@@ -1,7 +1,6 @@
 /* PR tree-optimization/66688 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-reorder-blocks -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 struct fdt_header { unsigned magic; } *a;
 
index 25e0576..bff390f 100644 (file)
@@ -2,7 +2,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fcompare-debug" } */
 /* { dg-additional-options "-mavx512f" { target i?86-*-* x86_64-*-* } } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 typedef short V __attribute__ ((vector_size (32)));
 
index 43df6be..b8f414a 100644 (file)
@@ -1,6 +1,6 @@
 /* PR rtl-optimization/59166 */
 /* { dg-additional-options "-fcompare-debug" } */
-/* { dg-xfail-if "compare-debug failure" { powerpc-ibm-aix* } } */
+/* { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } } */
 
 int a, b, c, f, g;
 
index b784b8a..2d5e723 100644 (file)
@@ -1,7 +1,6 @@
 /* PR tree-optimization/49352 */
 /* { dg-do compile } */
 /* { dg-additional-options "-O2 -fcompare-debug" } */
-/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 
 int
 foo (int *x, int *y, int n)