diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg')
172 files changed, 456 insertions, 107 deletions
diff --git a/gcc/testsuite/gcc.dg/20001117-1.c b/gcc/testsuite/gcc.dg/20001117-1.c index a9de496e276..1b24300da8e 100644 --- a/gcc/testsuite/gcc.dg/20001117-1.c +++ b/gcc/testsuite/gcc.dg/20001117-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2 -finstrument-functions" } */ +/* { dg-require-effective-target return_address } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/20020312-2.c b/gcc/testsuite/gcc.dg/20020312-2.c index 71201fee26b..5fce50dfaf2 100644 --- a/gcc/testsuite/gcc.dg/20020312-2.c +++ b/gcc/testsuite/gcc.dg/20020312-2.c @@ -7,6 +7,7 @@ /* { dg-do run } */ /* { dg-options "-O -fno-pic" } */ +/* { dg-require-effective-target nonlocal_goto } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/20020415-1.c b/gcc/testsuite/gcc.dg/20020415-1.c index 7d5b5aebdea..46a1bbddc30 100644 --- a/gcc/testsuite/gcc.dg/20020415-1.c +++ b/gcc/testsuite/gcc.dg/20020415-1.c @@ -3,6 +3,7 @@ ASM_SIMPLIFY_DWARF_ADDR hook. */ /* { dg-do compile { target fpic } } */ /* { dg-options "-O2 -fpic -g" } */ +/* { dg-require-effective-target alloca } */ static inline char * bar (unsigned long x, char *y) diff --git a/gcc/testsuite/gcc.dg/20030107-1.c b/gcc/testsuite/gcc.dg/20030107-1.c index 9264eba701e..91640807efd 100644 --- a/gcc/testsuite/gcc.dg/20030107-1.c +++ b/gcc/testsuite/gcc.dg/20030107-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fprofile-arcs" } */ +/* { dg-require-profiling "-fprofile-generate" } */ extern void bar(void) __attribute__((noreturn)); int foo (void) { bar(); } diff --git a/gcc/testsuite/gcc.dg/20030331-2.c b/gcc/testsuite/gcc.dg/20030331-2.c index 2fce78ea97c..5dc164fc4fe 100644 --- a/gcc/testsuite/gcc.dg/20030331-2.c +++ b/gcc/testsuite/gcc.dg/20030331-2.c @@ -1,4 +1,5 @@ // { dg-options "" } +/* { dg-require-effective-target alloca } */ extern int printf (const char *, ...); diff --git a/gcc/testsuite/gcc.dg/20030702-1.c b/gcc/testsuite/gcc.dg/20030702-1.c index 1516a5a471d..0bc1b1c88e1 100644 --- a/gcc/testsuite/gcc.dg/20030702-1.c +++ b/gcc/testsuite/gcc.dg/20030702-1.c @@ -3,6 +3,7 @@ /* { dg-do compile { target fpic } } */ /* { dg-options "-O2 -fpic -fprofile-arcs" } */ /* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */ +/* { dg-require-profiling "-fprofile-generate" } */ int fork (void); diff --git a/gcc/testsuite/gcc.dg/20050325-1.c b/gcc/testsuite/gcc.dg/20050325-1.c index 5760e387a22..db288ee8f69 100644 --- a/gcc/testsuite/gcc.dg/20050325-1.c +++ b/gcc/testsuite/gcc.dg/20050325-1.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fprofile-arcs" } */ +/* { dg-require-profiling "-fprofile-generate" } */ extern int *g (int x, void* y); extern void fg (long long x, int y); diff --git a/gcc/testsuite/gcc.dg/20101010-1.c b/gcc/testsuite/gcc.dg/20101010-1.c index cd8fddf62d2..2067012ebcd 100644 --- a/gcc/testsuite/gcc.dg/20101010-1.c +++ b/gcc/testsuite/gcc.dg/20101010-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fno-crossjumping" } */ +/* { dg-require-effective-target alloca } */ int bar1 (); int bar2 (); diff --git a/gcc/testsuite/gcc.dg/Wno-frame-address.c b/gcc/testsuite/gcc.dg/Wno-frame-address.c index f48b91a2bcb..cef924ea0a3 100644 --- a/gcc/testsuite/gcc.dg/Wno-frame-address.c +++ b/gcc/testsuite/gcc.dg/Wno-frame-address.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "Cannot access arbitrary stack frames." { arm*-*-* } } */ /* { dg-options "-Werror" } */ /* Verify that -Wframe-address is not enabled by default by enabling diff --git a/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c b/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c index 66be5a5c4b2..ebdef690879 100644 --- a/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c +++ b/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c @@ -1,6 +1,7 @@ /* Test -Wsizeof-pointer-memaccess warnings. */ /* { dg-do compile } */ /* { dg-options "-Wall -Wno-sizeof-array-argument" } */ +/* { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; extern void bzero (void *, size_t); diff --git a/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c b/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c index e9f63d36872..87f5ef9d171 100644 --- a/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c +++ b/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c @@ -1,6 +1,7 @@ /* PR 41673: bogus -Wstrict-aliasing warning from VLA dereference. */ /* { dg-do compile } */ /* { dg-options "-std=gnu99 -O2 -Wall" } */ +/* { dg-require-effective-target alloca } */ int main(int argc, char *argv[]) { diff --git a/gcc/testsuite/gcc.dg/autopar/pr46193.c b/gcc/testsuite/gcc.dg/autopar/pr46193.c new file mode 100644 index 00000000000..544a5dabcec --- /dev/null +++ b/gcc/testsuite/gcc.dg/autopar/pr46193.c @@ -0,0 +1,38 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */ + +extern void abort (void); + +char * +foo (int count, char **list) +{ + char *minaddr = list[0]; + int i; + + for (i = 0; i < count; i++) + { + char *addr = list[i]; + if (addr < minaddr) + minaddr = addr; + } + + return minaddr; +} + +char * +foo2 (int count, char **list) +{ + char *maxaddr = list[0]; + int i; + + for (i = 0; i < count; i++) + { + char *addr = list[i]; + if (addr > maxaddr) + maxaddr = addr; + } + + return maxaddr; +} + +/* { dg-final { scan-tree-dump-times "parallelizing inner loop" 2 "parloops" } } */ diff --git a/gcc/testsuite/gcc.dg/builtin-return-1.c b/gcc/testsuite/gcc.dg/builtin-return-1.c index 68fd0556b3d..0aa0afd88a7 100644 --- a/gcc/testsuite/gcc.dg/builtin-return-1.c +++ b/gcc/testsuite/gcc.dg/builtin-return-1.c @@ -2,6 +2,7 @@ /* Originator: Andrew Church <gcczilla@achurch.org> */ /* { dg-do run } */ /* { dg-xfail-run-if "PR36571 untyped return is char register" { "avr-*-*" } { "*" } { "" } } */ +/* { dg-require-effective-target alloca } */ /* This used to fail on SPARC because the (undefined) return value of 'bar' was overwriting that of 'foo'. */ diff --git a/gcc/testsuite/gcc.dg/builtins-64.c b/gcc/testsuite/gcc.dg/builtins-64.c index 6e84633d591..3c04c44a677 100644 --- a/gcc/testsuite/gcc.dg/builtins-64.c +++ b/gcc/testsuite/gcc.dg/builtins-64.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target alloca } */ int main () { diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-13.c b/gcc/testsuite/gcc.dg/c99-const-expr-13.c index 0ee525bec61..e477e5d162d 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-13.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-13.c @@ -3,6 +3,7 @@ /* Origin: Joseph Myers <joseph@codesourcery.com> */ /* { dg-do compile } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors -frounding-math" } */ +/* { dg-require-effective-target alloca } */ void f (void) diff --git a/gcc/testsuite/gcc.dg/c99-vla-1.c b/gcc/testsuite/gcc.dg/c99-vla-1.c index 4a3a0f8e238..4501852066c 100644 --- a/gcc/testsuite/gcc.dg/c99-vla-1.c +++ b/gcc/testsuite/gcc.dg/c99-vla-1.c @@ -1,6 +1,7 @@ /* Origin: PR 3467 */ /* { dg-do compile } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ +/* { dg-require-effective-target alloca } */ void tdef (int n) diff --git a/gcc/testsuite/gcc.dg/cleanup-12.c b/gcc/testsuite/gcc.dg/cleanup-12.c index 90de90ac831..15c079f63fb 100644 --- a/gcc/testsuite/gcc.dg/cleanup-12.c +++ b/gcc/testsuite/gcc.dg/cleanup-12.c @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fexceptions" } */ /* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */ +/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */ /* Verify unwind info in presence of alloca. */ #include <unwind.h> diff --git a/gcc/testsuite/gcc.dg/cleanup-13.c b/gcc/testsuite/gcc.dg/cleanup-13.c index 5a0d4c69f5a..0ab1ca27650 100644 --- a/gcc/testsuite/gcc.dg/cleanup-13.c +++ b/gcc/testsuite/gcc.dg/cleanup-13.c @@ -2,6 +2,7 @@ /* { dg-do run } */ /* { dg-options "-fexceptions" } */ /* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */ +/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */ /* Verify DW_OP_* handling in the unwinder. */ #include <unwind.h> diff --git a/gcc/testsuite/gcc.dg/cleanup-5.c b/gcc/testsuite/gcc.dg/cleanup-5.c index c335c1e4492..816d4cef0c1 100644 --- a/gcc/testsuite/gcc.dg/cleanup-5.c +++ b/gcc/testsuite/gcc.dg/cleanup-5.c @@ -2,6 +2,7 @@ /* { dg-do run } */ /* { dg-options "-fexceptions" } */ /* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */ +/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */ /* Verify that cleanups work with exception handling. */ #include <unwind.h> diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-22_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-22_main.c index 1fd2eba1c7f..db6ab56ab7d 100644 --- a/gcc/testsuite/gcc.dg/compat/struct-by-value-22_main.c +++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-22_main.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ /* Test variable sized function argument passing. GCC 3.2 and earlier is incompatible with GCC 3.3+ on x86-64, the latter passes variable sized arguments by reference while diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c index b6ae34e0003..80c7355a50e 100644 --- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c +++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c @@ -805,12 +805,7 @@ int main (void)\n\ #define TX(n, type, attrs, fields, ops) test##n ();\n\ #include \"t%03d_test.h\"\n\ #undef TX\n\ - if (fails)\n\ - {\n\ - fflush (stdout);\n\ - abort ();\n\ - }\n\ - exit (0);\n\ + exit (fails != 0);\n\ }\n", filecnt, filecnt); fclose (outfile); sprintf (destptr, "t%03d_x.c", filecnt); diff --git a/gcc/testsuite/gcc.dg/constructor-1.c b/gcc/testsuite/gcc.dg/constructor-1.c index 1095a455cfa..73e9fc32007 100644 --- a/gcc/testsuite/gcc.dg/constructor-1.c +++ b/gcc/testsuite/gcc.dg/constructor-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-skip-if "" { ! global_constructor } { "*" } { "" } } */ /* The ipa-split pass pulls the body of the if(!x) block into a separate function to make foo a better inlining diff --git a/gcc/testsuite/gcc.dg/cpp/digraphs.c b/gcc/testsuite/gcc.dg/cpp/digraphs.c index 49a1bcd8604..55bc46b061f 100644 --- a/gcc/testsuite/gcc.dg/cpp/digraphs.c +++ b/gcc/testsuite/gcc.dg/cpp/digraphs.c @@ -8,7 +8,11 @@ extern int strcmp (const char *, const char *); extern void abort (void); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif #define err(str) do { puts(str); abort(); } while (0) %:define glue(x, y) x %:%: y /* #define glue(x, y) x ## y. */ diff --git a/gcc/testsuite/gcc.dg/cpp/lexnum.c b/gcc/testsuite/gcc.dg/cpp/lexnum.c index 7df15540833..3d7a9a8ddf8 100644 --- a/gcc/testsuite/gcc.dg/cpp/lexnum.c +++ b/gcc/testsuite/gcc.dg/cpp/lexnum.c @@ -5,7 +5,11 @@ /* Test lexing of numbers. */ +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) diff --git a/gcc/testsuite/gcc.dg/cpp/lexstrng.c b/gcc/testsuite/gcc.dg/cpp/lexstrng.c index b0353300395..9e13cd5fa33 100644 --- a/gcc/testsuite/gcc.dg/cpp/lexstrng.c +++ b/gcc/testsuite/gcc.dg/cpp/lexstrng.c @@ -11,7 +11,11 @@ typedef __WCHAR_TYPE__ wchar_t; extern int strcmp (const char *, const char *); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) diff --git a/gcc/testsuite/gcc.dg/cpp/macro1.c b/gcc/testsuite/gcc.dg/cpp/macro1.c index e7235f577c2..a2b1a38e295 100644 --- a/gcc/testsuite/gcc.dg/cpp/macro1.c +++ b/gcc/testsuite/gcc.dg/cpp/macro1.c @@ -4,7 +4,11 @@ /* Tests various macro abuse is correctly expanded. */ +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); extern int strcmp(const char *s1, const char *s2); diff --git a/gcc/testsuite/gcc.dg/cpp/multiline-2.c b/gcc/testsuite/gcc.dg/cpp/multiline-2.c index 6a674b4dcd1..2841e00fb3b 100644 --- a/gcc/testsuite/gcc.dg/cpp/multiline-2.c +++ b/gcc/testsuite/gcc.dg/cpp/multiline-2.c @@ -9,6 +9,6 @@ const char *p = "line 1 " ""; /* The compiler front end sees this. */ -/* { dg-error "missing term" "multiline strings" { target *-*-* } 8 } */ +/* { dg-error "17:missing term" "multiline strings" { target *-*-* } 8 } */ /* { dg-error "missing term" "multiline strings" { target *-*-* } 9 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/paste2.c b/gcc/testsuite/gcc.dg/cpp/paste2.c index 788e4eb51d3..b9bc7c2a8d0 100644 --- a/gcc/testsuite/gcc.dg/cpp/paste2.c +++ b/gcc/testsuite/gcc.dg/cpp/paste2.c @@ -12,7 +12,11 @@ typedef __WCHAR_TYPE__ wchar_t; extern int strcmp (const char *, const char *); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) diff --git a/gcc/testsuite/gcc.dg/cpp/strify3.c b/gcc/testsuite/gcc.dg/cpp/strify3.c index 5d76b5e750f..b2ee4ab5562 100644 --- a/gcc/testsuite/gcc.dg/cpp/strify3.c +++ b/gcc/testsuite/gcc.dg/cpp/strify3.c @@ -9,7 +9,11 @@ Neil Booth, 24 Sep 2001. */ extern int strcmp (const char *, const char *); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) diff --git a/gcc/testsuite/gcc.dg/cpp/strify4.c b/gcc/testsuite/gcc.dg/cpp/strify4.c index b8b2f11e9d1..9b4c0ddf4f1 100644 --- a/gcc/testsuite/gcc.dg/cpp/strify4.c +++ b/gcc/testsuite/gcc.dg/cpp/strify4.c @@ -4,7 +4,11 @@ Andrew Pinski */ extern int strcmp (const char *, const char *); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) diff --git a/gcc/testsuite/gcc.dg/debug/debug.exp b/gcc/testsuite/gcc.dg/debug/debug.exp index 908deb16a8d..ac162ae64b4 100644 --- a/gcc/testsuite/gcc.dg/debug/debug.exp +++ b/gcc/testsuite/gcc.dg/debug/debug.exp @@ -19,6 +19,11 @@ # Load support procs. load_lib gcc-dg.exp +# Disable on ptx +if { [istarget nvptx-*-*] } { + return +} + # Initialize `dg'. dg-init diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp index d17bb5ee448..9063eb1d3a5 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp @@ -19,6 +19,11 @@ # Load support procs. load_lib gcc-dg.exp +# Disable on ptx +if { [istarget nvptx-*-*] } { + return +} + # If a testcase doesn't have special options, use these. global DEFAULT_CFLAGS if ![info exists DEFAULT_CFLAGS] then { diff --git a/gcc/testsuite/gcc.dg/dollar.c b/gcc/testsuite/gcc.dg/dollar.c index 43407f227ed..e69c4e2ec83 100644 --- a/gcc/testsuite/gcc.dg/dollar.c +++ b/gcc/testsuite/gcc.dg/dollar.c @@ -6,4 +6,4 @@ /* Test that -fno-dollars-in-identifiers is honoured. Neil Booth, 17 May 2003. */ -int foobar$; /* { dg-error "stray '\\$'" } */ +int foobar$; /* { dg-error "11:stray '\\$'" } */ diff --git a/gcc/testsuite/gcc.dg/fold-alloca-1.c b/gcc/testsuite/gcc.dg/fold-alloca-1.c index 9cace17c500..733aeecca30 100644 --- a/gcc/testsuite/gcc.dg/fold-alloca-1.c +++ b/gcc/testsuite/gcc.dg/fold-alloca-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fdump-tree-cfg" } */ +/* { dg-require-effective-target alloca } */ void *alloca (__SIZE_TYPE__); void link_error (); diff --git a/gcc/testsuite/gcc.dg/fork-instrumentation.c b/gcc/testsuite/gcc.dg/fork-instrumentation.c index f875e180882..aedb9ee797e 100644 --- a/gcc/testsuite/gcc.dg/fork-instrumentation.c +++ b/gcc/testsuite/gcc.dg/fork-instrumentation.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O0 -fprofile-generate" } */ +/* { dg-require-profiling "-fprofile-generate" } */ + int fork(void); int t() diff --git a/gcc/testsuite/gcc.dg/gomp/pr30494.c b/gcc/testsuite/gcc.dg/gomp/pr30494.c index 6a042ce6974..fa6d7ffc696 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr30494.c +++ b/gcc/testsuite/gcc.dg/gomp/pr30494.c @@ -1,5 +1,6 @@ /* PR middle-end/30494 */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ int foo (int n) diff --git a/gcc/testsuite/gcc.dg/gomp/pr34610.c b/gcc/testsuite/gcc.dg/gomp/pr34610.c index 85db164b529..232fa18323b 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr34610.c +++ b/gcc/testsuite/gcc.dg/gomp/pr34610.c @@ -1,6 +1,7 @@ /* PR gcov-profile/34610 */ /* { dg-do compile } */ /* { dg-options "-O2 -fprofile-arcs -fopenmp" } */ +/* { dg-require-profiling "-fprofile-generate" } */ extern void bar (int); extern void baz (int) __attribute__((noreturn)); diff --git a/gcc/testsuite/gcc.dg/gomp/static-chunk-size-one.c b/gcc/testsuite/gcc.dg/gomp/static-chunk-size-one.c new file mode 100644 index 00000000000..e82de772deb --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/static-chunk-size-one.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-fopenmp -O2 -fdump-tree-optimized -fno-tree-pre" } */ + +int +bar () +{ + int a = 0, i; + +#pragma omp parallel for num_threads (3) reduction (+:a) schedule(static, 1) + for (i = 0; i < 10; i++) + a += i; + + return a; +} + +/* Two phis for reduction, one in loop header, one in loop exit. One phi for iv + in loop header. */ +/* { dg-final { scan-tree-dump-times "PHI" 3 "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/gomp/vla-2.c b/gcc/testsuite/gcc.dg/gomp/vla-2.c index fc18ffc5743..ea7c652553a 100644 --- a/gcc/testsuite/gcc.dg/gomp/vla-2.c +++ b/gcc/testsuite/gcc.dg/gomp/vla-2.c @@ -1,4 +1,5 @@ // { dg-do compile } +/* { dg-require-effective-target alloca } */ void foo(int n, int i) { diff --git a/gcc/testsuite/gcc.dg/gomp/vla-3.c b/gcc/testsuite/gcc.dg/gomp/vla-3.c index b1677b833ef..5070907f1e7 100644 --- a/gcc/testsuite/gcc.dg/gomp/vla-3.c +++ b/gcc/testsuite/gcc.dg/gomp/vla-3.c @@ -1,4 +1,5 @@ // { dg-do compile } +/* { dg-require-effective-target alloca } */ void foo(int n, int i) { diff --git a/gcc/testsuite/gcc.dg/gomp/vla-4.c b/gcc/testsuite/gcc.dg/gomp/vla-4.c index 2c3c0aa43b7..e784c74058c 100644 --- a/gcc/testsuite/gcc.dg/gomp/vla-4.c +++ b/gcc/testsuite/gcc.dg/gomp/vla-4.c @@ -1,4 +1,5 @@ // { dg-do compile } +/* { dg-require-effective-target alloca } */ void foo(int n, int i) { diff --git a/gcc/testsuite/gcc.dg/gomp/vla-5.c b/gcc/testsuite/gcc.dg/gomp/vla-5.c index 6c6d5517af8..20be204a5e1 100644 --- a/gcc/testsuite/gcc.dg/gomp/vla-5.c +++ b/gcc/testsuite/gcc.dg/gomp/vla-5.c @@ -1,4 +1,5 @@ // { dg-do compile } +/* { dg-require-effective-target alloca } */ void foo(int n, int i) { diff --git a/gcc/testsuite/gcc.dg/graphite/block-0.c b/gcc/testsuite/gcc.dg/graphite/block-0.c index 45a1d17eac2..cb08a5fe56f 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-0.c +++ b/gcc/testsuite/gcc.dg/graphite/block-0.c @@ -42,4 +42,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-not "will be loop blocked" "graphite" } } */ +/* { dg-final { scan-tree-dump-times "not tiled" 3 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-1.c b/gcc/testsuite/gcc.dg/graphite/block-1.c index 2208eb9d16b..19f9f20c3bc 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-1.c +++ b/gcc/testsuite/gcc.dg/graphite/block-1.c @@ -45,4 +45,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 3 "graphite" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 5 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-3.c b/gcc/testsuite/gcc.dg/graphite/block-3.c index d4fd62db7eb..fd0e661696a 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-3.c +++ b/gcc/testsuite/gcc.dg/graphite/block-3.c @@ -17,7 +17,7 @@ foo (void) { int i, j, k; - /* These loops contain too few iterations to be blocked by 64. */ + /* These loops contain too few iterations to be blocked. */ for (i = 0; i < 24; i++) for (j = 0; j < 24; j++) for (k = 0; k < 24; k++) @@ -58,4 +58,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-4.c b/gcc/testsuite/gcc.dg/graphite/block-4.c index e383a66e582..744b481eaf0 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-4.c +++ b/gcc/testsuite/gcc.dg/graphite/block-4.c @@ -16,7 +16,7 @@ foo (void) { int i, j, k; - /* This should NOT be blocked: each loop iterates only 24 times. */ + /* This should NOT be blocked. */ for (i = 0; i < 24; i++) for (j = 0; j < 24; j++) for (k = 0; k < 24; k++) @@ -57,4 +57,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 7 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-5.c b/gcc/testsuite/gcc.dg/graphite/block-5.c index 60b7d0968c1..d30abf80fda 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-5.c +++ b/gcc/testsuite/gcc.dg/graphite/block-5.c @@ -53,4 +53,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-6.c b/gcc/testsuite/gcc.dg/graphite/block-6.c index 47fee896095..9f03448b957 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-6.c +++ b/gcc/testsuite/gcc.dg/graphite/block-6.c @@ -48,4 +48,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 0 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-7.c b/gcc/testsuite/gcc.dg/graphite/block-7.c index c07bae0652d..8b54e267078 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-7.c +++ b/gcc/testsuite/gcc.dg/graphite/block-7.c @@ -54,4 +54,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 6 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-8.c b/gcc/testsuite/gcc.dg/graphite/block-8.c index 0e9b02c52ae..d3fdf849d59 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-8.c +++ b/gcc/testsuite/gcc.dg/graphite/block-8.c @@ -55,4 +55,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 7 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/block-pr47654.c b/gcc/testsuite/gcc.dg/graphite/block-pr47654.c index 358c49a64d0..a7453c5e9a6 100644 --- a/gcc/testsuite/gcc.dg/graphite/block-pr47654.c +++ b/gcc/testsuite/gcc.dg/graphite/block-pr47654.c @@ -21,4 +21,4 @@ main () return 0; } -/* { dg-final { scan-tree-dump-not "will be loop blocked" "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 1 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp index 9e7ede69253..f2d1417d87e 100644 --- a/gcc/testsuite/gcc.dg/graphite/graphite.exp +++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp @@ -41,10 +41,10 @@ set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c ] ] set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.c ] ] set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ] set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ] -set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c \ - $srcdir/$subdir/uns-interchange-*.c ] ] -set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.c \ - $srcdir/$subdir/uns-block-*.c ] ] +set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c \ + $srcdir/$subdir/uns-interchange-*.c \ + $srcdir/$subdir/block-*.c \ + $srcdir/$subdir/uns-block-*.c ] ] set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.c ] ] # Tests to be compiled. @@ -55,8 +55,7 @@ dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math" # Tests to be run. set dg-do-what-default run dg-runtest $run_id_files "" "-O2 -fgraphite-identity" -dg-runtest $interchange_files "" "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all" -dg-runtest $block_files "" "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all" +dg-runtest $opt_files "" "-O2 -ffast-math -floop-nest-optimize -fdump-tree-graphite-all" # Vectorizer tests, to be run or compiled, depending on target capabilities. global DEFAULT_VECTCFLAGS @@ -71,8 +70,7 @@ set dg-do-what-default compile foreach f $scop_files {lremove wait_to_run_files $f} foreach f $id_files {lremove wait_to_run_files $f} foreach f $run_id_files {lremove wait_to_run_files $f} -foreach f $interchange_files {lremove wait_to_run_files $f} -foreach f $block_files {lremove wait_to_run_files $f} +foreach f $opt_files {lremove wait_to_run_files $f} foreach f $vect_files {lremove wait_to_run_files $f} dg-runtest $wait_to_run_files "" "-ansi -pedantic-errors" diff --git a/gcc/testsuite/gcc.dg/graphite/id-pr44676.c b/gcc/testsuite/gcc.dg/graphite/id-pr44676.c index 65821edba2a..ad22cdec8a7 100644 --- a/gcc/testsuite/gcc.dg/graphite/id-pr44676.c +++ b/gcc/testsuite/gcc.dg/graphite/id-pr44676.c @@ -1,4 +1,5 @@ /* { dg-options "-O2 -fgraphite-identity -fprofile-generate" } */ +/* { dg-require-profiling "-fprofile-generate" } */ int extend_options (int h, int map, int x, int y, int dx) diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-0.c b/gcc/testsuite/gcc.dg/graphite/interchange-0.c index 5d0406853fb..2ea8f017b8e 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-0.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-0.c @@ -46,4 +46,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-1.c b/gcc/testsuite/gcc.dg/graphite/interchange-1.c index c480e83c3a3..b9f12c7d20d 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-1.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-1.c @@ -49,4 +49,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-10.c b/gcc/testsuite/gcc.dg/graphite/interchange-10.c index cbb15bde65b..29e11c72257 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-10.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-10.c @@ -46,4 +46,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 2 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 4 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-11.c b/gcc/testsuite/gcc.dg/graphite/interchange-11.c index f779fbdfd80..afd71230a63 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-11.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-11.c @@ -46,4 +46,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-12.c b/gcc/testsuite/gcc.dg/graphite/interchange-12.c index bf95fdd98ad..9d5e04c882b 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-12.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-12.c @@ -53,4 +53,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 5 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-13.c b/gcc/testsuite/gcc.dg/graphite/interchange-13.c index 69f6b60e3e0..0e722e2632e 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-13.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-13.c @@ -50,4 +50,4 @@ main (void) } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-14.c b/gcc/testsuite/gcc.dg/graphite/interchange-14.c index 46f6a6deb23..55c600247c0 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-14.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-14.c @@ -54,5 +54,4 @@ main (void) return 0; } -/* PRE destroys the perfect nest and we can't cope with that yet. */ -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 7 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-15.c b/gcc/testsuite/gcc.dg/graphite/interchange-15.c index 9f6b7aeda44..0b6829f14cf 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-15.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-15.c @@ -48,6 +48,4 @@ main (void) return 0; } -/* PRE destroys the perfect nest and we can't cope with that yet. */ -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ - +/* { dg-final { scan-tree-dump-times "tiled by" 4 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-3.c b/gcc/testsuite/gcc.dg/graphite/interchange-3.c index 33320889af8..cdc02020197 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-3.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-3.c @@ -47,4 +47,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-4.c b/gcc/testsuite/gcc.dg/graphite/interchange-4.c index 678c0ed2bde..67125658286 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-4.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-4.c @@ -46,4 +46,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-5.c b/gcc/testsuite/gcc.dg/graphite/interchange-5.c index 16cadc83b2c..339e3b75f94 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-5.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-5.c @@ -46,4 +46,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-6.c b/gcc/testsuite/gcc.dg/graphite/interchange-6.c index 708c739aaeb..78f358e9ed2 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-6.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-6.c @@ -47,4 +47,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-7.c b/gcc/testsuite/gcc.dg/graphite/interchange-7.c index 3281e7e83bf..d99a16a291a 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-7.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-7.c @@ -46,4 +46,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-8.c b/gcc/testsuite/gcc.dg/graphite/interchange-8.c index 49cfbc88e58..123106bb475 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-8.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-8.c @@ -82,4 +82,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 2 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 5 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-9.c b/gcc/testsuite/gcc.dg/graphite/interchange-9.c index b023ea8a907..e4c54ae181d 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-9.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-9.c @@ -44,4 +44,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-mvt.c b/gcc/testsuite/gcc.dg/graphite/interchange-mvt.c index 8c00f8073ef..bfa5c63b9d1 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-mvt.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-mvt.c @@ -58,6 +58,4 @@ main (void) return 0; } -/* PRE destroys the perfect nest and we can't cope with that yet. */ -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ - +/* { dg-final { scan-tree-dump-times "tiled by" 7 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/pr37485.c b/gcc/testsuite/gcc.dg/graphite/pr37485.c index 9543ce4fd54..0a6dfbceefc 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr37485.c +++ b/gcc/testsuite/gcc.dg/graphite/pr37485.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all" } */ +/* { dg-options "-O2 -floop-block -ffast-math -fdump-tree-graphite-all" } */ typedef unsigned char UChar; typedef int Int32; @@ -30,4 +30,5 @@ void fallbackSort ( UInt32* fmap, } AssertH ( j < 256, 1005 ); } -/* { dg-final { scan-tree-dump-times "Loop blocked" 1 "graphite" { xfail *-*-* }} } */ + +/* { dg-final { scan-tree-dump-times "tiled by" 1 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/pr60979.c b/gcc/testsuite/gcc.dg/graphite/pr60979.c index 66fffa5395d..ab8aa654d19 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr60979.c +++ b/gcc/testsuite/gcc.dg/graphite/pr60979.c @@ -1,4 +1,5 @@ /* { dg-options "-O -fgraphite-identity" } */ +/* { dg-require-effective-target nonlocal_goto } */ #include <setjmp.h> diff --git a/gcc/testsuite/gcc.dg/graphite/run-id-pr47653.c b/gcc/testsuite/gcc.dg/graphite/run-id-pr47653.c index b62b891d996..20fdf87565e 100644 --- a/gcc/testsuite/gcc.dg/graphite/run-id-pr47653.c +++ b/gcc/testsuite/gcc.dg/graphite/run-id-pr47653.c @@ -1,4 +1,6 @@ /* { dg-options "-O -fstack-check=generic -ftree-pre -fgraphite-identity" } */ +/* nvptx doesn't expose a stack. */ +/* { dg-skip-if "" { nvptx-*-* } { "*" } { "" } } */ int main () { diff --git a/gcc/testsuite/gcc.dg/graphite/uns-block-1.c b/gcc/testsuite/gcc.dg/graphite/uns-block-1.c index c50b7708ef7..12a62919b5f 100644 --- a/gcc/testsuite/gcc.dg/graphite/uns-block-1.c +++ b/gcc/testsuite/gcc.dg/graphite/uns-block-1.c @@ -45,4 +45,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be loop blocked" 3 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 4 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c index bd21ba9bc4b..d9c07e2fe21 100644 --- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c +++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c @@ -54,4 +54,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 4 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c index b1abd13c02e..7ef575b667d 100644 --- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c +++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c @@ -55,5 +55,4 @@ main (void) return 0; } -/* PRE destroys the perfect nest and we can't cope with that yet. */ -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 6 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c index a5a2e2781b6..0e32fd61456 100644 --- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c +++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c @@ -49,6 +49,4 @@ main (void) return 0; } -/* PRE destroys the perfect nest and we can't cope with that yet. */ -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ - +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c index 6bfd3d61f23..31b132253c6 100644 --- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c +++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c @@ -45,4 +45,4 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c index 80f67897f92..eebece38698 100644 --- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c +++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c @@ -59,6 +59,4 @@ main (void) return 0; } -/* PRE destroys the perfect nest and we can't cope with that yet. */ -/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ - +/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/guality/guality.c b/gcc/testsuite/gcc.dg/guality/guality.c index d5d950fcdac..db015e6a558 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.c +++ b/gcc/testsuite/gcc.dg/guality/guality.c @@ -1,5 +1,6 @@ /* { dg-do run { xfail *-*-* } } */ /* { dg-options "-g" } */ +/* { dg-require-effective-target alloca } */ #include "guality.h" diff --git a/gcc/testsuite/gcc.dg/ifcvt-1.c b/gcc/testsuite/gcc.dg/ifcvt-1.c new file mode 100644 index 00000000000..92bc17a9285 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ifcvt-1.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target aarch64*-*-* x86_64-*-* } } */ +/* { dg-options "-fdump-rtl-ce1 -O2" } */ + +int +foo (int x) +{ + return x > 100 ? x - 2 : x - 1; +} + +/* { dg-final { scan-rtl-dump "3 true changes made" "ce1" } } */ diff --git a/gcc/testsuite/gcc.dg/ifcvt-2.c b/gcc/testsuite/gcc.dg/ifcvt-2.c new file mode 100644 index 00000000000..e0e1728a34c --- /dev/null +++ b/gcc/testsuite/gcc.dg/ifcvt-2.c @@ -0,0 +1,17 @@ +/* { dg-do compile { target aarch64*-*-* x86_64-*-* } } */ +/* { dg-options "-fdump-rtl-ce1 -O2" } */ + + +typedef unsigned char uint8_t; +typedef unsigned int uint16_t; + +uint8_t +_xtime (const uint8_t byte, const uint16_t generator) +{ + if (byte & 0x80) + return byte ^ generator; + else + return byte << 1; +} + +/* { dg-final { scan-rtl-dump "3 true changes made" "ce1" } } */ diff --git a/gcc/testsuite/gcc.dg/ifcvt-3.c b/gcc/testsuite/gcc.dg/ifcvt-3.c new file mode 100644 index 00000000000..2e104a4ffd5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ifcvt-3.c @@ -0,0 +1,19 @@ +/* { dg-do compile { target aarch64*-*-* x86_64-*-* } } */ +/* { dg-options "-fdump-rtl-ce1 -O2" } */ + +typedef long long s64; + +int +foo (s64 a, s64 b, s64 c) +{ + s64 d = a - b; + + if (d == 0) + return a + c; + else + return b + d + c; +} + +/* This test can be reduced to just return a + c; */ +/* { dg-final { scan-rtl-dump "3 true changes made" "ce1" } } */ +/* { dg-final { scan-assembler-not "sub\.*\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+\.*" { target { aarch64*-*-* } } } } */ diff --git a/gcc/testsuite/gcc.dg/pr24225.c b/gcc/testsuite/gcc.dg/pr24225.c index 4161c31bf73..576802ba589 100644 --- a/gcc/testsuite/gcc.dg/pr24225.c +++ b/gcc/testsuite/gcc.dg/pr24225.c @@ -2,6 +2,7 @@ statements around s[b]. */ /* { dg-do compile } */ /* { dg-options "-O1 -fprofile-arcs" } */ +/* { dg-require-profiling "-fprofile-generate" } */ int foo (int a, int b) diff --git a/gcc/testsuite/gcc.dg/pr25682.c b/gcc/testsuite/gcc.dg/pr25682.c index e8cab1d05e5..ecf5669403d 100644 --- a/gcc/testsuite/gcc.dg/pr25682.c +++ b/gcc/testsuite/gcc.dg/pr25682.c @@ -1,6 +1,7 @@ /* PR c/25682 */ /* { dg-do compile } */ /* { dg-options "-ansi" } */ +/* { dg-require-effective-target alloca } */ /* Test whether we don't ICE on questionable constructs where offsetof should have been used instead. */ diff --git a/gcc/testsuite/gcc.dg/pr26570.c b/gcc/testsuite/gcc.dg/pr26570.c index 71c16f20744..8ce8a4465e8 100644 --- a/gcc/testsuite/gcc.dg/pr26570.c +++ b/gcc/testsuite/gcc.dg/pr26570.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fprofile-generate -fprofile-use -fopt-info" } */ +/* { dg-require-profiling "-fprofile-generate" } */ unsigned test (unsigned a, unsigned b) { diff --git a/gcc/testsuite/gcc.dg/pr27301.c b/gcc/testsuite/gcc.dg/pr27301.c index 3b5a8f55b5d..cc55c745a03 100644 --- a/gcc/testsuite/gcc.dg/pr27301.c +++ b/gcc/testsuite/gcc.dg/pr27301.c @@ -1,6 +1,7 @@ /* PR c/27301 */ /* { dg-do compile } */ /* { dg-options "-O2 -std=gnu89" } */ +/* { dg-require-effective-target alloca } */ void foo (void *ptr, long n) diff --git a/gcc/testsuite/gcc.dg/pr27531-1.c b/gcc/testsuite/gcc.dg/pr27531-1.c index 08e3f5ea245..990c183fe41 100644 --- a/gcc/testsuite/gcc.dg/pr27531-1.c +++ b/gcc/testsuite/gcc.dg/pr27531-1.c @@ -4,6 +4,8 @@ output to reference a label that had been eliminated. */ /* { dg-do link } */ /* { dg-options "-O2" } */ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + typedef struct _IO_FILE FILE; char const *RCSname; void *Locks; diff --git a/gcc/testsuite/gcc.dg/pr33238.c b/gcc/testsuite/gcc.dg/pr33238.c index 0b399041a86..993384a186d 100644 --- a/gcc/testsuite/gcc.dg/pr33238.c +++ b/gcc/testsuite/gcc.dg/pr33238.c @@ -1,6 +1,7 @@ /* PR c/33238 */ /* { dg-do compile } */ /* { dg-options "-std=gnu89" } */ +/* { dg-require-effective-target alloca } */ void reverse (void *x, int y, int z) diff --git a/gcc/testsuite/gcc.dg/pr41470.c b/gcc/testsuite/gcc.dg/pr41470.c index ddbe66e903b..7ef00861523 100644 --- a/gcc/testsuite/gcc.dg/pr41470.c +++ b/gcc/testsuite/gcc.dg/pr41470.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fexceptions" } */ +/* { dg-require-effective-target alloca } */ void cf (void *); diff --git a/gcc/testsuite/gcc.dg/pr44606.c b/gcc/testsuite/gcc.dg/pr44606.c index 3929775535e..1d0848e9c30 100644 --- a/gcc/testsuite/gcc.dg/pr44606.c +++ b/gcc/testsuite/gcc.dg/pr44606.c @@ -1,6 +1,7 @@ /* PR target/44606 */ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ #include <stdio.h> diff --git a/gcc/testsuite/gcc.dg/pr48770.c b/gcc/testsuite/gcc.dg/pr48770.c index 446389d4914..2ebe97063e3 100644 --- a/gcc/testsuite/gcc.dg/pr48770.c +++ b/gcc/testsuite/gcc.dg/pr48770.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-require-effective-target fpic } */ /* { dg-options "-O -fprofile-arcs -fPIC -fno-dce -fno-forward-propagate" } */ +/* { dg-require-profiling "-fprofile-generate" } */ int test_goto2 (int f) { diff --git a/gcc/testsuite/gcc.dg/pr49120.c b/gcc/testsuite/gcc.dg/pr49120.c index 1a65222cfec..50993e69dfd 100644 --- a/gcc/testsuite/gcc.dg/pr49120.c +++ b/gcc/testsuite/gcc.dg/pr49120.c @@ -1,6 +1,7 @@ /* PR c/49120 */ /* { dg-do compile } */ /* { dg-options "-Wall" } */ +/* { dg-require-effective-target alloca } */ int main () diff --git a/gcc/testsuite/gcc.dg/pr49551.c b/gcc/testsuite/gcc.dg/pr49551.c index 204f06deb4e..719a99d2def 100644 --- a/gcc/testsuite/gcc.dg/pr49551.c +++ b/gcc/testsuite/gcc.dg/pr49551.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -fdata-sections" } */ +/* { dg-skip-if "-fdata-sections not supported" { nvptx-*-* } { "*" } { "" } } */ int x = 1; int x; diff --git a/gcc/testsuite/gcc.dg/pr50764.c b/gcc/testsuite/gcc.dg/pr50764.c index e3b8da8670f..e0cd320db03 100644 --- a/gcc/testsuite/gcc.dg/pr50764.c +++ b/gcc/testsuite/gcc.dg/pr50764.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fsched2-use-superblocks -ftree-tail-merge" } */ +/* { dg-require-effective-target alloca } */ typedef int aligned __attribute__ ((aligned (64))); extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/pr51491-2.c b/gcc/testsuite/gcc.dg/pr51491-2.c index f2dc8df028d..429ee4e5914 100644 --- a/gcc/testsuite/gcc.dg/pr51491-2.c +++ b/gcc/testsuite/gcc.dg/pr51491-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-ccp1" } */ +/* { dg-require-effective-target alloca } */ int g (int *); diff --git a/gcc/testsuite/gcc.dg/pr51990-2.c b/gcc/testsuite/gcc.dg/pr51990-2.c index 1ced0a833a8..702bab91357 100644 --- a/gcc/testsuite/gcc.dg/pr51990-2.c +++ b/gcc/testsuite/gcc.dg/pr51990-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target alloca } */ int y; extern int foo (int, ...) __attribute__((pure)); diff --git a/gcc/testsuite/gcc.dg/pr51990.c b/gcc/testsuite/gcc.dg/pr51990.c index c7d1b537985..4f7e0e4fd37 100644 --- a/gcc/testsuite/gcc.dg/pr51990.c +++ b/gcc/testsuite/gcc.dg/pr51990.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target alloca } */ int zzz (char *s1, char *s2, int len, int *q) diff --git a/gcc/testsuite/gcc.dg/pr54121.c b/gcc/testsuite/gcc.dg/pr54121.c index b9a208ea84e..3e2c0e9bb65 100644 --- a/gcc/testsuite/gcc.dg/pr54121.c +++ b/gcc/testsuite/gcc.dg/pr54121.c @@ -3,6 +3,7 @@ /* { dg-do compile { target fpic } } */ /* { dg-options "-std=gnu99 -O -fPIC -fprofile-generate" } */ +/* { dg-require-profiling "-fprofile-generate" } */ typedef __SIZE_TYPE__ size_t; typedef unsigned char uint8_t; diff --git a/gcc/testsuite/gcc.dg/pr59011.c b/gcc/testsuite/gcc.dg/pr59011.c index 2fb8187ad55..b0d6c0f30a1 100644 --- a/gcc/testsuite/gcc.dg/pr59011.c +++ b/gcc/testsuite/gcc.dg/pr59011.c @@ -1,6 +1,7 @@ /* PR middle-end/59011 */ /* { dg-do compile } */ /* { dg-options "-std=gnu99" } */ +/* { dg-require-effective-target alloca } */ void foo (int m) diff --git a/gcc/testsuite/gcc.dg/pr59523.c b/gcc/testsuite/gcc.dg/pr59523.c index b523eaea8a1..a6c3302a683 100644 --- a/gcc/testsuite/gcc.dg/pr59523.c +++ b/gcc/testsuite/gcc.dg/pr59523.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O3" } */ /* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-require-effective-target alloca } */ int * foo (int a, int *b, int *c, int *d) diff --git a/gcc/testsuite/gcc.dg/pr61561.c b/gcc/testsuite/gcc.dg/pr61561.c index 1512f20e3d0..47d0ff0b818 100644 --- a/gcc/testsuite/gcc.dg/pr61561.c +++ b/gcc/testsuite/gcc.dg/pr61561.c @@ -1,6 +1,7 @@ /* PR c/61561. */ /* { dg-do assemble } */ /* { dg-options " -w -O2" } */ +/* { dg-require-effective-target alloca } */ int dummy (int a); diff --git a/gcc/testsuite/gcc.dg/pr61776.c b/gcc/testsuite/gcc.dg/pr61776.c index 8768c546bda..8deec9e9934 100644 --- a/gcc/testsuite/gcc.dg/pr61776.c +++ b/gcc/testsuite/gcc.dg/pr61776.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fprofile-generate" } */ +/* { dg-require-profiling "-fprofile-generate" } */ #include <setjmp.h> diff --git a/gcc/testsuite/gcc.dg/pr63186.c b/gcc/testsuite/gcc.dg/pr63186.c index 8efb750a9b2..32aa2afda9b 100644 --- a/gcc/testsuite/gcc.dg/pr63186.c +++ b/gcc/testsuite/gcc.dg/pr63186.c @@ -1,5 +1,7 @@ /* { dg-do link } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target label_values } */ + void *a; int b, c, d; diff --git a/gcc/testsuite/gcc.dg/pr63748.c b/gcc/testsuite/gcc.dg/pr63748.c index 2e5044584a6..cc353a7e5c3 100644 --- a/gcc/testsuite/gcc.dg/pr63748.c +++ b/gcc/testsuite/gcc.dg/pr63748.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Wall" } */ +/* { dg-require-effective-target nonlocal_goto } */ #include <setjmp.h> diff --git a/gcc/testsuite/gcc.dg/pr64935-2.c b/gcc/testsuite/gcc.dg/pr64935-2.c index 6921a21d76a..3b45382a825 100644 --- a/gcc/testsuite/gcc.dg/pr64935-2.c +++ b/gcc/testsuite/gcc.dg/pr64935-2.c @@ -1,6 +1,7 @@ /* PR rtl-optimization/64935 */ /* { dg-do compile } */ /* { dg-options "-O -fschedule-insns --param=max-sched-ready-insns=0 -fcompare-debug" } */ +/* { dg-require-effective-target scheduling } */ void foo (int *data, unsigned len, const int qlp_coeff[], diff --git a/gcc/testsuite/gcc.dg/pr66899.c b/gcc/testsuite/gcc.dg/pr66899.c index 1fff18153aa..23ecc539c06 100644 --- a/gcc/testsuite/gcc.dg/pr66899.c +++ b/gcc/testsuite/gcc.dg/pr66899.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-Os -fprofile-arcs" } */ +/* { dg-require-profiling "-fprofile-generate" } */ struct { diff --git a/gcc/testsuite/gcc.dg/pragma-message.c b/gcc/testsuite/gcc.dg/pragma-message.c index 0f9c6bf447b..d4d1009fdef 100644 --- a/gcc/testsuite/gcc.dg/pragma-message.c +++ b/gcc/testsuite/gcc.dg/pragma-message.c @@ -16,13 +16,13 @@ matching dg-message), dejagnu will report these as excess errors. */ #pragma message " -/* { dg-error "missing terminating" "" { target *-*-* } 18 } */ +/* { dg-error "17:missing terminating" "" { target *-*-* } 18 } */ /* { dg-warning "expected a string" "" { target *-*-* } 18 } */ #pragma message "Bad 1 -/* { dg-error "missing terminating" "" { target *-*-* } 21 } */ +/* { dg-error "17:missing terminating" "" { target *-*-* } 21 } */ /* { dg-warning "expected a string" "" { target *-*-* } 21 } */ #pragma message ("Bad 2 -/* { dg-error "missing terminating" "" { target *-*-* } 24 } */ +/* { dg-error "18:missing terminating" "" { target *-*-* } 24 } */ /* { dg-warning "expected a string" "" { target *-*-* } 24 } */ #pragma message ("Bad 3" /* { dg-warning "malformed '#pragma message" "" { target *-*-* } 27 } */ diff --git a/gcc/testsuite/gcc.dg/setjmp-1.c b/gcc/testsuite/gcc.dg/setjmp-1.c index b5c84fc8792..c5dcef24934 100644 --- a/gcc/testsuite/gcc.dg/setjmp-1.c +++ b/gcc/testsuite/gcc.dg/setjmp-1.c @@ -3,6 +3,7 @@ /* { dg-do compile } */ /* { dg-options "-O -Wclobbered -Wextra -Wall" } */ +/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */ #include <setjmp.h> diff --git a/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c b/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c index fbe6f4fd20d..b9a2af1c51b 100644 --- a/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c +++ b/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -g" } */ +/* { dg-require-effective-target alloca } */ int *p; diff --git a/gcc/testsuite/gcc.dg/stack-usage-1.c b/gcc/testsuite/gcc.dg/stack-usage-1.c index 55edc7ec61f..7864c6a282b 100644 --- a/gcc/testsuite/gcc.dg/stack-usage-1.c +++ b/gcc/testsuite/gcc.dg/stack-usage-1.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-fstack-usage" } */ +/* nvptx doesn't have a reg allocator, and hence no stack usage data. */ +/* { dg-skip-if "" { nvptx-*-* } { "*" } { "" } } */ /* This is aimed at testing basic support for -fstack-usage in the back-ends. See the SPARC back-end for example (grep flag_stack_usage_info in sparc.c). diff --git a/gcc/testsuite/gcc.dg/stack-usage-2.c b/gcc/testsuite/gcc.dg/stack-usage-2.c index df7e55f0560..c2527d27c18 100644 --- a/gcc/testsuite/gcc.dg/stack-usage-2.c +++ b/gcc/testsuite/gcc.dg/stack-usage-2.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-Wstack-usage=512" } */ +/* nvptx gets very upset with mismatched function types. */ +/* { dg-skip-if "" { nvptx-*-* } { "*" } { "" } } */ int foo1 (void) /* { dg-bogus "stack usage" } */ { diff --git a/gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c b/gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c index a82f4efbdaf..7ce9eaeb261 100644 --- a/gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c +++ b/gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c @@ -4,6 +4,7 @@ /* Test just twice, once with -O0 non-fortified, once with -O2 fortified. */ /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O2" } } */ /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ +/* { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; extern void *memset (void *, int, size_t); diff --git a/gcc/testsuite/gcc.dg/torture/calleesave-sse.c b/gcc/testsuite/gcc.dg/torture/calleesave-sse.c index 292791c7259..76db20ef67c 100644 --- a/gcc/testsuite/gcc.dg/torture/calleesave-sse.c +++ b/gcc/testsuite/gcc.dg/torture/calleesave-sse.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-fno-omit-frame-pointer" } */ +/* { dg-require-effective-target alloca } */ #define alloca __builtin_alloca extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/torture/matrix-1.c b/gcc/testsuite/gcc.dg/torture/matrix-1.c index 1b88599bdcd..7be912e356d 100644 --- a/gcc/testsuite/gcc.dg/torture/matrix-1.c +++ b/gcc/testsuite/gcc.dg/torture/matrix-1.c @@ -62,8 +62,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/matrix-2.c b/gcc/testsuite/gcc.dg/torture/matrix-2.c index 5013671af5c..8aaf7c60f75 100644 --- a/gcc/testsuite/gcc.dg/torture/matrix-2.c +++ b/gcc/testsuite/gcc.dg/torture/matrix-2.c @@ -73,8 +73,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/matrix-5.c b/gcc/testsuite/gcc.dg/torture/matrix-5.c index 9b17567f442..e8f2deb6ae6 100644 --- a/gcc/testsuite/gcc.dg/torture/matrix-5.c +++ b/gcc/testsuite/gcc.dg/torture/matrix-5.c @@ -67,8 +67,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/matrix-6.c b/gcc/testsuite/gcc.dg/torture/matrix-6.c index cad63ddabfc..e01e5311cd8 100644 --- a/gcc/testsuite/gcc.dg/torture/matrix-6.c +++ b/gcc/testsuite/gcc.dg/torture/matrix-6.c @@ -68,8 +68,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/pr33848.c b/gcc/testsuite/gcc.dg/torture/pr33848.c index 5d71d2c933c..db6060253eb 100644 --- a/gcc/testsuite/gcc.dg/torture/pr33848.c +++ b/gcc/testsuite/gcc.dg/torture/pr33848.c @@ -1,4 +1,3 @@ -/* { dg-require-effective-target label_values } */ /* &&foo should be hoisted, but on most targets, excess register pressure forces it to be rematerialized before "data != &&foo". On targets that have a "branch if registers are equal" instruction, this leads to the @@ -7,6 +6,7 @@ say that &&foo was the target of the branch, and the real target would then be removed as dead. */ /* { dg-do link } */ +/* { dg-require-effective-target label_values } */ #define NVARS 30 #define MULTI(X) \ X( 0), X( 1), X( 2), X( 3), X( 4), X( 5), X( 6), X( 7), X( 8), X( 9), \ diff --git a/gcc/testsuite/gcc.dg/torture/pr41261.c b/gcc/testsuite/gcc.dg/torture/pr41261.c index 8e601555cb5..448fc0146e1 100644 --- a/gcc/testsuite/gcc.dg/torture/pr41261.c +++ b/gcc/testsuite/gcc.dg/torture/pr41261.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fprofile-arcs" } */ +/* { dg-require-profiling "-fprofile-generate" } */ extern void relocate_kernel(); void machine_kexec(void *control_page) diff --git a/gcc/testsuite/gcc.dg/torture/pr63738.c b/gcc/testsuite/gcc.dg/torture/pr63738.c index 06ede546192..82ac4ff2a63 100644 --- a/gcc/testsuite/gcc.dg/torture/pr63738.c +++ b/gcc/testsuite/gcc.dg/torture/pr63738.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonlocal_goto } */ #include <setjmp.h> diff --git a/gcc/testsuite/gcc.dg/torture/pr64728.c b/gcc/testsuite/gcc.dg/torture/pr64728.c index 65c8508fc84..7384d85a928 100644 --- a/gcc/testsuite/gcc.dg/torture/pr64728.c +++ b/gcc/testsuite/gcc.dg/torture/pr64728.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonlocal_goto } */ #include <setjmp.h> diff --git a/gcc/testsuite/gcc.dg/torture/pr66101.c b/gcc/testsuite/gcc.dg/torture/pr66101.c index f3ef5e55bfd..39d380722b4 100644 --- a/gcc/testsuite/gcc.dg/torture/pr66101.c +++ b/gcc/testsuite/gcc.dg/torture/pr66101.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonlocal_goto } */ #include <setjmp.h> diff --git a/gcc/testsuite/gcc.dg/torture/pr66123.c b/gcc/testsuite/gcc.dg/torture/pr66123.c index 848f8fedcee..5fc0c1c4291 100644 --- a/gcc/testsuite/gcc.dg/torture/pr66123.c +++ b/gcc/testsuite/gcc.dg/torture/pr66123.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target label_values } */ int test (int foo) diff --git a/gcc/testsuite/gcc.dg/torture/pr66752-1.c b/gcc/testsuite/gcc.dg/torture/pr66752-1.c new file mode 100644 index 00000000000..a7425554ba9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr66752-1.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ + +typedef unsigned int size_t; +struct fde_vector +{ + size_t count; + const struct dwarf_fde *array[]; +}; +struct object; +typedef struct dwarf_fde fde; +typedef int (*fde_compare_t) (struct object *, const fde *, const fde *); +void +fde_merge (struct object *ob, fde_compare_t fde_compare, + struct fde_vector *v1, struct fde_vector *v2) +{ + size_t i1, i2; + const fde *fde2; + do + { + i2--; + while (i1 > 0 && fde_compare (ob, v1->array[i1 - 1], fde2) > 0) + { + i1--; + } + } + while (i2 > 0); +} diff --git a/gcc/testsuite/gcc.dg/torture/pr67005.c b/gcc/testsuite/gcc.dg/torture/pr67005.c new file mode 100644 index 00000000000..922c5c475e8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr67005.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ + +int a; +void +f (void) +{ + if (!a); + else + lbl: + a = a; + + if (a) + a = 8; + goto lbl; +} diff --git a/gcc/testsuite/gcc.dg/torture/transpose-1.c b/gcc/testsuite/gcc.dg/torture/transpose-1.c index 188f3b51b13..20651be0795 100644 --- a/gcc/testsuite/gcc.dg/torture/transpose-1.c +++ b/gcc/testsuite/gcc.dg/torture/transpose-1.c @@ -69,8 +69,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/transpose-2.c b/gcc/testsuite/gcc.dg/torture/transpose-2.c index bff6a3ababc..0e08feaa500 100644 --- a/gcc/testsuite/gcc.dg/torture/transpose-2.c +++ b/gcc/testsuite/gcc.dg/torture/transpose-2.c @@ -66,8 +66,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/transpose-3.c b/gcc/testsuite/gcc.dg/torture/transpose-3.c index da7e887013c..8b55a2efbcd 100644 --- a/gcc/testsuite/gcc.dg/torture/transpose-3.c +++ b/gcc/testsuite/gcc.dg/torture/transpose-3.c @@ -71,8 +71,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/transpose-4.c b/gcc/testsuite/gcc.dg/torture/transpose-4.c index 5a96a5163fd..0d9c1df02b2 100644 --- a/gcc/testsuite/gcc.dg/torture/transpose-4.c +++ b/gcc/testsuite/gcc.dg/torture/transpose-4.c @@ -69,8 +69,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/transpose-5.c b/gcc/testsuite/gcc.dg/torture/transpose-5.c index 049d7b03e23..8ed39534598 100644 --- a/gcc/testsuite/gcc.dg/torture/transpose-5.c +++ b/gcc/testsuite/gcc.dg/torture/transpose-5.c @@ -66,8 +66,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/torture/transpose-6.c b/gcc/testsuite/gcc.dg/torture/transpose-6.c index 9b3329b5361..0ef6aa9ae9a 100644 --- a/gcc/testsuite/gcc.dg/torture/transpose-6.c +++ b/gcc/testsuite/gcc.dg/torture/transpose-6.c @@ -66,8 +66,7 @@ mem_init (void) vel[i] = (int **) malloc (3 * sizeof (int *)); if (vel[i] == (int **) NULL) { - fprintf (stderr, "malloc failed for vel[%d]\n", i); - fflush (stderr); + printf ("malloc failed for vel[%d]\n", i); exit (0); } } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c index 259932480a1..0712922b363 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O1 -ftree-vrp -fdump-tree-dom2" } */ +/* { dg-require-effective-target alloca } */ extern void abort (void); extern void bitmap_clear (int *); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20080530.c b/gcc/testsuite/gcc.dg/tree-ssa/20080530.c index 8583574266e..c472f8167a0 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20080530.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20080530.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-einline" } */ +/* { dg-require-effective-target alloca } */ void bar (char *); int i; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cmp-1.c b/gcc/testsuite/gcc.dg/tree-ssa/cmp-1.c new file mode 100644 index 00000000000..6faa70c8df3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/cmp-1.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-gimple -fdump-tree-optimized" } */ + +int f(int a){ + int b = -__INT_MAX__-1; + a &= b; + return a == b; +} +int g(int x){ + x = x < 0 ? -x : x; + return x == 0; +} + +/* This should work even if int is not 32 bits, it is just not meaningful in + that case. */ +/* { dg-final { scan-tree-dump-not "-2147483648" "optimized"} } */ +/* { dg-final { scan-tree-dump " < 0" "optimized"} } */ +/* { dg-final { scan-tree-dump "ABS_EXPR" "gimple"} } */ +/* { dg-final { scan-tree-dump-not "ABS_EXPR" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/complex-7.c b/gcc/testsuite/gcc.dg/tree-ssa/complex-7.c new file mode 100644 index 00000000000..20a2a3785f6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/complex-7.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-forwprop1" } */ + +float f(_Complex float x, _Complex float y){ + x += y; + return __builtin_cimagf (x); +} + +double g(double x){ + _Complex double c = __builtin_cexpi (x); + return __builtin_creal (c); +} + +/* { dg-final { scan-tree-dump "__builtin_cos" "forwprop1"} } */ +/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 2 "forwprop1"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c b/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c index 18ccc604838..c9d438e9374 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdelete-null-pointer-checks" } */ +/* { dg-require-weak "" } */ /* { dg-skip-if "" keeps_null_pointer_checks } */ extern int a; /* { dg-error "declared weak after being used" } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c index c80ed85e830..8836ab22972 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c @@ -1,6 +1,7 @@ /* PR middle-end/23848 */ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-require-effective-target alloca } */ void bar1 (char *, int); void foo1 (int size) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c index cdbf7b00031..7b5be75bf83 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c @@ -1,6 +1,7 @@ /* PR middle-end/23848 */ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-require-effective-target alloca } */ void bar (char *, char *, char *, char *, int); void foo (int size) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c index 3232f3447f9..ed3541e22e0 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c @@ -1,6 +1,7 @@ /* PR middle-end/23848 */ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-require-effective-target alloca } */ void bar (int, char *, char *, char *, char *, int); void foo (int size) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c index f32e8fab861..0f7948c3e14 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c @@ -1,6 +1,7 @@ /* PR middle-end/23848 */ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-require-effective-target alloca } */ void bar (char *, char *, char *, char *, int); void foo (int size) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c new file mode 100644 index 00000000000..f15b5986166 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c @@ -0,0 +1,39 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-dom1-details -fdump-tree-optimized" } */ + +extern int status, pt; +extern int count; +void +foo (int N, int c, int b, int *a) +{ + int i, flag; + i = b -1; + flag = 1; + if (status && i < N && a[i] == b) { + N--; + flag = 0; + if (pt) + count++; + } + else + for (i = -1, flag = 1; ++i < N && flag;) + if (a[i] == b) + { + --N; + flag = 0; + if (i < N) + a[i] = a[N]; + else + a[i] = 0; + if (pt) + count++; + } + if(status && flag) + pt--; +} + +/* There are 3 FSM jump threading opportunities. */ +/* { dg-final { scan-tree-dump-times "FSM" 3 "dom1"} } */ + +/* There should be no assignments or references to FLAG. */ +/* { dg-final { scan-tree-dump-not "flag" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c index 64e71eb620d..eadf71c19f7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -fprofile-arcs -fdump-tree-lim1-details" } */ +/* { dg-require-profiling "-fprofile-generate" } */ struct thread_param { diff --git a/gcc/testsuite/gcc.dg/uninit-9-O0.c b/gcc/testsuite/gcc.dg/uninit-9-O0.c index 493dd68d908..ac24e7a8362 100644 --- a/gcc/testsuite/gcc.dg/uninit-9-O0.c +++ b/gcc/testsuite/gcc.dg/uninit-9-O0.c @@ -3,6 +3,7 @@ /* { dg-do compile } */ /* { dg-options "-Wuninitialized" } */ +/* { dg-require-effective-target alloca } */ struct foo { diff --git a/gcc/testsuite/gcc.dg/uninit-9.c b/gcc/testsuite/gcc.dg/uninit-9.c index 2a8ccb69f32..d1af7328a96 100644 --- a/gcc/testsuite/gcc.dg/uninit-9.c +++ b/gcc/testsuite/gcc.dg/uninit-9.c @@ -3,6 +3,7 @@ /* { dg-do compile } */ /* { dg-options "-O -Wuninitialized" } */ +/* { dg-require-effective-target alloca } */ struct foo { diff --git a/gcc/testsuite/gcc.dg/unused-5.c b/gcc/testsuite/gcc.dg/unused-5.c index 5ccc3f3beae..1b8e100d249 100644 --- a/gcc/testsuite/gcc.dg/unused-5.c +++ b/gcc/testsuite/gcc.dg/unused-5.c @@ -1,6 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-Wunused" } */ /* { dg-final { scan-assembler "string_to_look_for" } } */ +/* nvptx outputs strings as array of ints. */ +/* { dg-skip-if "" { nvptx-*-* } { "*" } { "" } } */ /* 'volatile' variables get output and don't produce a warning about being unused. */ diff --git a/gcc/testsuite/gcc.dg/unwind-1.c b/gcc/testsuite/gcc.dg/unwind-1.c index 95bbb2daa50..a035af1f2c2 100644 --- a/gcc/testsuite/gcc.dg/unwind-1.c +++ b/gcc/testsuite/gcc.dg/unwind-1.c @@ -1,4 +1,4 @@ -/* { dg-do assemble { target { ! { powerpc-ibm-aix* } } } } */ +/* { dg-do assemble { target { ! { powerpc-ibm-aix* nvptx-*-* } } } } */ /* { dg-options "-fleading-underscore -funwind-tables" } */ void func(void) __asm("_func"); diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c index 29bb6c705b7..ff955afb90a 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c @@ -47,5 +47,5 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ /* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c index 318346a00f1..82b614bc4ae 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c @@ -46,5 +46,5 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ /* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */ 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 29bb6c705b7..ff955afb90a 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) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ /* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c index bbaf964eab0..1d674504e2c 100644 --- a/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c +++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c @@ -36,6 +36,6 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_max } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-11.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-11.c index a25001b57bf..f5aeac98187 100644 --- a/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-11.c +++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-11.c @@ -46,4 +46,4 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-4.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-4.c index 3572dfc9fbf..c41d322445a 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-reduc-4.c +++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-4.c @@ -56,6 +56,6 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_max } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c index b1590d825e6..fc689e46ba1 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c +++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c @@ -42,6 +42,6 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_int_max } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_int_min_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c index 8fd353c623d..f801e763f92 100644 --- a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c +++ b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c @@ -47,4 +47,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "Detected reduction\\." 2 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { ! { sparc*-*-* } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { ! vect_no_int_min_max } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-125.c b/gcc/testsuite/gcc.dg/vect/vect-125.c index 0b3623ed06d..4a3c0dc7a3a 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-125.c +++ b/gcc/testsuite/gcc.dg/vect/vect-125.c @@ -16,4 +16,4 @@ void train(short *t, short *w, int n, int err) } } -/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-13.c b/gcc/testsuite/gcc.dg/vect/vect-13.c index 752fea822d7..5d902924ec2 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-13.c +++ b/gcc/testsuite/gcc.dg/vect/vect-13.c @@ -38,5 +38,5 @@ int main (void) return main1 (); } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c index f2becfa8b4a..3bdf9efe947 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c @@ -61,5 +61,5 @@ int main () return 0; } -/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c index 99abe06901e..aafa9a2c96d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c @@ -52,4 +52,4 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_max } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_min_max } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c index a25b6cbfc90..660e0fdf5fb 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c @@ -67,4 +67,4 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c index 644b474f57e..d5c62211d9f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c @@ -47,4 +47,4 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c index 32eb324ae5a..8bbc68c201a 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c @@ -47,4 +47,4 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c index 44f0fc701b8..656e5719491 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c @@ -49,4 +49,4 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_max } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_min_max } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c index 6b3cd09e116..556c2a06dc5 100644 --- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c +++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c @@ -47,4 +47,4 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c index 0a4df48abb3..f9142173b25 100644 --- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c +++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c @@ -46,4 +46,4 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vla-2.c b/gcc/testsuite/gcc.dg/vla-2.c index 72c64659030..e6ddcccfb4b 100644 --- a/gcc/testsuite/gcc.dg/vla-2.c +++ b/gcc/testsuite/gcc.dg/vla-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-std=gnu99" } */ +/* { dg-require-effective-target alloca } */ /* These are crash tests related to PR middle-end/6994; see also g++.dg/ext/vla1.C. Note that at present A and C cannot be inlined. */ diff --git a/gcc/testsuite/gcc.dg/vla-22.c b/gcc/testsuite/gcc.dg/vla-22.c index f924650af03..8025bae8f6f 100644 --- a/gcc/testsuite/gcc.dg/vla-22.c +++ b/gcc/testsuite/gcc.dg/vla-22.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target alloca } */ extern void bar (int *); diff --git a/gcc/testsuite/gcc.dg/vla-3.c b/gcc/testsuite/gcc.dg/vla-3.c index 619c0422a4d..51dae42f7ec 100644 --- a/gcc/testsuite/gcc.dg/vla-3.c +++ b/gcc/testsuite/gcc.dg/vla-3.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-std=gnu99" } */ +/* { dg-require-effective-target alloca } */ /* This used to crash as we did not preserve the correct type for __SIZE_TYPE__. See PR22439. */ diff --git a/gcc/testsuite/gcc.dg/vla-4.c b/gcc/testsuite/gcc.dg/vla-4.c index 7ffbfb31b8e..c4a68fea9d9 100644 --- a/gcc/testsuite/gcc.dg/vla-4.c +++ b/gcc/testsuite/gcc.dg/vla-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-std=c99 -pedantic-errors" } */ +/* { dg-require-effective-target alloca } */ /* PR c/18740 */ static int i; diff --git a/gcc/testsuite/gcc.dg/weak/weak-18.c b/gcc/testsuite/gcc.dg/weak/weak-18.c new file mode 100644 index 00000000000..ebeb4d5ba8a --- /dev/null +++ b/gcc/testsuite/gcc.dg/weak/weak-18.c @@ -0,0 +1,9 @@ +/* PR middle-end/67330 */ +/* { dg-do compile } */ +/* { dg-require-weak "" } */ + +void +f (void) +{ + __attribute__ ((weak)) int a; /* { dg-error "weak declaration of .a. must be public" } */ +} diff --git a/gcc/testsuite/gcc.dg/wide-shift-128.c b/gcc/testsuite/gcc.dg/wide-shift-128.c new file mode 100644 index 00000000000..d769833af04 --- /dev/null +++ b/gcc/testsuite/gcc.dg/wide-shift-128.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target aarch64*-*-* mips64*-*-* sparc64*-*-* } } */ +/* { dg-require-effective-target int128 } */ +/* { dg-options "-O2 -fdump-rtl-combine" } */ + +__int128_t +load2 (int data) +{ + return (__int128_t) data << 50; +} + +/* { dg-final { scan-rtl-dump-not "ior" "combine" } } */ diff --git a/gcc/testsuite/gcc.dg/wide-shift-64.c b/gcc/testsuite/gcc.dg/wide-shift-64.c new file mode 100644 index 00000000000..c1624c5cdbf --- /dev/null +++ b/gcc/testsuite/gcc.dg/wide-shift-64.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target mips*-*-* sparc*-*-* } } */ +/* { dg-options "-O2 -fdump-rtl-combine" } */ + +long long +load1 (int data) +{ + return (long long) data << 12; +} + +/* { dg-final { scan-rtl-dump-not "ior" "combine" } } */ diff --git a/gcc/testsuite/gcc.dg/winline-7.c b/gcc/testsuite/gcc.dg/winline-7.c index 33ad74b43c1..e3ac1296583 100644 --- a/gcc/testsuite/gcc.dg/winline-7.c +++ b/gcc/testsuite/gcc.dg/winline-7.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-Winline -O2 -fgnu89-inline" } */ +/* { dg-require-effective-target alloca } */ extern void *alloca (__SIZE_TYPE__); |