testsuite, Darwin : Skip ELF-specific tests.

A number of ELF-specific tests were introduced in r11-6140, one
of which fails on all Mach-O/Darwin platforms.

On examination, the tests have no meaningful parallel for Mach-O
which dead strips at the symbol level, and does not make use of
function sections (the fact that a used and an unused symbol are
placed in the same section will not affect dead stripping).

Given that the tests do not demonstrate anything useful on Darwin,
skip them.

gcc/testsuite/ChangeLog:

	* c-c++-common/attr-used-5.c: Skip for Darwin.
	* c-c++-common/attr-used-6.c: Likewise.
	* c-c++-common/attr-used-7.c: Likewise.
	* c-c++-common/attr-used-8.c: Likewise.
	* c-c++-common/attr-used-9.c: Likewise.
This commit is contained in:
Iain Sandoe 2021-01-31 12:24:44 +00:00
parent 5dfbad4f7c
commit 98342bdd2b
5 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
/* { dg-options "-Wall -O2" } */
struct dtv_slotinfo_list

View File

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
/* { dg-options "-Wall -O2" } */
struct dtv_slotinfo_list

View File

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
/* { dg-options "-Wall -O2" } */
int __attribute__((used,section(".data.foo"))) foo2 = 2;

View File

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
/* { dg-options "-Wall -O2" } */
int __attribute__((section(".data.foo"))) foo1 = 1;

View File

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
/* { dg-options "-Wall -O2" } */
struct dtv_slotinfo_list