On Fri, 2016-05-27 at 13:29 +0100, Thomas Preudhomme wrote: > Hi Rainer, > > On Wednesday 25 May 2016 11:31:12 Rainer Orth wrote: > > David Malcolm 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 My aim with these tests was to try to cover the various ways in which mandatory tail-call optimization can fail. However, this is very target-dependent, and, as written, the test over -specifies the output. Sorry about this. I've run the test on all of the configurations in contrib/config -list.mk (using the patch kit in https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02100.html ) Collated output can be seen here: https://dmalcolm.fedorapeople.org/gcc/2016-05-27/must-tail-call-logs.txt showing all the different error messages across every configuration. It's not clear to me what the best way forward here is. We could simply check for error: cannot tail-call: and leave the precise messages we're checking for unspecified. If we care about checking for the precise messages, one of more duplicate copy(s) of the test could be provided, filtering by target to specify precise targets, giving more precise output, where this is known. I'm attaching a patch (sans ChangeLog) which strips the precise messages in the manner described above. Retesting on all targets with this patch, the only remaining failures are of the form: must-tail-call-1.c:12:10: error: cannot tail-call: machine description does not have a sibcall_epilogue instruction pattern on targets lacking the pattern. Thoughts? Sorry again about the breakage Dave > 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, >