diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/completion-2.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c | 30 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/memcpy-4.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/raw-string-1.c | 25 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-prof/ipa-cp-1.c | 30 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-early-break_38.c | 1 |
7 files changed, 88 insertions, 8 deletions
diff --git a/gcc/testsuite/gcc.dg/completion-2.c b/gcc/testsuite/gcc.dg/completion-2.c index 46c511c..99e6531 100644 --- a/gcc/testsuite/gcc.dg/completion-2.c +++ b/gcc/testsuite/gcc.dg/completion-2.c @@ -5,7 +5,6 @@ -flto-partition=1to1 -flto-partition=balanced -flto-partition=cache --flto-partition=default -flto-partition=max -flto-partition=none -flto-partition=one diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c b/gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c new file mode 100644 index 0000000..bf74e64 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c @@ -0,0 +1,30 @@ +/* { dg-options "-O3 -fdump-ipa-cp" } */ +__attribute__ ((used)) +int a[1000]; + +__attribute__ ((noinline)) +void +test2(int sz) +{ + for (int i = 0; i < sz; i++) + a[i]++; + asm volatile (""::"m"(a)); +} + +__attribute__ ((noinline)) +void +test1 (int sz) +{ + for (int i = 0; i < 1000; i++) + test2(sz); +} +int main() +{ + test1(1000); + return 0; +} +/* We should clone test1 and test2 for constant 1000. + In the past we did not do this since we did not clone for edges that are not hot + and call main->test1 is not considered hot since it is executed just once. */ +/* { dg-final { scan-ipa-dump-times "Creating a specialized node of test1" 1 "cp"} } */ +/* { dg-final { scan-ipa-dump-times "Creating a specialized node of test2" 1 "cp"} } */ diff --git a/gcc/testsuite/gcc.dg/memcpy-4.c b/gcc/testsuite/gcc.dg/memcpy-4.c index 4c726f0..b17b369 100644 --- a/gcc/testsuite/gcc.dg/memcpy-4.c +++ b/gcc/testsuite/gcc.dg/memcpy-4.c @@ -1,13 +1,8 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-rtl-expand" } */ +/* { dg-options "-O2" } */ -#ifdef __mips -__attribute__((nomips16)) -#endif void f1 (char *p) { __builtin_memcpy (p, "12345", 5); } - -/* { dg-final { scan-rtl-dump "mem/u.*mem/u" "expand" { target mips*-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/raw-string-1.c b/gcc/testsuite/gcc.dg/raw-string-1.c new file mode 100644 index 0000000..77d6145 --- /dev/null +++ b/gcc/testsuite/gcc.dg/raw-string-1.c @@ -0,0 +1,25 @@ +/* PR c++/110343 */ +/* { dg-do compile } */ +/* { dg-options "-std=gnu23" } */ + +const void *s0 = R"0123456789abcdefg()0123456789abcdefg" 0; + /* { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 } */ + /* { dg-error "stray" "stray" { target *-*-* } .-2 } */ +const void *s1 = R" () " 0; + /* { dg-error "invalid character" "invalid" { target *-*-* } .-1 } */ + /* { dg-error "stray" "stray" { target *-*-* } .-2 } */ +const void *s2 = R" () " 0; + /* { dg-error "invalid character" "invalid" { target *-*-* } .-1 } */ + /* { dg-error "stray" "stray" { target *-*-* } .-2 } */ +const void *s3 = R")())" 0; + /* { dg-error "invalid character" "invalid" { target *-*-* } .-1 } */ + /* { dg-error "stray" "stray" { target *-*-* } .-2 } */ +const char *s4 = R"@()@"; +const char *s5 = R"$()$"; +const char *s6 = R"`()`"; +const void *s7 = R"\u0040()\u0040" 0; + /* { dg-error "invalid character" "invalid" { target *-*-* } .-1 } */ + /* { dg-error "stray" "stray" { target *-*-* } .-2 } */ +const char *s8 = R"`@$$@`@`$()`@$$@`@`$"; + +int main () {} diff --git a/gcc/testsuite/gcc.dg/tree-prof/ipa-cp-1.c b/gcc/testsuite/gcc.dg/tree-prof/ipa-cp-1.c new file mode 100644 index 0000000..ab6a7f7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-prof/ipa-cp-1.c @@ -0,0 +1,30 @@ +/* { dg-options "-O2 -fdump-ipa-cp" } */ +__attribute__ ((used)) +int a[1000]; + +__attribute__ ((noinline)) +void +test2(int sz) +{ + for (int i = 0; i < sz; i++) + a[i]++; + asm volatile (""::"m"(a)); +} + +__attribute__ ((noinline)) +void +test1 (int sz) +{ + for (int i = 0; i < 1000; i++) + test2(sz); +} +int main() +{ + test1(1000); + return 0; +} +/* We should clone test1 and test2 for constant 1000. + In the past we did not do this since we did not clone for edges that are not hot + and call main->test1 is not considered hot since it is executed just once. */ +/* { dg-final-use { scan-ipa-dump-times "Creating a specialized node of test1" 1 "cp"} } */ +/* { dg-final-use { scan-ipa-dump-times "Creating a specialized node of test2" 1 "cp"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c index a879d30..6fa52f6 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c @@ -27,4 +27,4 @@ foo () but the loop reads only one element at a time, and DOM cannot resolve these. The same happens on powerpc depending on the SIMD support available. */ -/* { dg-final { scan-tree-dump "return 28;" "optimized" { xfail { { alpha*-*-* hppa*64*-*-* nvptx*-*-* mmix-knuth-mmixware } || { { { lp64 && { powerpc*-*-* sparc*-*-* riscv*-*-* } } || aarch64_sve } || { arm*-*-* && { ! arm_neon } } } } } } } */ +/* { dg-final { scan-tree-dump "return 28;" "optimized" { xfail { { alpha*-*-* hppa*64*-*-* nvptx*-*-* mmix-knuth-mmixware } || { { { lp64 && { mips*-*-* powerpc*-*-* sparc*-*-* riscv*-*-* } } || aarch64_sve } || { arm*-*-* && { ! arm_neon } } } } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c index 36fc6a6..010e7ea 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_early_break } */ /* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-march=gfx908" { target amdgcn*-*-* } } */ #ifndef N #define N 803 |