diff options
author | Fariborz Jahanian <fjahanian@gcc.gnu.org> | 2003-12-19 23:35:40 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@gcc.gnu.org> | 2003-12-19 23:35:40 +0000 |
commit | b240b5a250761c80f9f2116fff5ffe06f9a09a43 (patch) | |
tree | da198ed879de4c6dc8e4d8c56a8e6df556f08244 | |
parent | ef342e209fdcc9e81de6623256c7b91a4707e053 (diff) | |
download | gcc-b240b5a250761c80f9f2116fff5ffe06f9a09a43.zip gcc-b240b5a250761c80f9f2116fff5ffe06f9a09a43.tar.gz gcc-b240b5a250761c80f9f2116fff5ffe06f9a09a43.tar.bz2 |
Test to test -mdynamic-no-pic -O2 -mpowerpc64 on Darwin.
From-SVN: r74858
-rw-r--r-- | gcc/testsuite/gcc.dg/macho-lo-sum.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/macho-lo-sum.c b/gcc/testsuite/gcc.dg/macho-lo-sum.c new file mode 100644 index 0000000..094b960 --- /dev/null +++ b/gcc/testsuite/gcc.dg/macho-lo-sum.c @@ -0,0 +1,29 @@ +/* { dg-do compile { target powerpc*-*-darwin* } } */ +/* { dg-options "-O2 -force_cpusubtype_ALL -mpowerpc64 -mdynamic-no-pic" } */ + +long long knight_attacks[64]; +long long InitializeAttackBoards(void); + +int main() +{ + return InitializeAttackBoards(); +} + +long long InitializeAttackBoards(void) +{ + + int i,j; + + for(i=0;i<64;i++) { } + + for(i=0;i<64;i++) { + knight_attacks[i]=0; + for(j=0;j<8;j++) { + knight_attacks[i]= 0; + } + } + + return knight_attacks[0]; + +} + |