summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr37106-2.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-07 10:31:59 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-07 10:31:59 +0000
commit1daf16ed0885573ec41bb4eb00f25c165ba9cf26 (patch)
tree8abab63378b6af81c6c73b90c8da3e67745ef5d0 /gcc/testsuite/gcc.dg/pr37106-2.c
parent2b2b3bd8d96c3193c8d9bc606ee1b5b3c9b47000 (diff)
downloadgcc-1daf16ed0885573ec41bb4eb00f25c165ba9cf26.tar.gz
2008-11-07 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r141668 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@141672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr37106-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr37106-2.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr37106-2.c b/gcc/testsuite/gcc.dg/pr37106-2.c
new file mode 100644
index 00000000000..81f061afab2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr37106-2.c
@@ -0,0 +1,27 @@
+/* PR c/37106 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-options "-O3 -fpic" { target fpic } } */
+
+#define SIZE 256
+float a[SIZE], b[SIZE], c[SIZE];
+
+void non_opt3 (void) __attribute__((__optimize__(1)));
+
+void
+not_opt3 (void)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ a[i] = b[i] - c[i];
+}
+
+void
+opt3 (void)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ a[i] = b[i] + c[i];
+}