aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20030105-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20030105-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20030105-1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20030105-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20030105-1.c
new file mode 100644
index 000000000..19f3b2ddb
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20030105-1.c
@@ -0,0 +1,20 @@
+int __attribute__ ((noinline))
+foo ()
+{
+ const int a[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+ int i, sum;
+
+ sum = 0;
+ for (i = 0; i < sizeof (a) / sizeof (*a); i++)
+ sum += a[i];
+
+ return sum;
+}
+
+int
+main ()
+{
+ if (foo () != 28)
+ abort ();
+ exit (0);
+}