summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-19 23:35:40 +0000
committerfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-19 23:35:40 +0000
commitdc2d42d9f8a04e67d31ed70b74f84040f9f088a4 (patch)
treeda198ed879de4c6dc8e4d8c56a8e6df556f08244 /gcc
parent0d89c210bdc2b908b5c81bbeec19f6686170d3fe (diff)
downloadgcc-dc2d42d9f8a04e67d31ed70b74f84040f9f088a4.tar.gz
Test to test -mdynamic-no-pic -O2 -mpowerpc64 on Darwin.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74858 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/macho-lo-sum.c29
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];
+
+}
+