c++/modules: Propagate TYPE_CANONICAL for partial specialisations [PR113814]
[official-gcc.git] / gcc / testsuite / gcc.target / mips / inter / mips16-inter.exp
blob853e9969a34c938b5d573d00f9cfae2543a14b47
1 # Copyright (C) 2007-2024 Free Software Foundation, Inc.
3 # This file is part of GCC.
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.
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.
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 # <http://www.gnu.org/licenses/>.
19 # Run compatibility tests in which the "alt" compiler tries to force
20 # MIPS16 mode.
22 # We can only guarantee MIPS16 runtime support for certain targets.
23 if { ![istarget mipsisa*-*-elf*] && ![istarget mips64vr*-*-elf*] } {
24 return
27 load_lib gcc-dg.exp
29 # Check whether the flags are compatible with MIPS16 code generation.
30 if { ![check_effective_target_mips16_attribute] } {
31 return
34 # Save the old value of CFLAGS_FOR_TARGET, if any.
35 global saved_CFLAGS_FOR_TARGET
36 if { [info exists CFLAGS_FOR_TARGET] } {
37 set saved_CFLAGS_FOR_TARGET $CFLAGS_FOR_TARGET
38 } else {
39 unset -nocomplain saved_CFLAGS_FOR_TARGET
42 # The "alt" compiler is the normal compiler with an extra "-mips16" argument.
43 proc compat-use-alt-compiler { } {
44 global saved_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET
46 if { [info exists saved_CFLAGS_FOR_TARGET] } {
47 set CFLAGS_FOR_TARGET [concat $saved_CFLAGS_FOR_TARGET "-mips16"]
48 } else {
49 set CFLAGS_FOR_TARGET "-mips16"
53 # Make the compiler under test the default.
54 proc compat-use-tst-compiler { } {
55 global saved_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET
57 if { [info exists saved_CFLAGS_FOR_TARGET] } {
58 set CFLAGS_FOR_TARGET $saved_CFLAGS_FOR_TARGET
59 } else {
60 unset -nocomplain CFLAGS_FOR_TARGET
64 load_lib compat.exp
66 gcc_init
67 foreach src [lsort [find $srcdir/$subdir mips16_*_main.c]] {
68 if { [runtest_file_p $runtests $src] } {
69 compat-execute $src "mips16_inter" 1
72 compat-use-tst-compiler