Message ID | 1464106264-58571-1-git-send-email-dmalcolm@redhat.com |
---|---|
State | New |
Headers | show |
David Malcolm <dmalcolm@redhat.com> writes: > The following fixes the known failures of the must-tail-call tests. > > Tested with --target= > * aarch64-unknown-linux-gnu > * ia64-unknown-linux-gnu > * m68k-unknown-linux-gnu > * x86_64-pc-linux-gnu Even with this patch, there are still failures on sparc-sun-solaris2.12: FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/plugin/must-tail-call-1.c:12:10: error: cannot tail-call: target is not able to optimize the call into a sibling call FAIL: gcc.dg/plugin/must-tail-call-2.c -fplugin=./must_tail_call_plugin.so (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c:32:10: error: cannot tail-call: target is not able to optimize the call into a sibling call Rainer
Hi Rainer, On Wednesday 25 May 2016 11:31:12 Rainer Orth wrote: > David Malcolm <dmalcolm@redhat.com> writes: > > The following fixes the known failures of the must-tail-call tests. > > > > Tested with --target= > > * aarch64-unknown-linux-gnu > > * ia64-unknown-linux-gnu > > * m68k-unknown-linux-gnu > > * x86_64-pc-linux-gnu > > Even with this patch, there are still failures on sparc-sun-solaris2.12: > > FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so > (test for excess errors) > > Excess errors: > /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/plugin/must-tail-call-1.c:1 > 2:10: error: cannot tail-call: target is not able to optimize the call into > a sibling call > > FAIL: gcc.dg/plugin/must-tail-call-2.c -fplugin=./must_tail_call_plugin.so > (test for excess errors) > > Excess errors: > /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c:3 > 2:10: error: cannot tail-call: target is not able to optimize the call into > a sibling call Now that the logic is in place, you probably want to add sparc-sun-solaris in plugin.exp to the the list of architecture where tail call plugin tests should be skipped, alongside Thumb-1 ARM targets. Best regards, Thomas
diff --git a/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c b/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c index c5504f8..ca81b35 100644 --- a/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c +++ b/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c @@ -29,14 +29,14 @@ int __attribute__((noinline,noclone)) test_2_caller (int i) { struct box b; - return test_2_callee (i + 1, b); /* { dg-error "cannot tail-call: callee required more stack slots than the caller" } */ + return test_2_callee (i + 1, b); /* { dg-error "cannot tail-call: callee required more stack slots than the caller|argument must be passed by copying" } */ } extern void setjmp (void); void test_3 (void) { - setjmp (); /* { dg-error "cannot tail-call: callee returns twice" } */ + setjmp (); /* { dg-error "cannot tail-call: callee returns twice|target is not able to optimize the call into a sibling call" } */ } void @@ -45,7 +45,7 @@ test_4 (void) void nested (void) { } - nested (); /* { dg-error "cannot tail-call: nested function" } */ + nested (); /* { dg-error "cannot tail-call: nested function|target is not able to optimize the call into a sibling call" } */ } typedef void (fn_ptr_t) (void); @@ -54,5 +54,5 @@ volatile fn_ptr_t fn_ptr; void test_5 (void) { - fn_ptr (); /* { dg-error "cannot tail-call: callee does not return" } */ + fn_ptr (); /* { dg-error "cannot tail-call: callee does not return|target is not able to optimize the call into a sibling call" } */ }