Commit 42360811 by Bernd Schmidt Committed by Bernd Schmidt

Convert execute.exp to use the dg framework.

	* gcc.c-torture/execute/execute.exp: Replace with slightly adapted
	copy of compile/compile.exp.
	* gcc.c-torture/execute/20010122-1.c: Skip if -fomit-frame-pointer.
	* gcc.c-torture/execute/20010129-1.c: Add -mtune=i686 if compiling for
	i?86-*.
	* gcc.c-torture/execute/20020404-1.c: Require int32plus.  Skip if
	m32c-*-*.
	* gcc.c-torture/execute/20021024-1.c: Require int32plus.
	* gcc.c-torture/execute/20021127-1.c: Add -std=c99 option.
	* gcc.c-torture/execute/20030125-1.c: Require c99_runtime.
	* gcc.c-torture/execute/20030216-1.c: Skip if -O1.
	* gcc.c-torture/execute/20030222-1.c: Skip on spu-*-*.
	* gcc.c-torture/execute/20040629-1.c: Require int32plus.
	* gcc.c-torture/execute/20040703-1.c: Likewise.
	* gcc.c-torture/execute/20040705-1.c: Likewise.
	* gcc.c-torture/execute/20040705-2.c: Likewise.
	* gcc.c-torture/execute/20040709-1.c: Likewise.
	* gcc.c-torture/execute/20040709-2.c: Likewise.
	* gcc.c-torture/execute/20040811-1.c: Likewise.
	* gcc.c-torture/execute/20050316-1.c: Likewise.  Add -Wno-psabi.
	* gcc.c-torture/execute/20050316-2.c: Use -mno-mmx -Wno-psabi when
	compiling for x86_64-* or i?86-*.
	* gcc.c-torture/execute/20050604-1.c: Likewise.
	* gcc.c-torture/execute/20050316-3.c: Add -Wno-psabi option.
	* gcc.c-torture/execute/20050604-1.c: Use -mno-mmx when	compiling
	for x86_64-* or i?86-*.
	* gcc.c-torture/execute/20061101-1.c: Require int32plus.
	* gcc.c-torture/execute/20061220-1.c: Skip on rl78-*.
	* gcc.c-torture/execute/20081117-1.c: Require int32plus.
	* gcc.c-torture/execute/20101011-1.c: Add -fnon-call-exceptions
	option.
	* gcc.c-torture/execute/20111227-2.c: Moved to...
	* gcc.dg/20111227-2.c: ... here.  Add -free option.
	* gcc.c-torture/execute/20111227-3.c: Likewise move to...
	* gcc.dg/20111227-3.c: ... here.  Add -free option.
	* gcc.c-torture/execute/20120919-1.c: Require int32plus.
	* gcc.c-torture/execute/920612-1.c: Add -fwrapv option.  Add
	declarations for abort and exit.
	* gcc.c-torture/execute/920711-1.c: Likewise.
	* gcc.c-torture/execute/930529-1.c: Likewise.
	* gcc.c-torture/execute/980709-1.c: Xfail if on AIX with -msoft-float.
	* gcc.c-torture/execute/981130-1.c: Xfail on m32r-* with scheduling.
	* gcc.c-torture/execute/990127-1.c: Add delcarations for abort and
	exit.
	* gcc.c-torture/execute/990127-2.c: Add -mpc64 option if compiling
	for i?86-* or x86_64-*.  Add declarations for abort and exit.
	* gcc.c-torture/execute/990413-2.c: Skip if not compiling for
	i?86-* or x86_64-*.
	* gcc.c-torture/execute/990826-0.c: Xfail if on AIX with -msoft-float.
	* gcc.c-torture/execute/bf64-1.c: Xfail on mcore-*.
	* gcc.c-torture/execute/bitfld-4.c: Require int32plus.
	* gcc.c-torture/execute/cmpsi-2.c: Likewise.
	* gcc.c-torture/execute/eeprof-1.c: Add -finstrument-functions option.
	Xfail on powerpc-ibm-aix*.  Add declaration for abort.
	* gcc.c-torture/execute/ipa-sra-2.c: Require int32plus.
	* gcc.c-torture/execute/loop-2f.c: Require mmap.  Skip if on
	m68k-linux.
	* gcc.c-torture/execute/loop-2g.c: Likewise.
	* gcc.c-torture/execute/mode-dependent-address.c: Require stdint_types.
	* gcc.c-torture/execute/nest-align-1.c: Add -mno-eabi option for
	powerpc-*-eabi*.
	* gcc.c-torture/execute/pr19689.c: Require int32plus.
	* gcc.c-torture/execute/pr22493-1.c: Add -fwrapv option.
	* gcc.c-torture/execute/pr23047.c: Likewise.
	* gcc.c-torture/execute/pr23135.c: Add -Wno-psabi option.  Add
	declarations for abort and exit.
	* gcc.c-torture/execute/pr29797-1.c: Require int32plus.
	* gcc.c-torture/execute/pr31448.c: Likewise.
	* gcc.c-torture/execute/pr35456.c: Skip on vax.
	* gcc.c-torture/execute/pr37573.c: Require int32plus.
	* gcc.c-torture/execute/pr38151.c: Add -Wno-psabi option.
	* gcc.c-torture/execute/pr39228.c: Add -mieee for sh* and alpha*.
	Skip on spu-*.
	* gcc.c-torture/execute/pr39501.c: Add -ffast-math option.  Add
	declarations for abort and exit.
	* gcc.c-torture/execute/pr40386.c: Add declarations for abort and exit.
	* gcc.c-torture/execute/pr43220.c: Require int32plus.
	* gcc.c-torture/execute/pr44583.c: Add -mieee option for sh*.
	* gcc.c-torture/execute/pr45262.c: Require int32plus.
	* gcc.c-torture/execute/pr47237.c: Xfail on nios2-*.
	* gcc.c-torture/execute/pr51581-1.c: Require int32plus.
	* gcc.c-torture/execute/pr51582-2.c: Likewise.
	* gcc.c-torture/execute/pr52979-1.c: Likewise.
	* gcc.c-torture/execute/pr52979-2.c: Likewise.
	* gcc.c-torture/execute/pr56799.c: Likewise.
	* gcc.c-torture/execute/pr57124.c: Likewise.  Add -fno-strict-overflow
	option.  Add declarations for abort and exit.
	* gcc.c-torture/execute/pr57344-2.c: Require int32plus.
	* gcc.c-torture/execute/pr58570.c: Likewise.
	* gcc.c-torture/execute/pr60822.c: Likewise.
	* gcc.c-torture/execute/pr7284-1.c: Likewise.
	* gcc.c-torture/execute/shiftdi.c: Likewise.
	* gcc.c-torture/execute/simd-4.c: Require stdint_types.
	* gcc.c-torture/execute/strncmp-1.c: Xfail if vxworks_kernel.
	* gcc.c-torture/execute/usmul.c: Require int32plus.
	* gcc.c-torture/execute/vrp-5.c: Likewise.
	* gcc.c-torture/execute/vrp-6.c: Likewise.
	* gcc.c-torture/execute/zerolen-2.c: Skip on epiphany-*.
	* gcc.c-torture/execute/20010122-1.x: Delete.
	* gcc.c-torture/execute/20010129-1.x: Delete.
	* gcc.c-torture/execute/20020404-1.x: Delete.
	* gcc.c-torture/execute/20021024-1.x: Delete.
	* gcc.c-torture/execute/20021127-1.x: Delete.
	* gcc.c-torture/execute/20030125-1.x: Delete.
	* gcc.c-torture/execute/20030216-1.x: Delete.
	* gcc.c-torture/execute/20030222-1.x: Delete.
	* gcc.c-torture/execute/20040629-1.x: Delete.
	* gcc.c-torture/execute/20040703-1.x: Delete.
	* gcc.c-torture/execute/20040705-1.x: Delete.
	* gcc.c-torture/execute/20040705-2.x: Delete.
	* gcc.c-torture/execute/20040709-1.x: Delete.
	* gcc.c-torture/execute/20040709-2.x: Delete.
	* gcc.c-torture/execute/20040811-1.x: Delete.
	* gcc.c-torture/execute/20050316-1.x: Delete.
	* gcc.c-torture/execute/20050316-2.x: Delete.
	* gcc.c-torture/execute/20050316-3.x: Delete.
	* gcc.c-torture/execute/20050604-1.x: Delete.
	* gcc.c-torture/execute/20061101-1.x: Delete.
	* gcc.c-torture/execute/20061220-1.x: Delete.
	* gcc.c-torture/execute/20081117-1.x: Delete.
	* gcc.c-torture/execute/20101011-1.x: Delete.
	* gcc.c-torture/execute/20120919-1.x: Delete.
	* gcc.c-torture/execute/920612-1.x: Delete.
	* gcc.c-torture/execute/920710-1.x: Delete.
	* gcc.c-torture/execute/920711-1.x: Delete.
	* gcc.c-torture/execute/930529-1.x: Delete.
	* gcc.c-torture/execute/931004-12.x: Delete.
	* gcc.c-torture/execute/980709-1.x: Delete.
	* gcc.c-torture/execute/981130-1.x: Delete.
	* gcc.c-torture/execute/990127-2.x: Delete.
	* gcc.c-torture/execute/990413-2.x: Delete.
	* gcc.c-torture/execute/990826-0.x: Delete.
	* gcc.c-torture/execute/bf64-1.x: Delete.
	* gcc.c-torture/execute/bitfld-4.x: Delete.
	* gcc.c-torture/execute/cmpsi-2.x: Delete.
	* gcc.c-torture/execute/cvt-1.x: Delete.
	* gcc.c-torture/execute/eeprof-1.x: Delete.
	* gcc.c-torture/execute/ipa-sra-2.x: Delete.
	* gcc.c-torture/execute/loop-2f.x: Delete.
	* gcc.c-torture/execute/loop-2g.x: Delete.
	* gcc.c-torture/execute/mode-dependent-address.x: Delete.
	* gcc.c-torture/execute/nest-align-1.x: Delete.
	* gcc.c-torture/execute/pr19689.x: Delete.
	* gcc.c-torture/execute/pr22493-1.x: Delete.
	* gcc.c-torture/execute/pr23047.x: Delete.
	* gcc.c-torture/execute/pr23135.x: Delete.
	* gcc.c-torture/execute/pr29797-1.x: Delete.
	* gcc.c-torture/execute/pr31448.x: Delete.
	* gcc.c-torture/execute/pr35456.x: Delete.
	* gcc.c-torture/execute/pr37573.x: Delete.
	* gcc.c-torture/execute/pr38151.x: Delete.
	* gcc.c-torture/execute/pr39228.x: Delete.
	* gcc.c-torture/execute/pr39501.x: Delete.
	* gcc.c-torture/execute/pr40386.x: Delete.
	* gcc.c-torture/execute/pr43220.x: Delete.
	* gcc.c-torture/execute/pr44683.x: Delete.
	* gcc.c-torture/execute/pr45262.x: Delete.
	* gcc.c-torture/execute/pr47237.x: Delete.
	* gcc.c-torture/execute/pr51581-1.x: Delete.
	* gcc.c-torture/execute/pr51581-2.x: Delete.
	* gcc.c-torture/execute/pr52979-1.x: Delete.
	* gcc.c-torture/execute/pr52979-2.x: Delete.
	* gcc.c-torture/execute/pr53366-1.x: Delete.
	* gcc.c-torture/execute/pr56799.x: Delete.
	* gcc.c-torture/execute/pr57124.x: Delete.
	* gcc.c-torture/execute/pr57344-2.x: Delete.
	* gcc.c-torture/execute/pr58570.x: Delete.
	* gcc.c-torture/execute/pr60822.x: Delete.
	* gcc.c-torture/execute/pr7284-1.x: Delete.
	* gcc.c-torture/execute/shiftdi.x: Delete.
	* gcc.c-torture/execute/simd-4.x: Delete.
	* gcc.c-torture/execute/strncmp-1.x: Delete.
	* gcc.c-torture/execute/usmul.x: Delete.
	* gcc.c-torture/execute/vrp-5.x: Delete.
	* gcc.c-torture/execute/vrp-6.x: Delete.
	* gcc.c-torture/execute/zerolen-2.x: Delete.

From-SVN: r214433
parent d099d9a4
2014-08-25 Bernd Schmidt <bernds@codesourcery.com>
* gcc.c-torture/execute/execute.exp: Replace with slightly adapted
copy of compile/compile.exp.
* gcc.c-torture/execute/20010122-1.c: Skip if -fomit-frame-pointer.
* gcc.c-torture/execute/20010129-1.c: Add -mtune=i686 if compiling for
i?86-*.
* gcc.c-torture/execute/20020404-1.c: Require int32plus. Skip if
m32c-*-*.
* gcc.c-torture/execute/20021024-1.c: Require int32plus.
* gcc.c-torture/execute/20021127-1.c: Add -std=c99 option.
* gcc.c-torture/execute/20030125-1.c: Require c99_runtime.
* gcc.c-torture/execute/20030216-1.c: Skip if -O1.
* gcc.c-torture/execute/20030222-1.c: Skip on spu-*-*.
* gcc.c-torture/execute/20040629-1.c: Require int32plus.
* gcc.c-torture/execute/20040703-1.c: Likewise.
* gcc.c-torture/execute/20040705-1.c: Likewise.
* gcc.c-torture/execute/20040705-2.c: Likewise.
* gcc.c-torture/execute/20040709-1.c: Likewise.
* gcc.c-torture/execute/20040709-2.c: Likewise.
* gcc.c-torture/execute/20040811-1.c: Likewise.
* gcc.c-torture/execute/20050316-1.c: Likewise. Add -Wno-psabi.
* gcc.c-torture/execute/20050316-2.c: Use -mno-mmx -Wno-psabi when
compiling for x86_64-* or i?86-*.
* gcc.c-torture/execute/20050604-1.c: Likewise.
* gcc.c-torture/execute/20050316-3.c: Add -Wno-psabi option.
* gcc.c-torture/execute/20050604-1.c: Use -mno-mmx when compiling
for x86_64-* or i?86-*.
* gcc.c-torture/execute/20061101-1.c: Require int32plus.
* gcc.c-torture/execute/20061220-1.c: Skip on rl78-*.
* gcc.c-torture/execute/20081117-1.c: Require int32plus.
* gcc.c-torture/execute/20101011-1.c: Add -fnon-call-exceptions
option.
* gcc.c-torture/execute/20111227-2.c: Moved to...
* gcc.dg/20111227-2.c: ... here. Add -free option.
* gcc.c-torture/execute/20111227-3.c: Likewise move to...
* gcc.dg/20111227-3.c: ... here. Add -free option.
* gcc.c-torture/execute/20120919-1.c: Require int32plus.
* gcc.c-torture/execute/920612-1.c: Add -fwrapv option. Add
declarations for abort and exit.
* gcc.c-torture/execute/920711-1.c: Likewise.
* gcc.c-torture/execute/930529-1.c: Likewise.
* gcc.c-torture/execute/980709-1.c: Xfail if on AIX with -msoft-float.
* gcc.c-torture/execute/981130-1.c: Xfail on m32r-* with scheduling.
* gcc.c-torture/execute/990127-1.c: Add delcarations for abort and
exit.
* gcc.c-torture/execute/990127-2.c: Add -mpc64 option if compiling
for i?86-* or x86_64-*. Add declarations for abort and exit.
* gcc.c-torture/execute/990413-2.c: Skip if not compiling for
i?86-* or x86_64-*.
* gcc.c-torture/execute/990826-0.c: Xfail if on AIX with -msoft-float.
* gcc.c-torture/execute/bf64-1.c: Xfail on mcore-*.
* gcc.c-torture/execute/bitfld-4.c: Require int32plus.
* gcc.c-torture/execute/cmpsi-2.c: Likewise.
* gcc.c-torture/execute/eeprof-1.c: Add -finstrument-functions option.
Xfail on powerpc-ibm-aix*. Add declaration for abort.
* gcc.c-torture/execute/ipa-sra-2.c: Require int32plus.
* gcc.c-torture/execute/loop-2f.c: Require mmap. Skip if on
m68k-linux.
* gcc.c-torture/execute/loop-2g.c: Likewise.
* gcc.c-torture/execute/mode-dependent-address.c: Require stdint_types.
* gcc.c-torture/execute/nest-align-1.c: Add -mno-eabi option for
powerpc-*-eabi*.
* gcc.c-torture/execute/pr19689.c: Require int32plus.
* gcc.c-torture/execute/pr22493-1.c: Add -fwrapv option.
* gcc.c-torture/execute/pr23047.c: Likewise.
* gcc.c-torture/execute/pr23135.c: Add -Wno-psabi option. Add
declarations for abort and exit.
* gcc.c-torture/execute/pr29797-1.c: Require int32plus.
* gcc.c-torture/execute/pr31448.c: Likewise.
* gcc.c-torture/execute/pr35456.c: Skip on vax.
* gcc.c-torture/execute/pr37573.c: Require int32plus.
* gcc.c-torture/execute/pr38151.c: Add -Wno-psabi option.
* gcc.c-torture/execute/pr39228.c: Add -mieee for sh* and alpha*.
Skip on spu-*.
* gcc.c-torture/execute/pr39501.c: Add -ffast-math option. Add
declarations for abort and exit.
* gcc.c-torture/execute/pr40386.c: Add declarations for abort and exit.
* gcc.c-torture/execute/pr43220.c: Require int32plus.
* gcc.c-torture/execute/pr44583.c: Add -mieee option for sh*.
* gcc.c-torture/execute/pr45262.c: Require int32plus.
* gcc.c-torture/execute/pr47237.c: Xfail on nios2-*.
* gcc.c-torture/execute/pr51581-1.c: Require int32plus.
* gcc.c-torture/execute/pr51582-2.c: Likewise.
* gcc.c-torture/execute/pr52979-1.c: Likewise.
* gcc.c-torture/execute/pr52979-2.c: Likewise.
* gcc.c-torture/execute/pr56799.c: Likewise.
* gcc.c-torture/execute/pr57124.c: Likewise. Add -fno-strict-overflow
option. Add declarations for abort and exit.
* gcc.c-torture/execute/pr57344-2.c: Require int32plus.
* gcc.c-torture/execute/pr58570.c: Likewise.
* gcc.c-torture/execute/pr60822.c: Likewise.
* gcc.c-torture/execute/pr7284-1.c: Likewise.
* gcc.c-torture/execute/shiftdi.c: Likewise.
* gcc.c-torture/execute/simd-4.c: Require stdint_types.
* gcc.c-torture/execute/strncmp-1.c: Xfail if vxworks_kernel.
* gcc.c-torture/execute/usmul.c: Require int32plus.
* gcc.c-torture/execute/vrp-5.c: Likewise.
* gcc.c-torture/execute/vrp-6.c: Likewise.
* gcc.c-torture/execute/zerolen-2.c: Skip on epiphany-*.
* gcc.c-torture/execute/20010122-1.x: Delete.
* gcc.c-torture/execute/20010129-1.x: Delete.
* gcc.c-torture/execute/20020404-1.x: Delete.
* gcc.c-torture/execute/20021024-1.x: Delete.
* gcc.c-torture/execute/20021127-1.x: Delete.
* gcc.c-torture/execute/20030125-1.x: Delete.
* gcc.c-torture/execute/20030216-1.x: Delete.
* gcc.c-torture/execute/20030222-1.x: Delete.
* gcc.c-torture/execute/20040629-1.x: Delete.
* gcc.c-torture/execute/20040703-1.x: Delete.
* gcc.c-torture/execute/20040705-1.x: Delete.
* gcc.c-torture/execute/20040705-2.x: Delete.
* gcc.c-torture/execute/20040709-1.x: Delete.
* gcc.c-torture/execute/20040709-2.x: Delete.
* gcc.c-torture/execute/20040811-1.x: Delete.
* gcc.c-torture/execute/20050316-1.x: Delete.
* gcc.c-torture/execute/20050316-2.x: Delete.
* gcc.c-torture/execute/20050316-3.x: Delete.
* gcc.c-torture/execute/20050604-1.x: Delete.
* gcc.c-torture/execute/20061101-1.x: Delete.
* gcc.c-torture/execute/20061220-1.x: Delete.
* gcc.c-torture/execute/20081117-1.x: Delete.
* gcc.c-torture/execute/20101011-1.x: Delete.
* gcc.c-torture/execute/20120919-1.x: Delete.
* gcc.c-torture/execute/920612-1.x: Delete.
* gcc.c-torture/execute/920710-1.x: Delete.
* gcc.c-torture/execute/920711-1.x: Delete.
* gcc.c-torture/execute/930529-1.x: Delete.
* gcc.c-torture/execute/931004-12.x: Delete.
* gcc.c-torture/execute/980709-1.x: Delete.
* gcc.c-torture/execute/981130-1.x: Delete.
* gcc.c-torture/execute/990127-2.x: Delete.
* gcc.c-torture/execute/990413-2.x: Delete.
* gcc.c-torture/execute/990826-0.x: Delete.
* gcc.c-torture/execute/bf64-1.x: Delete.
* gcc.c-torture/execute/bitfld-4.x: Delete.
* gcc.c-torture/execute/cmpsi-2.x: Delete.
* gcc.c-torture/execute/cvt-1.x: Delete.
* gcc.c-torture/execute/eeprof-1.x: Delete.
* gcc.c-torture/execute/ipa-sra-2.x: Delete.
* gcc.c-torture/execute/loop-2f.x: Delete.
* gcc.c-torture/execute/loop-2g.x: Delete.
* gcc.c-torture/execute/mode-dependent-address.x: Delete.
* gcc.c-torture/execute/nest-align-1.x: Delete.
* gcc.c-torture/execute/pr19689.x: Delete.
* gcc.c-torture/execute/pr22493-1.x: Delete.
* gcc.c-torture/execute/pr23047.x: Delete.
* gcc.c-torture/execute/pr23135.x: Delete.
* gcc.c-torture/execute/pr29797-1.x: Delete.
* gcc.c-torture/execute/pr31448.x: Delete.
* gcc.c-torture/execute/pr35456.x: Delete.
* gcc.c-torture/execute/pr37573.x: Delete.
* gcc.c-torture/execute/pr38151.x: Delete.
* gcc.c-torture/execute/pr39228.x: Delete.
* gcc.c-torture/execute/pr39501.x: Delete.
* gcc.c-torture/execute/pr40386.x: Delete.
* gcc.c-torture/execute/pr43220.x: Delete.
* gcc.c-torture/execute/pr44683.x: Delete.
* gcc.c-torture/execute/pr45262.x: Delete.
* gcc.c-torture/execute/pr47237.x: Delete.
* gcc.c-torture/execute/pr51581-1.x: Delete.
* gcc.c-torture/execute/pr51581-2.x: Delete.
* gcc.c-torture/execute/pr52979-1.x: Delete.
* gcc.c-torture/execute/pr52979-2.x: Delete.
* gcc.c-torture/execute/pr53366-1.x: Delete.
* gcc.c-torture/execute/pr56799.x: Delete.
* gcc.c-torture/execute/pr57124.x: Delete.
* gcc.c-torture/execute/pr57344-2.x: Delete.
* gcc.c-torture/execute/pr58570.x: Delete.
* gcc.c-torture/execute/pr60822.x: Delete.
* gcc.c-torture/execute/pr7284-1.x: Delete.
* gcc.c-torture/execute/shiftdi.x: Delete.
* gcc.c-torture/execute/simd-4.x: Delete.
* gcc.c-torture/execute/strncmp-1.x: Delete.
* gcc.c-torture/execute/usmul.x: Delete.
* gcc.c-torture/execute/vrp-5.x: Delete.
* gcc.c-torture/execute/vrp-6.x: Delete.
* gcc.c-torture/execute/zerolen-2.x: Delete.
2014-08-25 Paolo Carlini <paolo.carlini@oracle.com> 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
* g++.old-deja/g++.pt/var1.C: Use c++14, not c++1y, in dg-error. * g++.old-deja/g++.pt/var1.C: Use c++14, not c++1y, in dg-error.
......
/* { dg-skip-if "requires frame pointers" { *-*-* } "-fomit-frame-pointer" "" } */
extern void exit (int); extern void exit (int);
extern void abort (void); extern void abort (void);
......
# This test relies on __builtin_return_address(1) returning something
# useful or NULL. This is not guaranteed to be be so, especially when
# -fomit-frame-pointer is used. So do not test with it.
set torture_eval_before_compile {
if {[string match {*-fomit-frame-pointer*} "$option"]} {
continue
}
}
return 0
/* { dg-options "-mtune-i686" { target { { i?86*-*-* } && ilp32 } } } */
long baz1 (void *a) long baz1 (void *a)
{ {
static long l; static long l;
......
# Use "-mtune=i686" on i?86-*-* unless "-m64" is specified.
if { [istarget "i?86-*-*"] } {
set target_name [target_info name]
if {[board_info $target_name exists multilib_flags]} {
set multilib_flags [board_info $target_name multilib_flags]
if { ![regexp -- "-m64" $multilib_flags] } {
set additional_flags "-mtune=i686"
}
} else {
set additional_flags "-mtune=i686"
}
}
return 0
/* { dg-require-effective-target int32plus } */
/* { dg-skip-if "pointers can be truncated" { m32c-*-* } "*" "" } */
/* Extracted from GDB sources. */ /* Extracted from GDB sources. */
typedef long long bfd_signed_vma; typedef long long bfd_signed_vma;
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
# m32c pointers can be 24 bits in a 32 bit variable, so the test
# patterns may get truncated.
if { [istarget "m32c-*-*"] } {
return 1
}
return 0
/* Origin: PR target/6981 from Mattias Engdegaard <mattias@virtutech.se>. */ /* Origin: PR target/6981 from Mattias Engdegaard <mattias@virtutech.se>. */
/* { dg-require-effective-target int32plus } */
void exit (int); void exit (int);
void abort (void); void abort (void);
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* { dg-options "-std=c99" } */
long long a = -1; long long a = -1;
long long llabs (long long); long long llabs (long long);
void abort (void); void abort (void);
......
set additional_flags "-std=c99"
return 0
/* Verify whether math functions are simplified. */ /* Verify whether math functions are simplified. */
/* { dg-require-effective-target c99_runtime } */
double sin(double); double sin(double);
double floor(double); double floor(double);
float float
......
# Only glibc includes all c99 functions at the moment.
if { ! ([istarget "*-linux*"]
|| [istarget "*-gnu*"])} then {
return 1
}
if { [check_effective_target_uclibc] } { return 1 }
return 0
/* This test requires constant propagation of loads and stores to be
enabled. This is only guaranteed at -O2 and higher. Do not run
at -O1. */
/* { dg-skip-if "requires higher optimization" { *-*-* } "-O1" "" } */
void link_error (void); void link_error (void);
const double one=1.0; const double one=1.0;
main () main ()
......
# This test requires constant propagation of loads and stores to be
# enabled. This is only guaranteed at -O2 and higher. Do not run
# at -O1.
set torture_eval_before_compile {
if {[string match {*-O1*} "$option"]} {
continue
}
}
return 0
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
succeeded at all. We use volatile to make sure the long long is succeeded at all. We use volatile to make sure the long long is
actually truncated to int, in case a single register is wide enough actually truncated to int, in case a single register is wide enough
for a long long. */ for a long long. */
/* { dg-skip-if "asm would require extra shift-left-4-byte" { spu-*-* } "*" "" } */
#include <limits.h> #include <limits.h>
void void
......
if [istarget "spu-*-*"] {
# Using inline assembly to convert long long to int is not working quite
# right # on the SPU. An extra shift-left-4-byte is needed.
return 1
}
return 0
/* { dg-require-effective-target int32plus } */
/* Test arithmetics on bitfields. */ /* Test arithmetics on bitfields. */
#ifndef T #ifndef T
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* PR 16341 */ /* PR 16341 */
/* { dg-require-effective-target int32plus } */
#define PART_PRECISION (sizeof (cpp_num_part) * 8) #define PART_PRECISION (sizeof (cpp_num_part) * 8)
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* { dg-require-effective-target int32plus } */
#define FIELDS1 long long l; #define FIELDS1 long long l;
#include "20040629-1.c" #include "20040629-1.c"
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* { dg-require-effective-target int32plus } */
#define FIELDS2 long long l; #define FIELDS2 long long l;
#include "20040629-1.c" #include "20040629-1.c"
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* { dg-require-effective-target int32plus } */
/* Test arithmetics on bitfields. */ /* Test arithmetics on bitfields. */
extern void abort (void); extern void abort (void);
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* Test arithmetics on bitfields. */ /* Test arithmetics on bitfields. */
/* { dg-require-effective-target int32plus } */
extern void abort (void); extern void abort (void);
extern void exit (int); extern void exit (int);
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* { dg-require-effective-target int32plus } */
/* Ensure that we deallocate X when branching back before its /* Ensure that we deallocate X when branching back before its
declaration. */ declaration. */
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* PR rtl-optimization/16104 */ /* PR rtl-optimization/16104 */
/* { dg-require-effective-target int32plus } */
/* { dg-options "-Wno-psabi" } */
extern void abort (void); extern void abort (void);
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
set additional_flags "-Wno-psabi"
return 0;
/* This testcase generates MMX instructions together with x87 instructions.
Currently, there is no "emms" generated to switch between register sets,
so the testcase fails for targets where MMX insns are enabled. */
/* { dg-options "-mno-mmx -Wno-psabi" { target { x86_64-*-* i?86-*-* } } } */
extern void abort (void); extern void abort (void);
typedef int V2SI __attribute__ ((vector_size (8))); typedef int V2SI __attribute__ ((vector_size (8)));
......
# This testcase generates MMX instructions together with x87 instructions.
# Currently, there is no "emms" generated to switch between register sets,
# so the testcase fails for targets where MMX insns are enabled.
if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
set additional_flags "-mno-mmx"
}
return 0
/* { dg-options "-Wno-psabi" } */
extern void abort (void); extern void abort (void);
typedef int V2SI __attribute__ ((vector_size (8))); typedef int V2SI __attribute__ ((vector_size (8)));
......
set additional_flags "-Wno-psabi"
return 0
/* PR regression/21897 */ /* PR regression/21897 */
/* This testcase generates MMX instructions together with x87 instructions.
Currently, there is no "emms" generated to switch between register sets,
so the testcase fails for targets where MMX insns are enabled. */
/* { dg-options "-mno-mmx" { target { x86_64-*-* i?86-*-* } } } */
extern void abort (void); extern void abort (void);
......
# This testcase generates MMX instructions together with x87 instructions.
# Currently, there is no "emms" generated to switch between register sets,
# so the testcase fails for targets where MMX insns are enabled.
if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
set additional_flags "-mno-mmx"
}
set additional_flags "-Wno-psabi"
return 0
/* PR rtl-optimization/28970 */ /* PR rtl-optimization/28970 */
/* Origin: Peter Bergner <bergner@vnet.ibm.com> */ /* Origin: Peter Bergner <bergner@vnet.ibm.com> */
/* { dg-require-effective-target int32plus } */
extern void abort (void); extern void abort (void);
......
load_lib target-supports.exp
if { [check_effective_target_int32plus] } {
return 0
}
return 1;
/* PR middle-end/30262 */ /* PR middle-end/30262 */
/* { dg-skip-if "asm statements do not work as expected" { rl78-*-* } "*" "" } */
extern void abort (void); extern void abort (void);
int int
......
# asm statements for the RL78 do not work as expected
if { [istarget "rl78-*-*"] } {
return 1;
}
return 0
/* { dg-require-effective-target int32plus } */
extern void abort (void); extern void abort (void);
struct s struct s
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0
/* With -fnon-call-exceptions 0 / 0 should not be eliminated. The .x /* { dg-options "-fnon-call-exceptions" } */
file sets the option. */ /* With -fnon-call-exceptions 0 / 0 should not be eliminated. */
#ifdef SIGNAL_SUPPRESS #ifdef SIGNAL_SUPPRESS
# define DO_TEST 0 # define DO_TEST 0
...@@ -75,6 +75,9 @@ __aeabi_idiv0 (int return_value) ...@@ -75,6 +75,9 @@ __aeabi_idiv0 (int return_value)
# define DO_TEST 1 # define DO_TEST 1
#endif #endif
extern void abort (void);
extern void exit (int);
#if DO_TEST #if DO_TEST
#include <signal.h> #include <signal.h>
......
set additional_flags "-fnon-call-exceptions"
return 0
/* PR rtl-optimization/54290 */ /* PR rtl-optimization/54290 */
/* Testcase by Eric Volk <eriksnga@gmail.com> */ /* Testcase by Eric Volk <eriksnga@gmail.com> */
/* { dg-require-effective-target int32plus } */
double vd[2] = {1., 0.}; double vd[2] = {1., 0.};
int vi[2] = {1234567890, 0}; int vi[2] = {1234567890, 0};
......
load_lib target-supports.exp
if { [check_effective_target_int32plus] } {
return 0
}
return 1;
/* { dg-options "-fwrapv" } */
extern void abort (void);
extern void exit (int);
f(j)int j;{return++j>0;} f(j)int j;{return++j>0;}
main(){if(f((~0U)>>1))abort();exit(0);} main(){if(f((~0U)>>1))abort();exit(0);}
set additional_flags "-fwrapv"
return 0
# h8300 does not have long long
if { [istarget "h8300-*-*"] } {
return 1;
}
return 0
/* { dg-options "-fwrapv" } */
extern void abort (void);
extern void exit (int);
f(long a){return (--a > 0);} f(long a){return (--a > 0);}
main(){if(f(0x80000000L)==0)abort();exit(0);} main(){if(f(0x80000000L)==0)abort();exit(0);}
set additional_flags "-fwrapv"
return 0
/* { dg-options { "-fwrapv" } } */
extern void abort (void);
extern void exit (int);
dd (x,d) { return x / d; } dd (x,d) { return x / d; }
main () main ()
......
# The problem on Alpha at -O3 is that when dd is inlined, we have
# division by a constant, which gets converted to multiplication
# by a large constant, which gets turned into an induction variable.
# The problem is that the multiplication was unsigned SImode, and the
# induction variable is DImode, and we lose the truncation that
# should have happened.
#
# On tree-ssa branch, the loop problem is still extant, but the
# gimple-level optimization makes it easy for the tree-rtl expanders
# to see that the comparisons are always true, and so the loop code
# is never exercized.
# set torture_eval_before_execute {
#
# set compiler_conditional_xfail_data {
# "division by a constant conflicts with strength reduction" \
# "alpha*-*-*" \
# { "-O3" } \
# { "" }
# }
# }
set additional_flags "-fwrapv"
return 0
if { [istarget "powerpc-*-darwin*] } {
# xfail this on powerpc-*-darwin, see PR 15923
set torture_execute_xfail [istarget]
}
return 0
/* { dg-xfail-if "Can not call system libm.a with -msoft-float" { powerpc-*-aix* rs6000-*-aix* } { "-msoft-float" } { "" } } */
#include <math.h> #include <math.h>
main() main()
......
# XFAIL this test for AIX using -msoft-float.
# This test calls the system libm.a function pow.
# A false failure is reported if -msoft-float is used.
# AIX expects the parameters to be passed in fp regs.
if { [istarget powerpc-*-aix*] || [istarget rs6000-*-aix*] } {
set torture_eval_before_execute {
global compiler_conditional_xfail_data
set compiler_conditional_xfail_data {
"Can not call system libm.a with -msoft-float" \
"*-*-aix*" \
{ "-msoft-float" } \
{ "" }
}
}
}
return 0
/* { dg-xfail-if "alias analysis conflicts with instruction scheduling" { m32r-*-* } { "-O2" "-O1" "-O0" "-Os"} { "" } } */
struct s { int a; int b;}; struct s { int a; int b;};
struct s s1; struct s s1;
struct s s2 = { 1, 2, }; struct s s2 = { 1, 2, };
......
# This test is known to fail on targets that use the instruction scheduler
# at optimisation levels of 2 or more because the alias analysis is confused
# by the reassignment of a variable structure to a fixed structure. The
# failure could be suppressed by preventing instruction scheduling:
#
# set additional_flags "-fno-schedule-insns2";
#
# but this would disguise the fact that there is a problem. Instead we use
# we generate an xfail result and explain that it is alias analysis that
# is at fault.
set torture_eval_before_execute {
set compiler_conditional_xfail_data {
"alias analysis conflicts with instruction scheduling" \
"m32r-*-*" \
{ "-O2" "-O1" "-O0" "-Os"} \
{ "" }
}
}
return 0
extern void abort (void);
extern void exit (int);
main() main()
{ {
int a,b,c; int a,b,c;
......
/* { dg-options "-mpc64" { target { i?86-*-* x86_64-*-* } } } */
extern void abort (void);
extern void exit (int);
void void
fpEq (double x, double y) fpEq (double x, double y)
{ {
......
# On x86 targets, two floating-point double values can't be reliably compared
# for inequality due to excess precision of 80387 floating-point coprocessor.
# Use -mpc64 to force 80387 floating-point precision to 64 bits. This option
# has no effect on SSE, but it is needed in case of -m32 on x86_64 targets.
if { [istarget i?86-*-darwin*]
|| [istarget i?86-*-linux*]
|| [istarget i?86-*-gnu*]
|| [istarget i?86-*-kfreebsd*-gnu]
|| [istarget i?86-*-knetbsd*-gnu]
|| [istarget i?86-*-solaris2*]
|| [istarget x86_64-*-darwin*]
|| [istarget x86_64-*-linux*]
|| [istarget x86_64-*-kfreebsd*-gnu]
|| [istarget x86_64-*-knetbsd*-gnu]
|| [istarget x86_64-*-solaris2*] } {
set additional_flags "-mpc64"
}
return 0
/* This tests for a bug in regstack that was breaking glibc's math library. */ /* This tests for a bug in regstack that was breaking glibc's math library. */
/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */
extern void abort (void); extern void abort (void);
......
# This test is x86 specific.
if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } { return 0 }
return 1
...@@ -6,6 +6,8 @@ Date: Sun, 06 Jun 1999 23:37:23 -0400 ...@@ -6,6 +6,8 @@ Date: Sun, 06 Jun 1999 23:37:23 -0400
X-UIDL: 9c1e40c572e3b306464f703461764cd5 X-UIDL: 9c1e40c572e3b306464f703461764cd5
*/ */
/* { dg-xfail-if "Can not call system libm.a with -msoft-float" { powerpc-*-aix* rs6000-*-aix* } { "-msoft-float" } { "" } } */
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
......
# XFAIL this test for AIX using -msoft-float.
# This test calls the system libm.a function floor.
# A false failure is reported if -msoft-float is used.
# AIX expects the parameters to be passed in fp regs.
if { [istarget powerpc-*-aix*] || [istarget rs6000-*-aix*] } {
set torture_eval_before_execute {
global compiler_conditional_xfail_data
set compiler_conditional_xfail_data {
"Can not call system libm.a with -msoft-float" \
"*-*-aix*" \
{ "-msoft-float" } \
{ "" }
}
}
}
return 0
/* { dg-xfail-if "ABI specifies bitfields cannot exceed 32 bits" { mcore-*-* } "*" "" } */
struct tmp struct tmp
{ {
long long int pad : 12; long long int pad : 12;
......
# The MCore ABI specifies that bitfields may not exceed 32 bits.
# Hence this tes will fail.
if { [istarget "mcore-*-*"] } {
set torture_execute_xfail "mcore-*-*"
}
return 0
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
32-bit systems. */ 32-bit systems. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-require-effective-target int32plus } */
extern void abort (void); extern void abort (void);
struct s { int a:12, b:20; }; struct s { int a:12, b:20; };
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* { dg-require-effective-target int32plus } */
#define F 140 #define F 140
#define T 13 #define T 13
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
# This doesn't work on d10v if ints are not 32 bits
if { [istarget "d10v-*-*"] && ! [string-match "*-mint32*" $CFLAGS] } {
set torture_execute_xfail "d10v-*-*"
}
return 0
/* { dg-options "-finstrument-functions" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */
extern void abort (void);
#define ASSERT(X) if (!(X)) abort (); #define ASSERT(X) if (!(X)) abort ();
#define NOCHK __attribute__ ((no_instrument_function)) #define NOCHK __attribute__ ((no_instrument_function))
......
if { [istarget "powerpc-ibm-aix*"] } {
set torture_execute_xfail "powerpc-ibm-aix*"
}
set additional_flags "-finstrument-functions"
return 0
...@@ -22,28 +22,17 @@ ...@@ -22,28 +22,17 @@
# C torture test suite. # C torture test suite.
# #
if $tracelevel then { # Load support procs.
strace $tracelevel load_lib gcc-dg.exp
}
# load support procs # Initialize `dg'.
load_lib torture-options.exp dg-init
load_lib c-torture.exp
torture-init # Main loop.
set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS set saved-dg-do-what-default ${dg-do-what-default}
set dg-do-what-default "run"
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" "-w"
set dg-do-what-default ${saved-dg-do-what-default}
# # All done.
# main test loop dg-finish
#
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $src] then {
continue
}
c-torture-execute $src
}
torture-finish
/* { dg-require-effective-target int32plus } */
struct big struct big
{ {
int data[1000000]; int data[1000000];
......
load_lib target-supports.exp
return [expr [check_effective_target_int16 ]]
/* { dg-require-effective-target mmap } */
/* { dg-skip-if "the executable is at the same position the test tries to remap" { m68k-*-linux* } { "*" } { "" } } */
#include <limits.h> #include <limits.h>
#include <sys/types.h> #include <sys/types.h>
......
load_lib target-supports.exp
if { ! [check_effective_target_mmap] } {
return 1
}
if [istarget "m68k-*-linux*"] {
# the executable is at the same position the test tries to remap
return 1
}
return 0
/* { dg-require-effective-target mmap } */
/* { dg-skip-if "the executable is at the same position the test tries to remap" { m68k-*-linux* } { "*" } { "" } } */
#include <limits.h> #include <limits.h>
#include <sys/types.h> #include <sys/types.h>
......
load_lib target-supports.exp
if { ! [check_effective_target_mmap] } {
return 1
}
if [istarget "m68k-*-linux*"] {
# the executable is at the same position the test tries to remap
return 1
}
return 0
/* { dg-require-effective-target stdint_types } */
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
......
load_lib target-supports.exp
if { ! [check_effective_target_stdint_types] } {
return 1
}
return 0
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
function. */ function. */
/* Origin: Joey Ye <joey.ye@intel.com> */ /* Origin: Joey Ye <joey.ye@intel.com> */
/* Force bigger stack alignment for PowerPC EABI targets. */
/* { dg-options "-mno-eabi" { target powerpc-*-eabi* } } */
#include <stddef.h> #include <stddef.h>
typedef int aligned __attribute__((aligned)); typedef int aligned __attribute__((aligned));
......
# Force bigger stack alignment for PowerPC EABI targets.
if { [istarget "powerpc-*-eabi*"] } {
set additional_flags "-mno-eabi"
}
return 0
/* { dg-require-effective-target int32plus } */
extern void abort (void); extern void abort (void);
struct struct
......
load_lib target-supports.exp
if { [check_effective_target_int16] } {
return 1
}
return 0;
/* { dg-options "-fwrapv" } */
#include <limits.h> #include <limits.h>
extern void abort (); extern void abort ();
extern void exit (int); extern void exit (int);
......
set additional_flags "-fwrapv"
return 0
/* { dg-options "-fwrapv" } */
#include <limits.h> #include <limits.h>
extern void abort (); extern void abort ();
extern void exit (int); extern void exit (int);
......
set additional_flags "-fwrapv"
return 0
/* Based on execute/simd-1.c, modified by joern.rennecke@st.com to /* Based on execute/simd-1.c, modified by joern.rennecke@st.com to
trigger a reload bug. Verified for gcc mainline from 20050722 13:00 UTC trigger a reload bug. Verified for gcc mainline from 20050722 13:00 UTC
for sh-elf -m4 -O2. */ for sh-elf -m4 -O2. */
/* { dg-options "-Wno-psabi" } */
#ifndef STACK_SIZE #ifndef STACK_SIZE
#define STACK_SIZE (256*1024) #define STACK_SIZE (256*1024)
#endif #endif
extern void abort (void);
extern void exit (int);
typedef struct { char c[STACK_SIZE/2]; } big_t; typedef struct { char c[STACK_SIZE/2]; } big_t;
typedef int __attribute__((mode(SI))) __attribute__((vector_size (8))) vecint; typedef int __attribute__((mode(SI))) __attribute__((vector_size (8))) vecint;
......
set additional_flags "-Wno-psabi"
return 0
/* { dg-require-effective-target int32plus } */
extern void abort(void); extern void abort(void);
unsigned int bar(void) { return 32768; } unsigned int bar(void) { return 32768; }
......
load_lib target-supports.exp
if { [check_effective_target_int32plus] } {
return 0
}
return 1;
/* PR middle-end/31448, this used to ICE during expand because /* PR middle-end/31448, this used to ICE during expand because
reduce_to_bit_field_precision was not ready to handle constants. */ reduce_to_bit_field_precision was not ready to handle constants. */
/* { dg-require-effective-target int32plus } */
typedef struct _st { typedef struct _st {
int iIndex : 24; int iIndex : 24;
......
load_lib target-supports.exp
if { [check_effective_target_int32plus] } {
return 0
}
return 1;
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