From 36c08a8f212114252785ee68b3586e949c3612aa Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Wed, 23 Dec 2020 20:24:29 -0300 Subject: [PATCH] mark some tests in gcc.target/arm as requiring "fpic" support Require effective target fpic support in tests using pic flags. for gcc/testsuite/ChangeLog * gcc.target/arm/data-rel-1.c: Require "fpic" support. * gcc.target/arm/data-rel-2.c: Likewise. * gcc.target/arm/data-rel-3.c: Ditto. * gcc.target/arm/pr44788.c: Ditto. * gcc.target/arm/pr52006.c: Ditto. * gcc.target/arm/pr59858.c: Ditto. * gcc.target/arm/tlscall.c: Ditto. * gcc.target/arm/require-pic-register-loc.c: Ditto. Adjust line numbers. --- gcc/testsuite/gcc.target/arm/data-rel-1.c | 1 + gcc/testsuite/gcc.target/arm/data-rel-2.c | 1 + gcc/testsuite/gcc.target/arm/data-rel-3.c | 1 + gcc/testsuite/gcc.target/arm/pr44788.c | 1 + gcc/testsuite/gcc.target/arm/pr52006.c | 1 + gcc/testsuite/gcc.target/arm/pr59858.c | 1 + .../gcc.target/arm/require-pic-register-loc.c | 17 +++++++++-------- gcc/testsuite/gcc.target/arm/tlscall.c | 1 + 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/data-rel-1.c b/gcc/testsuite/gcc.target/arm/data-rel-1.c index a09e235c445..5931b44b9a6 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-1.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-1.c @@ -1,5 +1,6 @@ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mno-pic-data-is-text-relative" } */ +/* { dg-require-effective-target fpic } */ /* { dg-final { scan-assembler-not "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler-not "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ /* { dg-final { scan-assembler "j\\(GOT\\)" } } */ diff --git a/gcc/testsuite/gcc.target/arm/data-rel-2.c b/gcc/testsuite/gcc.target/arm/data-rel-2.c index 56a54e81849..3ed83e287f1 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-2.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-2.c @@ -1,6 +1,7 @@ /* { dg-skip-if "Not supported in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mno-pic-data-is-text-relative -mno-single-pic-base" } */ +/* { dg-require-effective-target fpic } */ /* { dg-final { scan-assembler-not "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ /* { dg-final { scan-assembler "j\\(GOT\\)" } } */ diff --git a/gcc/testsuite/gcc.target/arm/data-rel-3.c b/gcc/testsuite/gcc.target/arm/data-rel-3.c index 4ce90480257..5ab6ba7a12c 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-3.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-3.c @@ -1,6 +1,7 @@ /* { dg-skip-if "Not supported in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mpic-data-is-text-relative" } */ +/* { dg-require-effective-target fpic } */ /* { dg-final { scan-assembler "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler-not "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ /* { dg-final { scan-assembler-not "j\\(GOT\\)" } } */ diff --git a/gcc/testsuite/gcc.target/arm/pr44788.c b/gcc/testsuite/gcc.target/arm/pr44788.c index e69bbc603ed..470db320eae 100644 --- a/gcc/testsuite/gcc.target/arm/pr44788.c +++ b/gcc/testsuite/gcc.target/arm/pr44788.c @@ -2,6 +2,7 @@ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_thumb2_ok } */ /* { dg-options "-Os -fno-strict-aliasing -fPIC -mthumb -march=armv7-a -mfpu=vfp3 -mfloat-abi=softfp" } */ +/* { dg-require-effective-target fpic } */ extern void foo (float *); diff --git a/gcc/testsuite/gcc.target/arm/pr52006.c b/gcc/testsuite/gcc.target/arm/pr52006.c index 136a39d81ad..f8188186087 100644 --- a/gcc/testsuite/gcc.target/arm/pr52006.c +++ b/gcc/testsuite/gcc.target/arm/pr52006.c @@ -4,6 +4,7 @@ /* { dg-skip-if "no support for hard-float VFP ABI" { arm_thumb1 } { "-march=*" } { "" } } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-march=armv7-a+fp -mfloat-abi=hard -O2 -fPIC" } */ +/* { dg-require-effective-target fpic } */ unsigned long a; static int b; diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c b/gcc/testsuite/gcc.target/arm/pr59858.c index bcfd5d553e4..3360b48e858 100644 --- a/gcc/testsuite/gcc.target/arm/pr59858.c +++ b/gcc/testsuite/gcc.target/arm/pr59858.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb -fno-stack-protector -Os -fno-tree-loop-optimize -fno-tree-dominator-opts -fPIC -w" } */ +/* { dg-require-effective-target fpic } */ /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */ /* { dg-require-effective-target arm_arch_v5te_thumb_ok } */ diff --git a/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c index 9f089ee05e6..9c532f3ed4d 100644 --- a/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c +++ b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c @@ -1,15 +1,16 @@ /* { dg-do compile } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-g -fPIC" } */ +/* { dg-require-effective-target fpic } */ void *v; void a (void *x) { } void b (void) { } - /* line 8. */ -int /* line 9. */ -main (int argc) /* line 10. */ -{ /* line 11. */ - if (argc == 12345) /* line 12. */ + /* line 9. */ +int /* line 10. */ +main (int argc) /* line 11. */ +{ /* line 12. */ + if (argc == 12345) /* line 13. */ { a (v); return 1; @@ -19,12 +20,12 @@ main (int argc) /* line 10. */ return 0; } -/* { dg-final { scan-assembler-not "\.loc 1 8 \[0-9\]\+" } } */ /* { dg-final { scan-assembler-not "\.loc 1 9 \[0-9\]\+" } } */ /* { dg-final { scan-assembler-not "\.loc 1 10 \[0-9\]\+" } } */ +/* { dg-final { scan-assembler-not "\.loc 1 11 \[0-9\]\+" } } */ /* The loc at the start of the prologue. */ -/* { dg-final { scan-assembler-times "\.loc 1 11 \[0-9\]\+" 1 } } */ +/* { dg-final { scan-assembler-times "\.loc 1 12 \[0-9\]\+" 1 } } */ /* The loc at the end of the prologue, with the first user line. */ -/* { dg-final { scan-assembler-times "\.loc 1 12 \[0-9\]\+" 1 } } */ +/* { dg-final { scan-assembler-times "\.loc 1 13 \[0-9\]\+" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/tlscall.c b/gcc/testsuite/gcc.target/arm/tlscall.c index 71366effa3e..8d5609ae132 100644 --- a/gcc/testsuite/gcc.target/arm/tlscall.c +++ b/gcc/testsuite/gcc.target/arm/tlscall.c @@ -2,6 +2,7 @@ /* { dg-do assemble } */ /* { dg-options "-O2 -fPIC -mtls-dialect=gnu2" } */ +/* { dg-require-effective-target fpic } */ /* { dg-skip-if "FDPIC does not support gnu2 TLS dialect" { arm*-*-uclinuxfdpiceabi } "*" "" } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ -- 2.30.2