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
This commit is contained in:
Hans-Peter Nilsson 2012-02-14 22:06:56 +00:00 committed by Hans-Peter Nilsson
parent 169264b372
commit 5cd3514cdd
9 changed files with 34 additions and 0 deletions

View file

@ -1,3 +1,15 @@
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

View file

@ -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 {

View file

@ -1,6 +1,7 @@
/* { dg-lto-options {{-flto -fgnu-tm}} } */
/* { dg-lto-do link } */
/* { dg-require-effective-target stdint_types } */
/* { dg-require-effective-target fgnu_tm } */
int i;

View file

@ -1,6 +1,7 @@
/* { 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"

View file

@ -1,6 +1,7 @@
/* { 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

View file

@ -1,6 +1,7 @@
/* { 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));

View file

@ -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 {

View file

@ -1,5 +1,6 @@
! { dg-do compile }
! { dg-options "-fgnu-tm" }
! { dg-require-effective-target fgnu_tm }
program foo
real x
end program foo

View file

@ -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 {} {