On Thu, 14 May 2026 at 09:03, Tomasz Kamiński <[email protected]> wrote:
>
> As DejaGnu reads all lines, the { dg-error } still expected error,
> even if the code was removed by preprocessor checks.
>
> libstdc++-v3/ChangeLog:
>
>         * 
> testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon_eng_neg.cc:
>         Removed preprocessor checks, add dg-require-effective-target.
> ---
> Used combination of the flags that are used for core test.

Oh nice, I didn't realise we have a __float128 effective-target.

> Rainer could you check if the test now is properly marked as
> unsupported for you?

I've tested it on  sparc-sun-solaris2.11 (cfarm216) and it is
UNSUPPORTED for -m32/-m64 as expected.

OK for trunk.

> The test is still runnin on x86_64-linux, also with -m32.
>
>  .../operators/gencanon_eng_neg.cc              | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git 
> a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon_eng_neg.cc
>  
> b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon_eng_neg.cc
> index 8b241fee7ed..e3b4540bf2b 100644
> --- 
> a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon_eng_neg.cc
> +++ 
> b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon_eng_neg.cc
> @@ -1,4 +1,7 @@
>  // { dg-do compile { target { c++11 } } }
> +// { dg-require-effective-target __float128 }
> +// { dg-require-effective-target base_quadfloat_support }
> +// { dg-add-options __float128 }
>
>  #include <random>
>  #include <cstdint>
> @@ -45,13 +48,12 @@ test_pow2()
>
>  int main()
>  {
> -// For 128bit floating points, generator emitting a range, which size is
> -// not power of two, but of width of B bits, such that for any N:
> -// N * B < 113 (bits in ieee128)
> -// (N+1) * B > 128
> -// are not supported, as they would require integer with more than 127 bits.
> -#ifndef _GLIBCXX_GENERATE_CANONICAL_STRICT
> -#  ifdef __SIZEOF_FLOAT128__
> +  // For 128bit floating points, generator emitting a range, which size is
> +  // not power of two, but of width of B bits, such that for any N:
> +  // N * B < 113 (bits in ieee128)
> +  // (N+1) * B > 128
> +  // are not supported, as they would require integer with more than 127 
> bits.
> +
>    // N == 3: B in [43, 57)
>    test_non_pow2<__float128, 42>(); // 3 calls
>    test_non_pow2<__float128, 43>(); // { dg-error "from here" }
> @@ -81,8 +83,6 @@ int main()
>    test_non_pow2<__float128, 22>(); // { dg-error "from here" }
>    test_non_pow2<__float128, 23>(); // 5 calls
>    test_pow2<__float128, 22>();
> -#  endif
> -#endif
>  }
>
>  // { dg-prune-output "no type named 'type' in 'struct 
> std::__detail::_Select_uint_least_t" }
> --
> 2.54.0
>

Reply via email to