Commit 5cd3514c by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

target-supports.exp (check_effective_target_fgnu_tm): New proc.

	* lib/target-supports.exp (check_effective_target_fgnu_tm): New
	proc.
	* gfortran.dg/trans-mem-skel.f90: Gate test on effective_target
	fgnu_tm. 
	* gcc.dg/lto/trans-mem-1_0.c, gcc.dg/lto/trans-mem-2_0.c,
	gcc.dg/lto/trans-mem-3_0.c, gcc.dg/lto/trans-mem-4_0.c: Ditto.
	* gcc.dg/tm/tm.exp: Gate the whole of gcc.dg/tm on
	effective_target fgnu_tm.
	* g++.dg/tm/tm.exp: Ditto for g++.dg/tm.

From-SVN: r184237
parent 169264b3
2012-02-14 Hans-Peter Nilsson <hp@axis.com>
* lib/target-supports.exp (check_effective_target_fgnu_tm): New
proc.
* gfortran.dg/trans-mem-skel.f90: Gate test on effective_target
fgnu_tm.
* gcc.dg/lto/trans-mem-1_0.c, gcc.dg/lto/trans-mem-2_0.c,
gcc.dg/lto/trans-mem-3_0.c, gcc.dg/lto/trans-mem-4_0.c: Ditto.
* gcc.dg/tm/tm.exp: Gate the whole of gcc.dg/tm on
effective_target fgnu_tm.
* g++.dg/tm/tm.exp: Ditto for g++.dg/tm.
2012-02-14 Jakub Jelinek <jakub@redhat.com>
PR c++/52247
......
......@@ -19,6 +19,10 @@
# Load support procs.
load_lib g++-dg.exp
if ![check_effective_target_fgnu_tm] {
return
}
# If a testcase doesn't have special options, use these.
global DEFAULT_CXXFLAGS
if ![info exists DEFAULT_CXXFLAGS] then {
......
/* { dg-lto-options {{-flto -fgnu-tm}} } */
/* { dg-lto-do link } */
/* { dg-require-effective-target stdint_types } */
/* { dg-require-effective-target fgnu_tm } */
int i;
......
/* { dg-lto-options {{-flto -fgnu-tm}} } */
/* { dg-lto-do link } */
/* { dg-require-effective-target stdint_types } */
/* { dg-require-effective-target fgnu_tm } */
#include "trans-mem.h"
......
/* { dg-lto-options {{-flto}} } */
/* { dg-lto-do link } */
/* { dg-require-effective-target stdint_types } */
/* { dg-require-effective-target fgnu_tm } */
/* Test that we can build one object file with -fgnu-tm
(trans-mem-3_1.c), but do the final link of all objects without
......
/* { dg-lto-options {{-flto -fgnu-tm}} } */
/* { dg-lto-do link } */
/* { dg-require-effective-target stdint_types } */
/* { dg-require-effective-target fgnu_tm } */
extern void foo() __attribute__((transaction_safe));
......
......@@ -19,6 +19,10 @@
# Load support procs.
load_lib gcc-dg.exp
if ![check_effective_target_fgnu_tm] {
return
}
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
......
! { dg-do compile }
! { dg-options "-fgnu-tm" }
! { dg-require-effective-target fgnu_tm }
program foo
real x
end program foo
......@@ -716,6 +716,15 @@ proc check_effective_target_fopenmp {} {
} "-fopenmp"]
}
# Return 1 if compilation with -fgnu-tm is error-free for trivial
# code, 0 otherwise.
proc check_effective_target_fgnu_tm {} {
return [check_no_compiler_messages fgnu_tm object {
void foo (void) { }
} "-fgnu-tm"]
}
# Return 1 if the target supports mmap, 0 otherwise.
proc check_effective_target_mmap {} {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment