Hi, using the -fgnu-tm option fails for targets not supporting libitm with a *link* failure. So the compile test wasn't sufficient.
With the attached patch the following failures disappear on s390 and s390x: FAIL: gcc.dg/lto/trans-mem-1 c_lto_trans-mem-1_0.o-c_lto_trans-mem-1_1.o link, -flto -fgnu-tm UNRESOLVED: gcc.dg/lto/trans-mem-1 c_lto_trans-mem-1_0.o-c_lto_trans-mem-1_1.o execute -flto -fgnu-tm FAIL: gcc.dg/lto/trans-mem-2 c_lto_trans-mem-2_0.o-c_lto_trans-mem-2_1.o link, -flto -fgnu-tm UNRESOLVED: gcc.dg/lto/trans-mem-2 c_lto_trans-mem-2_0.o-c_lto_trans-mem-2_1.o execute -flto -fgnu-tm FAIL: gcc.dg/lto/trans-mem-4 c_lto_trans-mem-4_0.o-c_lto_trans-mem-4_1.o link, -flto -fgnu-tm UNRESOLVED: gcc.dg/lto/trans-mem-4 c_lto_trans-mem-4_0.o-c_lto_trans-mem-4_1.o execute -flto -fgnu-tm XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times optimized "link_error" 0 Ok for mainline? Bye, -Andreas- 2012-02-21 Andreas Krebbel <andreas.kreb...@de.ibm.com> * lib/target-supports.exp (check_effective_target_fgnu_tm): Make it an "executable" test in order to check whether linking against libitm works. --- gcc/testsuite/lib/target-supports.exp | 4 !!!! 1 file changed, 4 modifications(!) Index: gcc/testsuite/lib/target-supports.exp =================================================================== *** gcc/testsuite/lib/target-supports.exp.orig --- gcc/testsuite/lib/target-supports.exp *************** proc check_effective_target_fopenmp {} { *** 720,727 **** # code, 0 otherwise. proc check_effective_target_fgnu_tm {} { ! return [check_no_compiler_messages fgnu_tm object { ! void foo (void) { } } "-fgnu-tm"] } --- 720,727 ---- # code, 0 otherwise. proc check_effective_target_fgnu_tm {} { ! return [check_no_compiler_messages fgnu_tm executable { ! int main (void) { return 0; } } "-fgnu-tm"] }