Fix addvdi3 and subvdi3 patterns
[official-gcc.git] / libstdc++-v3 / testsuite / libstdc++-dg / conformance.exp
blob366a22e9a3e6ef5f8169a6d6b6e0cedc2b9c708c
1 # Functional and regression tests in C++ for libstdc++.
3 # Copyright (C) 2001-2022 Free Software Foundation, Inc.
5 # This program 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 of the License, or
8 # (at your option) any later version.
9 #
10 # This program 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 this program; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 # libstdc++-v3 testsuite that uses the 'dg.exp' driver.
21 # Initialization.
22 dg-init
24 # Build the support objects.
25 v3-build_support
27 set tests [list]
29 # If there is a "testsuite_files" file, use it.
31 # This is a workaround for problems reported with using:
33 # runtest normal.exp="`cat testsuite_files`"
35 # See:
36 # http://gcc.gnu.org/ml/libstdc++/2005-03/msg00278.html
37 # for discussion of the problem.
39 # If that worked consistently, we could modify "make check" to
40 # pass that option, and then remove this code.
41 if {[info exists blddir]} {
42 set tests_file "${blddir}/testsuite/testsuite_files"
44 if {[info exists tests_file] && [file exists $tests_file]} {
45 set f [open $tests_file]
46 while { ! [eof $f] } {
47 set t [gets $f]
48 if { [string length "$t"] != 0 } {
49 lappend tests ${srcdir}/${t}
52 close $f
53 } else {
54 # Find directories that might have tests.
55 # This list should be consistent with scripts/create_testsuite_files
56 set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"]
57 lappend subdirs "$srcdir/std"
58 lappend subdirs "$srcdir/abi"
59 lappend subdirs "$srcdir/backward"
60 lappend subdirs "$srcdir/ext"
61 lappend subdirs "$srcdir/performance"
62 lappend subdirs "$srcdir/tr1"
63 lappend subdirs "$srcdir/tr2"
64 lappend subdirs "$srcdir/decimal"
65 lappend subdirs "$srcdir/experimental"
66 lappend subdirs "$srcdir/special_functions"
67 verbose "subdirs are $subdirs"
69 # Find all the tests.
70 foreach s $subdirs {
71 set subdir_tests [find $s *.cc]
72 set subdir_tests_c [find $s *.c]
73 foreach e $subdir_tests_c {
74 lappend subdir_tests $e
77 # Filter out tests that should not be run.
78 foreach t $subdir_tests {
79 # The DejaGNU "find" procedure sometimes returns a list
80 # containing an empty string, when it should really return
81 # an empty list.
82 if { $t == "" } {
83 continue
85 # Filter out:
86 # 0. utilities, other parts of the testing infrastructure.
87 # 1. interactive tests.
88 # 2. performance tests.
89 # 3. wchar_t tests, if not supported.
90 # 4. thread tests, if not supported.
91 # 5. *_filebuf, if file I/O is not supported.
92 # 6. simd tests.
93 if { [string first _xin $t] == -1
94 && [string first performance $t] == -1
95 && (${v3-wchar_t} || [string first wchar_t $t] == -1)
96 && (${v3-threads} || [string first thread $t] == -1)
97 && ([string first "_filebuf" $t] == -1
98 || [check_v3_target_fileio])
99 && [string first "/experimental/simd/" $t] == -1 } {
100 lappend tests $t
105 set tests [lsort $tests]
107 # Main loop.
108 global DEFAULT_CXXFLAGS
109 global PCH_CXXFLAGS
110 dg-runtest $tests "" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS"
112 # Finally run simd tests with extra SIMD-relevant flags
113 global DEFAULT_VECTCFLAGS
114 global EFFECTIVE_TARGETS
115 set DEFAULT_VECTCFLAGS ""
116 set EFFECTIVE_TARGETS ""
118 if [check_vect_support_and_set_flags] {
119 lappend DEFAULT_VECTCFLAGS "-O2"
120 lappend DEFAULT_VECTCFLAGS "-Wno-psabi"
121 et-dg-runtest dg-runtest [lsort \
122 [glob -nocomplain $srcdir/experimental/simd/*.cc]] \
123 "$DEFAULT_VECTCFLAGS" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS"
126 # All done.
127 dg-finish