OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtins/] [builtins.exp] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
2
#
3
# This file is part of GCC.
4
#
5
# GCC is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3, or (at your option)
8
# any later version.
9
#
10
# GCC is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with GCC; see the file COPYING3.  If not see
17
# .
18
 
19
# This harness is for testing builtin support.  Each test has two files:
20
#
21
#    - foo.c defines the main testing function, main_test().
22
#    - foo-lib.c implements the library functions that foo.c is testing.
23
#
24
# The functions in foo-lib.c will often want to abort on certain inputs.
25
# They can use the global variable inside_main to see whether they are
26
# being called from the test program or part of the common runtime.
27
#
28
# In many cases, the library functions will behave as normal at -O0
29
# and abort when optimisation is enabled.  Such implementations should
30
# go into the lib/ directory so that they can be included by any test
31
# that needs them.  They shouldn't call any external functions in case
32
# those functions were overridden too.
33
 
34
load_lib torture-options.exp
35
load_lib c-torture.exp
36
 
37
torture-init
38
set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
39
 
40
set additional_flags ""
41
if [istarget "powerpc-*-darwin*"] {
42
   lappend additional_flags "-Wl,-multiply_defined,suppress"
43
}
44
 
45
foreach src [lsort [find $srcdir/$subdir *.c]] {
46
    if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} {
47
        c-torture-execute [list $src \
48
                                [file root $src]-lib.c \
49
                                $srcdir/$subdir/lib/main.c] \
50
                                $additional_flags
51
    }
52
}
53
 
54
torture-finish

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.