]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / aarch64 / aapcs64 / aapcs64.exp
CommitLineData
fbd26352 1# Copyright (C) 2009-2019 Free Software Foundation, Inc.
d2a8fd17 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
20load_lib c-torture.exp
21load_lib target-supports.exp
22load_lib torture-options.exp
23
24if { ![istarget aarch64*-*-*] } then {
25 return
26}
27
28torture-init
29set-torture-options $C_TORTURE_OPTIONS
30set additional_flags "-W -Wall -Wno-abi"
31
32# Test parameter passing.
33foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] {
34 if {[runtest_file_p $runtests $src]} {
35 c-torture-execute [list $src \
36 $srcdir/$subdir/abitest.S] \
37 $additional_flags
38 }
39}
40
84ee0905 41# Test parameter receiving.
42set additional_flags_for_rec $additional_flags
43append additional_flags_for_rec " -fno-inline"
44foreach src [lsort [glob -nocomplain $srcdir/$subdir/rec_*.c]] {
45 if {[runtest_file_p $runtests $src]} {
46 c-torture-execute [list $src] \
47 $additional_flags_for_rec
48 }
49}
50
d2a8fd17 51# Test unnamed argument retrieval via the va_arg macro.
52foreach src [lsort [glob -nocomplain $srcdir/$subdir/va_arg-*.c]] {
53 if {[runtest_file_p $runtests $src]} {
54 c-torture-execute [list $src \
55 $srcdir/$subdir/abitest.S] \
56 $additional_flags
57 }
58}
59
60# Test function return value.
fcf56aaf 61# Disable -fipa-ra to prevent the compiler from generating
c5b187cd 62# conflicting code.
63set additional_flags_for_func_ret $additional_flags
fcf56aaf 64append additional_flags_for_func_ret " -fno-ipa-ra"
d2a8fd17 65foreach src [lsort [glob -nocomplain $srcdir/$subdir/func-ret-*.c]] {
66 if {[runtest_file_p $runtests $src]} {
67 c-torture-execute [list $src \
68 $srcdir/$subdir/abitest.S] \
c5b187cd 69 $additional_flags_for_func_ret
d2a8fd17 70 }
71}
72
73# Test no internal compiler errors.
74foreach src [lsort [glob -nocomplain $srcdir/$subdir/ice_*.c]] {
75 if {[runtest_file_p $runtests $src]} {
76 c-torture [list $src] \
77 $additional_flags
78 }
79}
80
81torture-finish