A few tests started failing recently on pru-unknown-elf because it uses SJLJ implementation for exceptions: FAIL: g++.dg/ext/musttail3.C -std=c++11 (test for excess errors) .../gcc/gcc/testsuite/g++.dg/ext/musttail3.C:12:34: error: cannot tail-call: caller uses sjlj exceptions
Fix by disabling those tests if target uses SJLJ for implementing exceptions. Ensured that test results with and without this patch for x86_64-pc-linux-gnu are the same. Ok for trunk? gcc/testsuite/ChangeLog: * c-c++-common/musttail19.c: Skip if target uses SJLJ exceptions. * c-c++-common/musttail28.c: Ditto. * c-c++-common/musttail30.c: Ditto. * c-c++-common/musttail8.c: Ditto. * g++.dg/ext/musttail1.C: Ditto. * g++.dg/ext/musttail2.C: Ditto. * g++.dg/ext/musttail3.C: Ditto. * g++.dg/torture/musttail1.C: Ditto. Signed-off-by: Dimitar Dimitrov <dimi...@dinux.eu> --- gcc/testsuite/c-c++-common/musttail19.c | 2 +- gcc/testsuite/c-c++-common/musttail28.c | 2 +- gcc/testsuite/c-c++-common/musttail30.c | 2 +- gcc/testsuite/c-c++-common/musttail8.c | 2 +- gcc/testsuite/g++.dg/ext/musttail1.C | 2 +- gcc/testsuite/g++.dg/ext/musttail2.C | 2 +- gcc/testsuite/g++.dg/ext/musttail3.C | 2 +- gcc/testsuite/g++.dg/torture/musttail1.C | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/c-c++-common/musttail19.c b/gcc/testsuite/c-c++-common/musttail19.c index a592b69c1b7..f61e74a0e08 100644 --- a/gcc/testsuite/c-c++-common/musttail19.c +++ b/gcc/testsuite/c-c++-common/musttail19.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target musttail } } */ +/* { dg-do compile { target { musttail && { ! using_sjlj_exceptions } } } } */ float f1(void); diff --git a/gcc/testsuite/c-c++-common/musttail28.c b/gcc/testsuite/c-c++-common/musttail28.c index d84658aa8a0..5a22670b85b 100644 --- a/gcc/testsuite/c-c++-common/musttail28.c +++ b/gcc/testsuite/c-c++-common/musttail28.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { musttail && { c || c++11 } } } } */ +/* { dg-do compile { target { musttail && { { c || c++11 } && { ! using_sjlj_exceptions } } } } } */ int foo (int, void *); int bar (int, int *); diff --git a/gcc/testsuite/c-c++-common/musttail30.c b/gcc/testsuite/c-c++-common/musttail30.c index be1c3daf6af..cc596f70863 100644 --- a/gcc/testsuite/c-c++-common/musttail30.c +++ b/gcc/testsuite/c-c++-common/musttail30.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { musttail && { c || c++11 } } } } */ +/* { dg-do compile { target { musttail && { { c || c++11 } && { ! using_sjlj_exceptions } } } } } */ /* { dg-options "-Wextra" } */ int foo (int, void *); diff --git a/gcc/testsuite/c-c++-common/musttail8.c b/gcc/testsuite/c-c++-common/musttail8.c index 9a29030a3b0..ac2280a9e1b 100644 --- a/gcc/testsuite/c-c++-common/musttail8.c +++ b/gcc/testsuite/c-c++-common/musttail8.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { musttail && { c || c++11 } } } } */ +/* { dg-do compile { target { musttail && { { c || c++11 } && { ! using_sjlj_exceptions } } } } } */ float f1(void); diff --git a/gcc/testsuite/g++.dg/ext/musttail1.C b/gcc/testsuite/g++.dg/ext/musttail1.C index fd9b386a597..138e9cf2085 100644 --- a/gcc/testsuite/g++.dg/ext/musttail1.C +++ b/gcc/testsuite/g++.dg/ext/musttail1.C @@ -1,5 +1,5 @@ // PR ipa/119376 -// { dg-do compile { target { musttail && c++11 } } } +// { dg-do compile { target { musttail && { c++11 && { ! using_sjlj_exceptions } } } } } // { dg-options "-Wmaybe-musttail-local-addr" } int foo (int &); diff --git a/gcc/testsuite/g++.dg/ext/musttail2.C b/gcc/testsuite/g++.dg/ext/musttail2.C index ac99aafb0f0..2dbb0a7a2f3 100644 --- a/gcc/testsuite/g++.dg/ext/musttail2.C +++ b/gcc/testsuite/g++.dg/ext/musttail2.C @@ -1,5 +1,5 @@ // PR ipa/119376 -// { dg-do compile { target { musttail && c++11 } } } +// { dg-do compile { target { musttail && { c++11 && { ! using_sjlj_exceptions } } } } } // { dg-options "-Wextra" } int foo (int &); diff --git a/gcc/testsuite/g++.dg/ext/musttail3.C b/gcc/testsuite/g++.dg/ext/musttail3.C index 1c4b939a2a4..ac02ba74273 100644 --- a/gcc/testsuite/g++.dg/ext/musttail3.C +++ b/gcc/testsuite/g++.dg/ext/musttail3.C @@ -1,5 +1,5 @@ // PR ipa/119376 -// { dg-do compile { target { musttail && c++11 } } } +// { dg-do compile { target { musttail && { c++11 && { ! using_sjlj_exceptions } } } } } int foo (int &); int bar (int &&); diff --git a/gcc/testsuite/g++.dg/torture/musttail1.C b/gcc/testsuite/g++.dg/torture/musttail1.C index 12012ad2207..8c600f905bb 100644 --- a/gcc/testsuite/g++.dg/torture/musttail1.C +++ b/gcc/testsuite/g++.dg/torture/musttail1.C @@ -1,5 +1,5 @@ // PR ipa/119376 -// { dg-do compile { target musttail } } +// { dg-do compile { target { musttail && { ! using_sjlj_exceptions } } } } // { dg-additional-options "-ffat-lto-objects -fdump-tree-optimized" } /* { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */ -- 2.50.0