PR debug/48204
[official-gcc.git] / gcc / testsuite / gcc.dg / special / gcsec-1.c
blobef1434fbe8b084631793a63aee8ccab3478bb692
1 /* AIX gld supports garbage collection. But AIX gcc does not support
2 -ffunction-sections or -fdata-sections. */
3 /* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */
4 /* { dg-require-gc-sections "" } */
6 /* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" } */
7 /* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target static } } */
9 #include <stdlib.h>
11 static int unusedint=5;
13 static int usedint=1;
15 int unused(void) {
16 return 1;
19 int foo(void) {
20 return usedint;
23 int main(void) {
25 if (foo())
26 exit(0);
27 else
28 abort();