aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/gcc.target/mips/sdata-4.c
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2016-01-14 16:43:34 -0800
committerDan Albert <danalbert@google.com>2016-01-22 14:51:24 -0800
commit3186be22b6598fbd467b126347d1c7f48ccb7f71 (patch)
tree2b176d3ce027fa5340160978effeb88ec9054aaa /gcc-4.8.1/gcc/testsuite/gcc.target/mips/sdata-4.c
parenta45222a0e5951558bd896b0513bf638eb376e086 (diff)
downloadtoolchain_gcc-3186be22b6598fbd467b126347d1c7f48ccb7f71.tar.gz
toolchain_gcc-3186be22b6598fbd467b126347d1c7f48ccb7f71.tar.bz2
toolchain_gcc-3186be22b6598fbd467b126347d1c7f48ccb7f71.zip
Check in a pristine copy of GCC 4.8.1.
The copy of GCC that we use for Android is still not working for mingw. Rather than finding all the differences that have crept into our GCC, just check in a copy from ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.8.1.tar.bz2. GCC 4.8.1 was chosen because it is what we have been using for mingw thus far, and the emulator doesn't yet work when upgrading to 4.9. Bug: http://b/26523949 Change-Id: Iedc0f05243d4332cc27ccd46b8a4b203c88dcaa3
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/gcc.target/mips/sdata-4.c')
-rw-r--r--gcc-4.8.1/gcc/testsuite/gcc.target/mips/sdata-4.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/mips/sdata-4.c b/gcc-4.8.1/gcc/testsuite/gcc.target/mips/sdata-4.c
new file mode 100644
index 000000000..82cfa61f8
--- /dev/null
+++ b/gcc-4.8.1/gcc/testsuite/gcc.target/mips/sdata-4.c
@@ -0,0 +1,44 @@
+/* { dg-options "-G4 -mexplicit-relocs -mno-gpopt" } */
+
+/* { dg-final { scan-assembler-not "%gp_?rel" } } */
+/* { dg-final { scan-assembler-not "\\\$gp" } } */
+
+static volatile int l4a;
+static volatile int l4b = 1;
+static volatile int __attribute__((section(".sdata"))) l4c;
+extern int e4a;
+extern int __attribute__((section(".sdata"))) e4b;
+int __attribute__((common)) c4;
+int __attribute__((nocommon)) g4a;
+int g4b = 1;
+int __attribute__((section(".sdata"))) g4c = 2;
+
+static volatile int l8a[2];
+static volatile int l8b[2] = { 1, 2 };
+static volatile int __attribute__((section(".sdata"))) l8c[2];
+extern int e8a[2];
+extern int __attribute__((section(".sdata"))) e8b[2];
+int __attribute__((common)) c8[2];
+int __attribute__((nocommon)) g8a[2];
+int g8b[2] = { 1, 2 };
+int __attribute__((section(".sdata"))) g8c[2] = { 1, 2 };
+
+int f32a (void) { return l4a; }
+int f32b (void) { return l4b; }
+int f32c (void) { return l4c; }
+int f32d (void) { return e4a; }
+int f32e (void) { return e4b; }
+int f32f (void) { return c4; }
+int f32g (void) { return g4a; }
+int f32h (void) { return g4b; }
+int f32i (void) { return g4c; }
+
+int f64a (void) { return l8a[0]; }
+int f64b (void) { return l8b[0]; }
+int f64c (void) { return l8c[0]; }
+int f64d (void) { return e8a[0]; }
+int f64e (void) { return e8b[0]; }
+int f64f (void) { return c8[0]; }
+int f64g (void) { return g8a[0]; }
+int f64h (void) { return g8b[0]; }
+int f64i (void) { return g8c[0]; }