2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / ppc-sdata-2.c
blobee77456ca4ff95271ea97d760c7b26930d33aa15
1 /* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* powerpc-*-rtems* } } } } */
2 /* { dg-options "-O2 -fno-common -G 8 -msdata=sysv" } */
3 /* { dg-require-effective-target nonpic } */
4 /* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
5 /* { dg-final { scan-assembler-not "\\.section\[ \t\]\\.sdata2," } } */
6 /* { dg-final { scan-assembler "sdat@sdarel\\(13\\)" } } */
7 /* { dg-final { scan-assembler "sdat2@sdarel\\(13\\)" } } */
8 /* { dg-skip-if "" { *-*-* } { "-mno-readonly-in-sdata" } { "" } } */
11 int sdat = 2;
12 const char sdat2[] = "1234";
14 const char * test (void)
16 return sdat ? sdat2 : 0;