summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-25 13:36:19 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-25 13:36:19 +0000
commite0f97db9eb84d304602eb35815ba9d188cd69e46 (patch)
tree84bddb2ec09b31241a95c5b1ded74d60cdff6239 /gcc/testsuite/gcc.dg
parentf80df6b2af919960ad08a6f1901ddebb654f981b (diff)
downloadgcc-e0f97db9eb84d304602eb35815ba9d188cd69e46.tar.gz
2008-03-24 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r133512 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dD-M.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dM-M.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dN-M.c4
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr34692.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr26222.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp6
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect.exp6
15 files changed, 84 insertions, 17 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dD-M.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dD-M.c
index 1bc7916fcd3..d1a3b8f0922 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dD-M.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dD-M.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. */
+/* Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
/* { dg-options "-dD -M" } */
@@ -12,4 +12,4 @@ int variable;
/* { dg-final { scan-file-not cmdlne-dD-M.i "(^|\\n)#define foo bar($|\\n)" } }
{ dg-final { scan-file-not cmdlne-dD-M.i "variable" } }
- { dg-final { scan-file-not cmdlne-dD-M.i "(^|\n)cmdlne-dD-M.*:.*cmdlne-dD-M.c" { xfail *-*-* } } } */
+ { dg-final { scan-file cmdlne-dD-M.i "(^|\n)cmdlne-dD-M\[^\\n\]*:( *\\\\\\n)?\[^\\n\]*cmdlne-dD-M.c" } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.c
index a30b4bc12db..db08a72b4b1 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. */
+/* Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
/* { dg-options "-dI -M" } */
@@ -13,4 +13,4 @@ int variable;
/* { dg-final { scan-file-not cmdlne-dI-M.i "(^|\\n)#define foo bar($|\\n)" } }
{ dg-final { scan-file-not cmdlne-dI-M.i "variable" } }
- { dg-final { scan-file cmdlne-dI-M.i "(^|\\n)cmdlne-dI-M.*:\[^\\n\]*cmdlne-dI-M.c" } } */
+ { dg-final { scan-file cmdlne-dI-M.i "(^|\\n)cmdlne-dI-M\[^\\n\]*:( *\\\\\\n)?\[^\\n\]*cmdlne-dI-M.c" } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dM-M.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dM-M.c
index 193168e940f..0cd9011042a 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dM-M.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dM-M.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. */
+/* Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
/* { dg-options "-dM -M" } */
@@ -12,4 +12,4 @@ int variable;
/* { dg-final { scan-file cmdlne-dM-M.i "(^|\\n)#define foo bar($|\\n)" } }
{ dg-final { scan-file-not cmdlne-dM-M.i "variable" } }
- { dg-final { scan-file cmdlne-dM-M.i "(^|\\n)cmdlne-dM-M\[^\\n\]*:\[^\\n\]*cmdlne-dM-M.c"} } */
+ { dg-final { scan-file cmdlne-dM-M.i "(^|\\n)cmdlne-dM-M\[^\\n\]*:( *\\\\\\n)?\[^\\n\]*cmdlne-dM-M.c"} } */
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dN-M.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dN-M.c
index 7d8c16b1c95..2182e370cc2 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dN-M.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dN-M.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. */
+/* Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
/* { dg-options "-dN -M" } */
@@ -12,4 +12,4 @@ int variable;
/* { dg-final { scan-file-not cmdlne-dN-M.i "(^|\\n)#define foo" } }
{ dg-final { scan-file-not cmdlne-dN-M.i "variable" } }
- { dg-final { scan-file cmdlne-dN-M.i "(^|\\n)cmdlne-dM-M\[^\\n\]*:\[^\\n\]*cmdlne-dM-M.c" { xfail *-*-* } } } */
+ { dg-final { scan-file cmdlne-dN-M.i "(^|\\n)cmdlne-dN-M\[^\\n\]*:( *\\\\\\n)?\[^\\n\]*cmdlne-dN-M.c" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/pr34692.c b/gcc/testsuite/gcc.dg/gomp/pr34692.c
index 0e1a1eb827f..cc93914b6c1 100644
--- a/gcc/testsuite/gcc.dg/gomp/pr34692.c
+++ b/gcc/testsuite/gcc.dg/gomp/pr34692.c
@@ -24,3 +24,5 @@ b
cde f g h);
}
}
+
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr26222.c b/gcc/testsuite/gcc.dg/torture/pr26222.c
new file mode 100644
index 00000000000..b580db67354
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr26222.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-fno-tree-pre -fno-tree-loop-im" } */
+
+void putShort (int, int);
+
+int t2;
+void f(int t1)
+{
+ int clutOffset = 52 + 256 * 3 * 2;
+ int x, y, z;
+ for (x = 0; x < 16; x++)
+ for (y = 0; y < 16; y++)
+ for (z = 0; z < 16; z++)
+ {
+ int offset = clutOffset + z * 6 + y * 16 * 6 + x * 16 * 16 * 6;
+ double xf = ((double) x) / ((double) 16 - 1.0);
+ double tt = xf;
+ putShort(offset, tt);
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c
new file mode 100644
index 00000000000..7d769ae176a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+int foo(void)
+{
+ int i = 0;
+ char *p = (char *)&i;
+ return *(int *)p;
+}
+
+struct Foo {
+ int i;
+} f;
+
+int bar(void)
+{
+ char *p = (char *)&f;
+ return ((struct Foo *)p)->i;
+}
+
+const struct Foo g;
+
+int foobar(void)
+{
+ struct Foo *p = (struct Foo *)&g;
+ return ((const struct Foo *)p)->i;
+}
+
+/* { dg-final { scan-tree-dump "= i;" "ccp1" } } */
+/* { dg-final { scan-tree-dump "= f.i;" "ccp1" } } */
+/* { dg-final { scan-tree-dump "= g.i;" "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c
index bfd8692e72e..91956017898 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-lim-details -fdump-tree-optimized" } */
+/* { dg-options "-O -fdump-tree-lim-details" } */
struct { int x; int y; } global;
void foo(int n)
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c
index 2766ced2871..5627c265523 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c
@@ -3,8 +3,8 @@
#include <stdlib.h>
#include "../../tree-vect.h"
-__attribute__ ((noinline))
-void interp_pitch(float *exc, float *interp, int pitch, int len)
+__attribute__ ((noinline)) void
+interp_pitch(float *exc, float *interp, int pitch, int len)
{
int i,k;
int maxj;
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp
index 4ffdf99c446..dbf3b035d8e 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp
@@ -39,7 +39,11 @@ global dg-do-what-default
set save-dg-do-what-default ${dg-do-what-default}
lappend DEFAULT_VECTCFLAGS "-msse2"
-set dg-do-what-default run
+if [check_sse2_hw_available] {
+ set dg-do-what-default run
+} else {
+ set dg-do-what-default compile
+}
# Initialize `dg'.
dg-init
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c
index 9a9f97e802b..00e631b1366 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include "../../tree-vect.h"
-__attribute__ ((noinline)) void
+__attribute__ ((noinline)) void
interp_pitch(float *exc, float *interp, int pitch, int len)
{
int i,k;
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c
index 0bc09f6da32..5627c265523 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include "../../tree-vect.h"
-__attribute__ ((noinline)) void
+__attribute__ ((noinline)) void
interp_pitch(float *exc, float *interp, int pitch, int len)
{
int i,k;
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c
index 436dff16eb0..55334fdd20d 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c
@@ -47,5 +47,5 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
index ce970ae1752..66587e10905 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
@@ -40,7 +40,11 @@ global dg-do-what-default
set save-dg-do-what-default ${dg-do-what-default}
lappend DEFAULT_VECTCFLAGS "-msse2"
-set dg-do-what-default run
+if [check_sse2_hw_available] {
+ set dg-do-what-default run
+} else {
+ set dg-do-what-default compile
+}
# Initialize `dg'.
dg-init
diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp
index 04fbc0178d9..18877095fa9 100644
--- a/gcc/testsuite/gcc.dg/vect/vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/vect.exp
@@ -63,7 +63,11 @@ if [istarget "powerpc-*paired*"] {
set dg-do-what-default run
} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
lappend DEFAULT_VECTCFLAGS "-msse2"
- set dg-do-what-default run
+ if [check_sse2_hw_available] {
+ set dg-do-what-default run
+ } else {
+ set dg-do-what-default compile
+ }
} elseif { [istarget "mips*-*-*"]
&& [check_effective_target_mpaired_single]
&& [check_effective_target_nomips16] } {