rs6000: Don't push stack frame for AIX when debugging and -fcompare-debug.

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.
This commit is contained in:
David Edelsohn 2020-04-09 12:43:22 -04:00
parent 9b933c99cb
commit 50929dd318
44 changed files with 50 additions and 42 deletions

View 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

View 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

View File

@ -1,3 +1,38 @@
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.

View 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" }

View 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
{

View 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__));

View 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; };

View 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

View 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
{

View 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 };

View 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;

View 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 {};

View 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);

View 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 {

View 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)
{

View 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;

View 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)

View 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)
{

View 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)
{

View 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()
{

View 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;

View 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)

View 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[];

View 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;

View 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
{

View 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);

View 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)

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug -w" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
typedef struct
{

View 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
{

View 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];

View 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];

View 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[];

View 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;

View 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; };

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
void
foo (char *c)

View 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 };

View 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[],

View 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);

View 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)

View 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);

View 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;

View 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)));

View 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;

View 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)