From: Andi Kleen Date: Mon, 29 Jul 2024 17:17:43 +0000 (-0700) Subject: Revert "PR116080: Fix tail call dejagnu checks" X-Git-Tag: basepoints/gcc-16~7169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7d6f7327e9211fbb4a800c06d00c4555dbffcec;p=thirdparty%2Fgcc.git Revert "PR116080: Fix tail call dejagnu checks" This reverts commit ee41cd863b7c38ee3bc415ea7154954aa6facca3. --- diff --git a/gcc/testsuite/g++.dg/musttail10.C b/gcc/testsuite/g++.dg/musttail10.C index bd75affa222..ff7fcc7d875 100644 --- a/gcc/testsuite/g++.dg/musttail10.C +++ b/gcc/testsuite/g++.dg/musttail10.C @@ -8,7 +8,7 @@ double g() { [[gnu::musttail]] return f(); } /* { dg-error "cannot tail-cal template __attribute__((noinline, noclone, noipa)) -T g1() { [[gnu::musttail]] return f(); } /* { dg-error "target is not able" "" { target { external_tail_call } } } */ +T g1() { [[gnu::musttail]] return f(); } /* { dg-error "target is not able" "" { target powerpc*-*-* } } */ template __attribute__((noinline, noclone, noipa)) diff --git a/gcc/testsuite/g++.dg/musttail6.C b/gcc/testsuite/g++.dg/musttail6.C index 81f6d9f3ca7..5c6f69407dd 100644 --- a/gcc/testsuite/g++.dg/musttail6.C +++ b/gcc/testsuite/g++.dg/musttail6.C @@ -1,6 +1,6 @@ /* { dg-do compile { target { struct_tail_call } } } */ -/* { dg-require-effective-target external_tail_call } */ /* A lot of architectures will not build this due to PR115606 and PR115607 */ +/* { dg-skip-if "powerpc does not support sibcall to templates" { powerpc*-*-* } } */ /* { dg-options "-std=gnu++11" } */ /* { dg-additional-options "-fdelayed-branch" { target sparc*-*-* } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 0a3946e82d4..d368251ef9a 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -12741,15 +12741,7 @@ proc check_effective_target_tail_call { } { return [check_no_messages_and_pattern tail_call ",SIBCALL" rtl-expand { __attribute__((__noipa__)) void foo (void) { } __attribute__((__noipa__)) void bar (void) { foo(); } - } {-fdump-rtl-expand-all}] ;# The "SIBCALL" note requires a detailed dump. -} - -# Return 1 if the target can perform tail-calls for externals -proc check_effective_target_external_tail_call { } { - return [check_no_messages_and_pattern tail_call ",SIBCALL" rtl-expand { - extern __attribute__((__noipa__)) void foo (void); - __attribute__((__noipa__)) void bar (void) { foo(); } - } {-fdump-rtl-expand-all}] ;# The "SIBCALL" note requires a detailed dump. + } {-O2 -fdump-rtl-expand-all}] ;# The "SIBCALL" note requires a detailed dump. } # Return 1 if the target can perform tail-call optimizations for structures @@ -12759,9 +12751,9 @@ proc check_effective_target_struct_tail_call { } { return [check_no_messages_and_pattern tail_call ",SIBCALL" rtl-expand { // C++ struct foo { int a, b; }; - extern __attribute__((__noipa__)) struct foo foo (void); + __attribute__((__noipa__)) struct foo foo (void) { return {}; } __attribute__((__noipa__)) struct foo bar (void) { return foo(); } - } {-fdump-rtl-expand-all}] ;# The "SIBCALL" note requires a detailed dump. + } {-O2 -fdump-rtl-expand-all}] ;# The "SIBCALL" note requires a detailed dump. } # Return 1 if the target's calling sequence or its ABI