On Sat, Sep 06, 2025 at 03:54:31PM +1000, Nathaniel Shead wrote:
>       * g++.dg/modules/default-arg-4_a.C: XFAIL bogus errors.
>       * g++.dg/modules/default-arg-4_b.C: Likewise.
> --- a/gcc/testsuite/g++.dg/modules/default-arg-4_a.C
> +++ b/gcc/testsuite/g++.dg/modules/default-arg-4_a.C
> @@ -17,3 +17,7 @@ qux ()
>  {
>    return foo () + bar <int> () + baz <int> ();
>  }
> +
> +export using ::foo;
> +export using ::bar;
> +export using ::baz;
> diff --git a/gcc/testsuite/g++.dg/modules/default-arg-4_b.C 
> b/gcc/testsuite/g++.dg/modules/default-arg-4_b.C
> index 98b3a5f4ba7..7ed003ff398 100644
> --- a/gcc/testsuite/g++.dg/modules/default-arg-4_b.C
> +++ b/gcc/testsuite/g++.dg/modules/default-arg-4_b.C
> @@ -1,23 +1,23 @@
>  // C++20 P1766R1 - Mitigating minor modules maladies
> -// { dg-do run }
> +// { dg-module-do run }
>  // { dg-additional-options "-fmodules-ts" }
>  
>  import M;
>  
>  int
> -foo (int i = 42)
> +foo (int i = 42)                     // { dg-bogus "default argument given 
> for parameter 1 of 'int foo\\\(int\\\)'" "PR99000" { xfail *-*-* } }
>  {
>    return i;
>  }
>  
> -template <typename T, typename U = int>
> +template <typename T, typename U = int>      // { dg-bogus "redefinition of 
> default argument for 'class U'" "PR99000" { xfail *-*-* } }
>  int
>  bar ()
>  {
>    return sizeof (U);
>  }
>  
> -template <typename T, int N = 42>
> +template <typename T, int N = 42>    // { dg-bogus "redefinition of default 
> argument for 'int N'" "PR99000" { xfail *-*-* } }
>  int
>  baz ()
>  {

I'm getting
UNRESOLVED: g++.dg/modules/default-arg-4 -std=c++17 execute
UNRESOLVED: g++.dg/modules/default-arg-4 -std=c++17 link
UNRESOLVED: g++.dg/modules/default-arg-4 -std=c++20 execute
UNRESOLVED: g++.dg/modules/default-arg-4 -std=c++20 link
UNRESOLVED: g++.dg/modules/default-arg-4 -std=c++23 execute
UNRESOLVED: g++.dg/modules/default-arg-4 -std=c++23 link
UNRESOLVED: g++.dg/modules/default-arg-4 -std=c++26 execute
UNRESOLVED: g++.dg/modules/default-arg-4 -std=c++26 link
because of this.  The error messages (even with xfailed dg-bogus)
mean the compilation fails, so linking nor running isn't done.
So at least temporarily the test should be dg-do compile (dunno what
dg-module-do does, maybe dg-module-do compile) until the errors are
fixed.

        Jakub

Reply via email to