diff options
Diffstat (limited to 'gcc')
-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 00000000000..094b9607685 --- /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]; + +} + |