]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
5aff873451f5a331007042e6c0df4d0c7fcfe2ec
[gcc.git] / gcc / testsuite / gcc.c-torture / execute / builtins / builtins.exp
1 # This harness is for testing builtin support. Each test has two files:
2 #
3 # - foo.c defines the main testing function, main_test().
4 # - foo-lib.c implements the library functions that foo.c is testing.
5 #
6 # The functions in foo-lib.c will often want to abort on certain inputs.
7 # They can use the global variable inside_main to see whether they are
8 # being called from the test program or part of the common runtime.
9 #
10 # In many cases, the library functions will behave as normal at -O0
11 # and abort when optimisation is enabled. Such implementations should
12 # go into the lib/ directory so that they can be included by any test
13 # that needs them. They shouldn't call any external functions in case
14 # those functions were overridden too.
15
16 load_lib c-torture.exp
17
18 set additional_flags ""
19 if [istarget "powerpc-*-darwin*"] {
20 lappend additional_flags "-Wl,-multiply_defined,suppress"
21 }
22
23 foreach src [lsort [find $srcdir/$subdir *.c]] {
24 if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} {
25 c-torture-execute [list $src \
26 [file root $src]-lib.c \
27 $srcdir/$subdir/lib/main.c] \
28 $additional_flags
29 }
30 }
This page took 0.037164 seconds and 4 git commands to generate.