From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 0AC75388DD40; Thu, 15 Dec 2022 12:58:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0AC75388DD40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671109107; bh=nuYD48zQHi9bjLJ9dxVzZ6ntnlNmlMv0l+6l8pFsRNk=; h=From:To:Subject:Date:From; b=efXv7U8et6zXuGiyPlg6tDrxJPYGP58gL12ZKwZpbBPZ3HjJTK9fTOvNQrhhob7dm OiZ1c6q1dau1L1DgHAGzL5+3fvhrPKlfu9coEKyiAJ22N7BYvn9rrYz49a84nyEbfv /o7h/J+pIJ1+68xcffQH5teau8YLd0uFmuMoaTkw= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-4719] testsuite: Add support for Rust and Modula-2 effective target tests X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: 32582c190b91287a0d1239162333f5ad0ac81e72 X-Git-Newrev: 9cf9f3c7629d768d940d9f87cddcd616bb0449e0 Message-Id: <20221215125827.0AC75388DD40@sourceware.org> Date: Thu, 15 Dec 2022 12:58:27 +0000 (GMT) List-Id: https://gcc.gnu.org/g:9cf9f3c7629d768d940d9f87cddcd616bb0449e0 commit r13-4719-g9cf9f3c7629d768d940d9f87cddcd616bb0449e0 Author: Jakub Jelinek Date: Thu Dec 15 13:57:43 2022 +0100 testsuite: Add support for Rust and Modula-2 effective target tests This patch allows magic comments also for Rust and Modula-2 for effective target tests etc. and fixes up the Assembly entry - it is a glob, so /* Assembly can match /whatever Assembly and not just /* Assembly. Tested on x86_64-linux with make check-g++ RUNTESTFLAGS=i386.exp=pr35513* and verifying it still uses *.S extension for the property_1_needed effective target test. 2022-12-15 Jakub Jelinek * lib/target-supports.exp (check_compile): Add support for Rust and Modula-2. Use \* rather than * for /* comment for Assembly. Diff: --- gcc/testsuite/lib/target-supports.exp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2a058c67c53..e9867a4529c 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -36,7 +36,9 @@ # "! Fortran" for Fortran code, # "/* ObjC", for ObjC # "// ObjC++" for ObjC++ -# and "// Go" for Go +# "// Go" for Go +# "// Rust" for Rust +# and "(* Modula-2" for Modula-2 # If the tool is ObjC/ObjC++ then we overide the extension to .m/.mm to # allow for ObjC/ObjC++ specific flags. @@ -58,13 +60,15 @@ proc check_compile {basename type contents args} { set options "" } switch -glob -- $contents { - "*/* Assembly*" { set src ${basename}[pid].S } + "*/\* Assembly*" { set src ${basename}[pid].S } "*! Fortran*" { set src ${basename}[pid].f90 } "*// C++*" { set src ${basename}[pid].cc } "*// D*" { set src ${basename}[pid].d } "*// ObjC++*" { set src ${basename}[pid].mm } "*/* ObjC*" { set src ${basename}[pid].m } "*// Go*" { set src ${basename}[pid].go } + "*// Rust*" { set src ${basename}[pid].rs } + "*(\* Modula-2*" { set src ${basename}[pid].mod } default { switch -- $tool { "objc" { set src ${basename}[pid].m }