]>
Commit | Line | Data |
---|---|---|
99dee823 | 1 | # Copyright (C) 2009-2021 Free Software Foundation, Inc. |
77c4ae24 IB |
2 | # Contributed by ARM Ltd. |
3 | # | |
4 | # This file is part of GCC. | |
5 | # | |
6 | # GCC is free software; you can redistribute it and/or modify it | |
7 | # under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 3, or (at your option) | |
9 | # any later version. | |
10 | # | |
11 | # GCC is distributed in the hope that it will be useful, but | |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with GCC; see the file COPYING3. If not see | |
18 | # <http://www.gnu.org/licenses/>. */ | |
19 | ||
20 | load_lib c-torture.exp | |
21 | load_lib target-supports.exp | |
22 | load_lib torture-options.exp | |
23 | ||
24 | if { ![istarget aarch64*-*-*] } then { | |
25 | return | |
26 | } | |
27 | ||
28 | torture-init | |
29 | set-torture-options $C_TORTURE_OPTIONS | |
30 | set additional_flags "-W -Wall -Wno-abi" | |
31 | ||
2f7f96b1 JB |
32 | # Test parameter passing. This uses abitest.S which relies on weak |
33 | # symbols. | |
34 | ||
35 | if { [check_weak_available] } { | |
36 | foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] { | |
37 | if {[runtest_file_p $runtests $src]} { | |
77c4ae24 IB |
38 | c-torture-execute [list $src \ |
39 | $srcdir/$subdir/abitest.S] \ | |
40 | $additional_flags | |
2f7f96b1 | 41 | } |
77c4ae24 IB |
42 | } |
43 | } | |
44 | ||
5e3ee346 AL |
45 | # Test parameter receiving. |
46 | set additional_flags_for_rec $additional_flags | |
47 | append additional_flags_for_rec " -fno-inline" | |
48 | foreach src [lsort [glob -nocomplain $srcdir/$subdir/rec_*.c]] { | |
49 | if {[runtest_file_p $runtests $src]} { | |
50 | c-torture-execute [list $src] \ | |
51 | $additional_flags_for_rec | |
52 | } | |
53 | } | |
54 | ||
2f7f96b1 JB |
55 | # Test unnamed argument retrieval via the va_arg macro. This uses abitest.S |
56 | # which relies on weak symbols. | |
57 | if { [check_weak_available] } { | |
58 | foreach src [lsort [glob -nocomplain $srcdir/$subdir/va_arg-*.c]] { | |
59 | if {[runtest_file_p $runtests $src]} { | |
77c4ae24 IB |
60 | c-torture-execute [list $src \ |
61 | $srcdir/$subdir/abitest.S] \ | |
62 | $additional_flags | |
2f7f96b1 | 63 | } |
77c4ae24 IB |
64 | } |
65 | } | |
66 | ||
2f7f96b1 JB |
67 | # Test function return value. This uses abitest.S which relies on |
68 | # weak symbols. | |
69 | if { [check_weak_available] } { | |
70 | # Disable -fipa-ra to prevent the compiler from generating | |
71 | # conflicting code. | |
72 | set additional_flags_for_func_ret $additional_flags | |
73 | append additional_flags_for_func_ret " -fno-ipa-ra" | |
74 | foreach src [lsort [glob -nocomplain $srcdir/$subdir/func-ret-*.c]] { | |
75 | if {[runtest_file_p $runtests $src]} { | |
77c4ae24 IB |
76 | c-torture-execute [list $src \ |
77 | $srcdir/$subdir/abitest.S] \ | |
454a17a3 | 78 | $additional_flags_for_func_ret |
2f7f96b1 | 79 | } |
77c4ae24 IB |
80 | } |
81 | } | |
82 | ||
83 | # Test no internal compiler errors. | |
84 | foreach src [lsort [glob -nocomplain $srcdir/$subdir/ice_*.c]] { | |
85 | if {[runtest_file_p $runtests $src]} { | |
86 | c-torture [list $src] \ | |
87 | $additional_flags | |
88 | } | |
89 | } | |
90 | ||
91 | torture-finish |