From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1386) id 1574C3858C60; Fri, 28 Apr 2023 06:53:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1574C3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682664793; bh=tggJHBmAaFjBa9n1J6+trrSKo+16f7PGycoRmhGSi54=; h=From:To:Subject:Date:From; b=g1gFLKVkdEtcJ1jJFxUACJpB4nW9kNpgZgnbWhzlxh6FDmIrGpB4R6shHEtNAjifS hk7K+I9y7LDMPbGCHtW934roDou91oF9YB3rynLcL9/PSwgpHei79yBbquXyg7t2rA soXXmITBzYKaJkHdnI1SedXDTI8hMdYVRNMY54uI= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jan Beulich To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-315] testsuite/C++: suppress filename canonicalization in module tests X-Act-Checkin: gcc X-Git-Author: Jan Beulich X-Git-Refname: refs/heads/master X-Git-Oldrev: 9be54d6abad76b0d7f227687bf6b296e562d89fb X-Git-Newrev: d76c343d6a6295a8cc612fc19a99156aa0976180 Message-Id: <20230428065313.1574C3858C60@sourceware.org> Date: Fri, 28 Apr 2023 06:53:13 +0000 (GMT) List-Id: https://gcc.gnu.org/g:d76c343d6a6295a8cc612fc19a99156aa0976180 commit r14-315-gd76c343d6a6295a8cc612fc19a99156aa0976180 Author: Jan Beulich Date: Fri Apr 28 08:53:00 2023 +0200 testsuite/C++: suppress filename canonicalization in module tests The pathname underneath gcm.cache/ is determined from the effective name used for the main input file of a particular module. When modules are built, no canonicalization occurs for the main input file. Hence the module file wouldn't be found if a different (the canonicalized) file name was used when importing that same module. (This is an effect of importing happening in the preprocessor, just like #include handling.) Since it doesn't look easy to make module generation use libcpp's maybe_shorter_path() (in fact I'd consider this a layering violation, while cloning the logic would - at least in principle - be prone to both going out of sync), simply suppress system header path canonicalization for the respective tests. gcc/testsuite/ * g++.dg/modules/alias-1_b.C: Add -fno-canonical-system-headers. * g++.dg/modules/alias-1_d.C: Likewise. * g++.dg/modules/alias-1_e.C: Likewise. * g++.dg/modules/alias-1_f.C: Likewise. * g++.dg/modules/cpp-6_c.C: Likewise. * g++.dg/modules/dir-only-2_b.C: Likewise. Diff: --- gcc/testsuite/g++.dg/modules/alias-1_b.C | 2 +- gcc/testsuite/g++.dg/modules/alias-1_d.C | 2 +- gcc/testsuite/g++.dg/modules/alias-1_e.C | 2 +- gcc/testsuite/g++.dg/modules/alias-1_f.C | 2 +- gcc/testsuite/g++.dg/modules/cpp-6_c.C | 2 +- gcc/testsuite/g++.dg/modules/dir-only-2_b.C | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/g++.dg/modules/alias-1_b.C b/gcc/testsuite/g++.dg/modules/alias-1_b.C index b3d7c2df353..1a5c6aa85e6 100644 --- a/gcc/testsuite/g++.dg/modules/alias-1_b.C +++ b/gcc/testsuite/g++.dg/modules/alias-1_b.C @@ -1,4 +1,4 @@ -// { dg-additional-options "-fmodules-ts -fdump-lang-module -isystem [srcdir]" } +// { dg-additional-options "-fmodules-ts -fdump-lang-module -isystem [srcdir] -fno-canonical-system-headers" } // Alias at the header file. We have one CMI file import "alias-1_a.H"; diff --git a/gcc/testsuite/g++.dg/modules/alias-1_d.C b/gcc/testsuite/g++.dg/modules/alias-1_d.C index 9b481e5b185..3ed74ee9006 100644 --- a/gcc/testsuite/g++.dg/modules/alias-1_d.C +++ b/gcc/testsuite/g++.dg/modules/alias-1_d.C @@ -1,4 +1,4 @@ -// { dg-additional-options "-fmodules-ts -isystem [srcdir]" } +// { dg-additional-options "-fmodules-ts -isystem [srcdir] -fno-canonical-system-headers" } // { dg-module-cmi kevin } export module kevin; diff --git a/gcc/testsuite/g++.dg/modules/alias-1_e.C b/gcc/testsuite/g++.dg/modules/alias-1_e.C index 862ae32882f..2abcb9b9142 100644 --- a/gcc/testsuite/g++.dg/modules/alias-1_e.C +++ b/gcc/testsuite/g++.dg/modules/alias-1_e.C @@ -1,4 +1,4 @@ -// { dg-additional-options "-fmodules-ts -isystem [srcdir]" } +// { dg-additional-options "-fmodules-ts -isystem [srcdir] -fno-canonical-system-headers" } import bob; import kevin; diff --git a/gcc/testsuite/g++.dg/modules/alias-1_f.C b/gcc/testsuite/g++.dg/modules/alias-1_f.C index 4c694d1a903..ac30a6b24e7 100644 --- a/gcc/testsuite/g++.dg/modules/alias-1_f.C +++ b/gcc/testsuite/g++.dg/modules/alias-1_f.C @@ -1,4 +1,4 @@ -// { dg-additional-options "-fmodules-ts -fdump-lang-module -isystem [srcdir]" } +// { dg-additional-options "-fmodules-ts -fdump-lang-module -isystem [srcdir] -fno-canonical-system-headers" } import kevin; import bob; diff --git a/gcc/testsuite/g++.dg/modules/cpp-6_c.C b/gcc/testsuite/g++.dg/modules/cpp-6_c.C index f9b1e2d68b7..2a34bb87ee4 100644 --- a/gcc/testsuite/g++.dg/modules/cpp-6_c.C +++ b/gcc/testsuite/g++.dg/modules/cpp-6_c.C @@ -1,5 +1,5 @@ // { dg-do preprocess } -// { dg-additional-options "-fmodules-ts -isystem [srcdir]" } +// { dg-additional-options "-fmodules-ts -isystem [srcdir] -fno-canonical-system-headers" } #define empty #define nop(X) X diff --git a/gcc/testsuite/g++.dg/modules/dir-only-2_b.C b/gcc/testsuite/g++.dg/modules/dir-only-2_b.C index 0691f76ae36..1009ae5b3a2 100644 --- a/gcc/testsuite/g++.dg/modules/dir-only-2_b.C +++ b/gcc/testsuite/g++.dg/modules/dir-only-2_b.C @@ -1,5 +1,5 @@ // { dg-do preprocess } -// { dg-additional-options "-fmodules-ts -fdirectives-only -isystem [srcdir]" } +// { dg-additional-options "-fmodules-ts -fdirectives-only -isystem [srcdir] -fno-canonical-system-headers" } // a comment module; // line frob