From 18e7f36bf2fa3aa3aeb768345c5fe39bc6ce0f27 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 24 Oct 2020 19:51:01 +1030 Subject: [PATCH] [RS6000] Remove -mpcrel from tests When running with -m32 FAIL: gcc.target/powerpc/pr94740.c (test for excess errors) Excess errors: cc1: error: '-mpcrel' requires '-mcmodel=medium' The others don't run for -m32, but remove the unnecessary -mpcrel anyway. * gcc.target/powerpc/localentry-1.c: Remove -mpcrel from options. * gcc.target/powerpc/notoc-direct-1.c: Likewise. * gcc.target/powerpc/pr94740.c: Likewise. --- gcc/testsuite/gcc.target/powerpc/localentry-1.c | 7 +++---- gcc/testsuite/gcc.target/powerpc/notoc-direct-1.c | 8 +++----- gcc/testsuite/gcc.target/powerpc/pr94740.c | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/gcc/testsuite/gcc.target/powerpc/localentry-1.c b/gcc/testsuite/gcc.target/powerpc/localentry-1.c index c3c51680cfe..1343df2b8f1 100644 --- a/gcc/testsuite/gcc.target/powerpc/localentry-1.c +++ b/gcc/testsuite/gcc.target/powerpc/localentry-1.c @@ -1,11 +1,10 @@ /* { dg-do compile } */ -/* { dg-options "-mdejagnu-cpu=power10 -O2 -mpcrel" } */ +/* { dg-options "-mdejagnu-cpu=power10 -O2" } */ /* { dg-require-effective-target powerpc_elfv2 } */ /* { dg-require-effective-target power10_ok } */ -/* Ensure we generate ".localentry fn,1" for both leaf and non-leaf functions. - At present, -mcpu=power10 does not enable pc-relative mode, so make sure we - enable it to be able to check for .localentry. */ +/* Ensure we generate ".localentry fn,1" for both leaf and non-leaf + functions. */ extern int y (int); diff --git a/gcc/testsuite/gcc.target/powerpc/notoc-direct-1.c b/gcc/testsuite/gcc.target/powerpc/notoc-direct-1.c index 74187e1d5dc..8fa09b03f4f 100644 --- a/gcc/testsuite/gcc.target/powerpc/notoc-direct-1.c +++ b/gcc/testsuite/gcc.target/powerpc/notoc-direct-1.c @@ -1,11 +1,10 @@ /* { dg-do compile } */ -/* { dg-options "-mdejagnu-cpu=power10 -O2 -mpcrel" } */ +/* { dg-options "-mdejagnu-cpu=power10 -O2" } */ /* { dg-require-effective-target powerpc_elfv2 } */ /* { dg-require-effective-target power10_ok } */ -/* Test that calls generated from PC-relative code are annotated with @notoc. - At present, -mcpu=power10 does not enable pc-relative mode. Enable it here - explicitly until it is turned on by default. */ +/* Test that calls generated from PC-relative code are annotated with + @notoc. */ extern int yy0 (int); extern void yy1 (int); @@ -40,4 +39,3 @@ int ww (void) /* { dg-final { scan-assembler {yy0@notoc} } } */ /* { dg-final { scan-assembler {zz1@notoc} } } */ /* { dg-final { scan-assembler {zz0@notoc} } } */ - diff --git a/gcc/testsuite/gcc.target/powerpc/pr94740.c b/gcc/testsuite/gcc.target/powerpc/pr94740.c index 9c2b4644701..09decc38c2c 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr94740.c +++ b/gcc/testsuite/gcc.target/powerpc/pr94740.c @@ -1,7 +1,7 @@ /* PR rtl-optimization/94740 */ /* { dg-do compile } */ /* { dg-require-effective-target power10_ok } */ -/* { dg-options "-O2 -mdejagnu-cpu=power10 -mpcrel" } */ +/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ int array[8]; int