From: H.J. Lu Date: Fri, 19 Feb 2021 23:44:38 +0000 (-0800) Subject: Require SHF_GNU_RETAIN support for retain tests X-Git-Tag: basepoints/gcc-12~925 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=609204abb889166c17a600121ba8ced18db2567a;p=thirdparty%2Fgcc.git Require SHF_GNU_RETAIN support for retain tests Since retain attribute requires SHF_GNU_RETAIN, run retain tests only if SHF_GNU_RETAIN is supported. PR testsuite/99173 * c-c++-common/attr-retain-5.c: Require R_flag_in_section. * c-c++-common/attr-retain-6.c: Likewise. * c-c++-common/attr-retain-7.c: Likewise. * c-c++-common/attr-retain-8.c: Likewise. * c-c++-common/attr-retain-9.c: Likewise. --- diff --git a/gcc/testsuite/c-c++-common/attr-retain-5.c b/gcc/testsuite/c-c++-common/attr-retain-5.c index ee6e2c4e0542..1f3f8bfb5c5d 100644 --- a/gcc/testsuite/c-c++-common/attr-retain-5.c +++ b/gcc/testsuite/c-c++-common/attr-retain-5.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target R_flag_in_section } } */ /* { dg-skip-if "non-ELF target" { *-*-darwin* powerpc*-*-aix* } } */ /* { dg-options "-Wall -O2" } */ diff --git a/gcc/testsuite/c-c++-common/attr-retain-6.c b/gcc/testsuite/c-c++-common/attr-retain-6.c index 9aead148ec80..ed6cfae29485 100644 --- a/gcc/testsuite/c-c++-common/attr-retain-6.c +++ b/gcc/testsuite/c-c++-common/attr-retain-6.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target R_flag_in_section } } */ /* { dg-skip-if "non-ELF target" { *-*-darwin* powerpc*-*-aix* } } */ /* { dg-options "-Wall -O2" } */ diff --git a/gcc/testsuite/c-c++-common/attr-retain-7.c b/gcc/testsuite/c-c++-common/attr-retain-7.c index 4c1673583db3..c56d18a88e0d 100644 --- a/gcc/testsuite/c-c++-common/attr-retain-7.c +++ b/gcc/testsuite/c-c++-common/attr-retain-7.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target R_flag_in_section } } */ /* { dg-skip-if "non-ELF target" { *-*-darwin* powerpc*-*-aix* } } */ /* { dg-options "-Wall -O2" } */ diff --git a/gcc/testsuite/c-c++-common/attr-retain-8.c b/gcc/testsuite/c-c++-common/attr-retain-8.c index 7e067f562740..c1a9b52972e8 100644 --- a/gcc/testsuite/c-c++-common/attr-retain-8.c +++ b/gcc/testsuite/c-c++-common/attr-retain-8.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target R_flag_in_section } } */ /* { dg-skip-if "non-ELF target" { *-*-darwin* powerpc*-*-aix* } } */ /* { dg-options "-Wall -O2" } */ diff --git a/gcc/testsuite/c-c++-common/attr-retain-9.c b/gcc/testsuite/c-c++-common/attr-retain-9.c index 81accc0ee915..e6d7c0b43daf 100644 --- a/gcc/testsuite/c-c++-common/attr-retain-9.c +++ b/gcc/testsuite/c-c++-common/attr-retain-9.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target R_flag_in_section } } */ /* { dg-skip-if "non-ELF target" { *-*-darwin* powerpc*-*-aix* } } */ /* { dg-options "-Wall -O2" } */