1 # Copyright (C) 2021-2023 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with GCC; see the file COPYING3. If not see
15 # <http://www.gnu.org/licenses/>.
17 # Compile tests, no torture testing.
19 # These tests are used to keep track of known limitations :
20 # 1- tests that are incorrecly build instead of being rejected
21 # 2- tests that are build to an incorrect result
22 # 3- tests that are rejected instead of being correctly build
24 # Not currently supported here:
25 # - tests that are exhibiting incorrect behavior at runtime
27 # Here's how to annotate tests for each cases:
29 # 1- test is successfuly build instead of being rejected
31 # Expected behavior: a specific error rejecting the test
32 # Observed behavior: error not present
33 # Use dg-error and mark the test xfail and add reference to corresponding issue.
34 # { dg-error "lifetime not defined" "#359" { xfail *-*-* } }
36 # 2- test is successfuly build but result is incorrect
38 # Expected behavior: test is correctly build and has specific property
39 # Observed behavior: test is correctly build but is missing the specific property
40 # Depends on the property. For example, if the property can be checked in the assembly file, use dg-final + xfail.
41 # { dg-final { scan-assembler "given_string_missing_in_assembly_" "#1234" { xfail *-*-* } } }
43 # 3- test is rejected instead of being correctly build
45 # Expected behavior: test is successfully build
46 # Observed behavior: the test is rejected with an error
47 # Use dg-bogus + xfail to match the bogus error message, or use dg-xfail-if if it's harder to match a specific error.
56 set saved-dg-do-what-default ${dg-do-what-default}
58 set dg-do-what-default "compile"
59 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.rs]] "" ""
60 set dg-do-what-default ${saved-dg-do-what-default}