ppc-sdata-1.c: New test.

2003-03-10  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

	* gcc.dg/ppc-sdata-1.c: New test.
	* gcc.dg/ppc-sdata-2.c: New test.

From-SVN: r64119
This commit is contained in:
Franz Sirl 2003-03-10 20:42:23 +00:00 committed by Franz Sirl
parent 529997387b
commit 88a7a0c921
3 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-03-10 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* gcc.dg/ppc-sdata-1.c: New test.
* gcc.dg/ppc-sdata-2.c: New test.
2003-03-09 Mark Mitchell <mark@codesourcery.com>
PR c++/9373

View File

@ -0,0 +1,15 @@
/* { dg-do compile { target powerpc-*-linux* powerpc-*-sysv* powerpc-*-eabi* } } */
/* { dg-options "-O2 -fno-common -G 8 -meabi -msdata=eabi" } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata2," } } */
/* { dg-final { scan-assembler "sdat@sdarel\\(13\\)" } } */
/* { dg-final { scan-assembler "sdat2@sda21\\(2\\)" } } */
int sdat = 2;
const char sdat2[] = "1234";
const char * test (void)
{
return sdat ? sdat2 : 0;
}

View File

@ -0,0 +1,15 @@
/* { dg-do compile { target powerpc-*-linux* powerpc-*-sysv* powerpc-*-eabi* } } */
/* { dg-options "-O2 -fno-common -G 8 -msdata=sysv" } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
/* { dg-final { scan-assembler-not "\\.section\[ \t\]\\.sdata2," } } */
/* { dg-final { scan-assembler "sdat@sdarel\\(13\\)" } } */
/* { dg-final { scan-assembler "sdat2@sdarel\\(13\\)" } } */
int sdat = 2;
const char sdat2[] = "1234";
const char * test (void)
{
return sdat ? sdat2 : 0;
}