diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/builtin-apply5.c | 23 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr119599-1.c | 27 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-fncall-mask.c | 8 |
3 files changed, 53 insertions, 5 deletions
diff --git a/gcc/testsuite/gcc.dg/builtin-apply5.c b/gcc/testsuite/gcc.dg/builtin-apply5.c new file mode 100644 index 0000000..16892f7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/builtin-apply5.c @@ -0,0 +1,23 @@ +/* { dg-options "-O2 -Wmissing-noreturn -fgnu89-inline" } */ +/* { dg-additional-options "-mno-mmx" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ +/* { dg-do compile } */ + +extern void abort (void); + +double +foo (int arg) +{ + if (arg != 116) + abort(); + return arg + 1; +} + +__attribute__((noreturn)) +double +bar (int arg) +{ + foo (arg); + __builtin_return (__builtin_apply ((void (*) ()) foo, /* { dg-warning "'noreturn' function does return" } */ + __builtin_apply_args (), 16)); +} + diff --git a/gcc/testsuite/gcc.dg/torture/pr119599-1.c b/gcc/testsuite/gcc.dg/torture/pr119599-1.c new file mode 100644 index 0000000..4fbd228 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr119599-1.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-fdump-tree-einline" } */ + +/* PR ipa/119599 */ +/* inlining a noreturn function which returns + can cause an ICE when dealing finding an unreachable block. + We should get a __builtin_unreachable after the inliing. */ + + +void baz (void); + +static inline __attribute__((always_inline, noreturn)) void +bar (void) +{ + static volatile int t = 0; + if (t == 0) + baz (); +} /* { dg-warning "function does return" } */ + +void +foo (void) +{ + bar (); +} + +/* After inlining, we should have call to __builtin_unreachable now. */ +/* { dg-final { scan-tree-dump "__builtin_unreachable " "einline" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-fncall-mask.c b/gcc/testsuite/gcc.dg/vect/vect-fncall-mask.c index 554488e..ba1886d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fncall-mask.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fncall-mask.c @@ -1,7 +1,7 @@ /* { dg-do compile { target { aarch64*-*-* } } } */ -/* { dg-additional-options "-march=armv8.2-a+sve -fdump-tree-ifcvt-raw -Ofast" { target { aarch64*-*-* } } } */ +/* { dg-additional-options "-march=armv8.2-a+sve -fdump-tree-ifcvt -Ofast" { target { aarch64*-*-* } } } */ -extern int __attribute__ ((simd, const)) fn (int); +extern int __attribute__ ((simd, const)) fn (float); const int N = 20; const float lim = 101.0; @@ -26,6 +26,4 @@ int main (void) return (0); } -/* { dg-final { scan-tree-dump {gimple_assign <gt_expr, _12, _1, 1.01e\+2, NULL>} ifcvt } } */ -/* { dg-final { scan-tree-dump {gimple_assign <bit_not_expr, _34, _12, NULL, NULL>} ifcvt } } */ -/* { dg-final { scan-tree-dump {gimple_call <.MASK_CALL, _3, fn, _2, _34>} ifcvt } } */ +/* { dg-final { scan-tree-dump {(_\d+) = (_\d+) > 1.01e\+2;\n\s*(_\d+) = ~\1;\n\s*_\d+ = .MASK_CALL \(fn, \2, \3\);} ifcvt } } */ |