From: Jakub Jelinek Date: Fri, 10 Apr 2026 19:52:48 +0000 (+0200) Subject: testsuite: Fix up g++.dg/reflect/type_trait14.C for -fimplicit-constexpr [PR124844] X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=HEAD;p=thirdparty%2Fgcc.git testsuite: Fix up g++.dg/reflect/type_trait14.C for -fimplicit-constexpr [PR124844] The g++.dg/reflect/type_trait14.C test FAILs with -fimplicit-constexpr, because in that case NLType is actually a literal type rather than non-literal type and so is structural type too. Fixed by making sure it is not a literal type even with -fimplicit-constexpr. 2026-04-10 Jakub Jelinek PR c++/124844 * g++.dg/reflect/type_trait14.C (NLType::~NLType): Move definition out of the class. Reviewed-by: Jason Merrill --- diff --git a/gcc/testsuite/g++.dg/reflect/type_trait14.C b/gcc/testsuite/g++.dg/reflect/type_trait14.C index 7aa1d5f1dd3..ff8c2fe81fc 100644 --- a/gcc/testsuite/g++.dg/reflect/type_trait14.C +++ b/gcc/testsuite/g++.dg/reflect/type_trait14.C @@ -25,8 +25,9 @@ struct NLType { NLType () : _M_i(0) { } constexpr NLType (int __i) : _M_i(__i) { } NLType (const NLType &__other) : _M_i(__other._M_i) { } - ~NLType () { _M_i = 0; } + ~NLType (); }; +NLType::~NLType () { _M_i = 0; } static_assert (is_structural_type (^^int)); static_assert (is_structural_type (^^float));