[PATCH v2] c++: fix unevaluated operand context for typeid [PR125886]

Good day!

Changes since v2:
- Apply the same two-pass (unevaluated-then-evaluated) logic to
template-dependent
operands
   in tsubst_expr (TYPEID_EXPR), as Jason requested.
- Fix lambda capture: a polymorphic glvalue typeid operand inside a lambda
without a capture-default
   is now correctly diagnosed as "not captured". Root cause was
typeid_evaluated_p rejecting
   reference types and being gated on the "nonnull" flag, which is unrelated
to the evaluated/unevaluated decision.
- Factor the polymorphic-glvalue predicate out into a shared
typeid_evaluated_p
   helper used by the parser, tsubst, and build_typeid (Jason's request -
avoids the checks
   drifting out of sync).
- Drop the cxx_dialect >= cxx11 gate: per Jason, DR613 applies in all
modes,
   since finish_non_static_data_member doesn't check cxx_dialect either.
- Also fixes PR c++/68604 and PR c++/116385, and removes a now-stale xfail
in
  g++.dg/coroutines/unevaluated.C (PR c++/68604).


Tested full CI on: x86_64 GNU/Linux 6.17.0-35-generic Ubuntu 24.04.
FYI, these tests are broken before my changes (the full test log via 'make
-C gcc -k check-c++-all' attached too):

FAIL: c-c++-common/analyzer/flex-without-call-summaries.c  -std=c++11  at
line 885 (test for warnings, line 884)
XPASS: c-c++-common/analyzer/flex-without-call-summaries.c  -std=c++11 PR
analyzer/103546 (test for bogus messages, line 892)
FAIL: c-c++-common/analyzer/flex-without-call-summaries.c  -std=c++11 (test
for excess errors)
FAIL: g++.dg/guality/pr55665.C   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  line 23 p == 40
FAIL: g++.dg/modules/compile-std1.C -std=c++26 -fimplicit-constexpr (test
for excess errors)
FAIL: g++.dg/modules/compile-std1.C -std=c++26 -fimplicit-constexpr
module-cmi std (gcm.cache/std.gcm)
FAIL: g++.dg/modules/compile-std1.C -std=c++26 -fimplicit-constexpr
module-cmi std.compat (gcm.cache/std.compat.gcm)
FAIL: g++.dg/modules/xtreme-header-8.C -std=c++26 -fimplicit-constexpr
(test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++26 -fimplicit-constexpr
(test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_c.C -std=c++26 -fimplicit-constexpr
(test for excess errors)
FAIL: g++.dg/modules/xtreme-header-7_a.H -std=c++26 -fimplicit-constexpr
(test for excess errors)
FAIL: g++.dg/modules/xtreme-header_a.H -std=c++26 -fimplicit-constexpr
(test for excess errors)
FAIL: g++.dg/plugin/std-module-exports-c++20.C
-fplugin=./std_module_exports_plugin.so (test for excess errors)
FAIL: g++.dg/plugin/std-module-exports-c++23.C
-fplugin=./std_module_exports_plugin.so (test for excess errors)
FAIL: g++.dg/plugin/std-module-exports-c++26.C
-fplugin=./std_module_exports_plugin.so (test for excess errors)

=== g++ Summary ===

# of expected passes 598206
# of unexpected failures 14
# of unexpected successes 1
# of expected failures 5989
# of unresolved testcases 2
# of unsupported tests 21885
/home/loveit0/Develop/gcc-build/gcc/xg++  version 17.0.0 20260624
(experimental) (GCC)


сб, 27 июн. 2026 г. в 00:35, Jason Merrill <[email protected]>:

> On 6/26/26 4:45 PM, Vladislav Semykin wrote:
> >  > Does this also fix PR116385 and PR68604?
> >
> > Yes, both, confirmed with the reproducers from those PRs:
> > - for PR116385 all four cases (lambda, local class, and the two
> > default-argument uses) now compile;
> > - for PR68604, typeid(A::i) compiles in C++11+.
> >
> > One thing I caught while testing:
> > typeid(A::i) must remain ill-formed in C++98 (DR613 only applies from
> C++11),
>
> Since it's a DR, we chose to apply it to C++98 mode as well; the
> handling in finish_non_static_data_member doesn't check cxx_dialect.  It
> would be odd to restrict it only in this corner case.
>
> > 2. Polymorphic glvalue inside a lambda: should be odr-used and captured,
> > but currently isn't.
>
> I think this should also be handled in this patch.  I'm surprised it
> doesn't just work.
>
> > +        /* Reuse the same predicate as build_typeid (rtti.cc) so
> > +           there is a single source of truth for the [expr.typeid]/4
> > +           condition.  */
> > +          int nonnull = 0;
> > +          tree t = TREE_TYPE (expression);
> > +          need_eval = (CLASS_TYPE_P (t)
> > +                        && TYPE_POLYMORPHIC_P (t)
> > +                        && !resolves_to_fixed_type_p (expression,
> &nonnull)
> > +                        && !nonnull
> > +                        /* Only glvalues are evaluated.  */
> > +                        /* prvalues are unevaluated even for
> > +                           polymorphic types.  */
> > +                        && glvalue_p (expression));
>
> This predicate should be factored out rather than copied.
>
> Jason
>
>
From acc669f9364264ecf93f1341e7037e916a798c6b Mon Sep 17 00:00:00 2001
From: Vladislav Semykin <[email protected]>
Date: Tue, 30 Jun 2026 19:13:14 +0300
Subject: [PATCH] c++: fix unevaluated operand context for typeid [PR125886]

Signed-off-by: Vladislav Semykin <[email protected]>
---
 gcc/cp/cp-tree.h                              |  4 +-
 gcc/cp/parser.cc                              | 29 +++++++-
 gcc/cp/pt.cc                                  | 17 ++++-
 gcc/cp/rtti.cc                                | 44 +++++++++---
 gcc/testsuite/g++.dg/coroutines/unevaluated.C |  3 +-
 gcc/testsuite/g++.dg/cpp0x/pr125886.C         | 67 +++++++++++++++++++
 gcc/testsuite/g++.dg/rtti/typeid14.C          | 19 ++++++
 gcc/testsuite/g++.dg/rtti/typeid15.C          | 23 +++++++
 8 files changed, 187 insertions(+), 19 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr125886.C
 create mode 100644 gcc/testsuite/g++.dg/rtti/typeid14.C
 create mode 100644 gcc/testsuite/g++.dg/rtti/typeid15.C

diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 132139f9d..090d3aee8 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -6340,7 +6340,8 @@ extern bool cp_preserve_using_decl;
 
 /* Nonzero if we are parsing an unevaluated operand: an operand to
    sizeof, typeof, or alignof.  This is a count since operands to
-   sizeof can be nested.  */
+   sizeof can be nested.  For typeid the operand is processed
+   unevaluated, then re-processed evaluated if polymorphic ([expr.typeid]/4-5).  */
 
 extern int cp_unevaluated_operand;
 
@@ -7486,6 +7487,7 @@ extern tree current_nonlambda_class_type	(void);
 extern tree finish_struct			(tree, tree);
 extern void finish_struct_1			(tree);
 extern int resolves_to_fixed_type_p		(tree, int * = NULL);
+extern bool typeid_evaluated_p			(tree);
 extern void init_class_processing		(void);
 extern int is_empty_class			(tree);
 extern bool is_really_empty_class		(tree, bool);
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 8194106c6..06514bd7e 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -292,7 +292,9 @@ static void missing_template_diag
 static FILE *cp_lexer_debug_stream;
 
 /* Nonzero if we are parsing an unevaluated operand: an operand to
-   sizeof, typeof, or alignof.  */
+   sizeof, typeof, or alignof.  This is a count since operands to
+   sizeof can be nested.  For typeid the operand is processed
+   unevaluated, then re-processed evaluated if polymorphic ([expr.typeid]/4-5).  */
 int cp_unevaluated_operand;
 
 /* Nonzero if we are parsing a reflect-expression and shouldn't strip
@@ -8570,9 +8572,30 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
 	else
 	  {
 	    tree expression;
+	    /* [expr.typeid]/4-5: parse the operand unevaluated first; if it is a
+	       polymorphic glvalue, roll back and re-parse it evaluated, since an
+	       evaluated parse has irreversible side-effects (mark_used ->
+	       instantiation; lambda capture).  */
+	    cp_lexer_save_tokens (parser->lexer);
+	    ++cp_unevaluated_operand;
+	    ++c_inhibit_evaluation_warnings;
+	    expression = cp_parser_expression (parser, &idk);
+	    --c_inhibit_evaluation_warnings;
+	    --cp_unevaluated_operand;
+
+	    if (expression != error_mark_node
+        && processing_template_decl == 0
+        && typeid_evaluated_p (expression))
+	      {
+          /* Re-parse the operand evaluated so the /4 side-effects occur.
+             The unevaluated pass above called no mark_used and captured
+             nothing, so rolling back has nothing to undo.  */
+          cp_lexer_rollback_tokens (parser->lexer);
+          expression = cp_parser_expression (parser, &idk);
+	      }
+	    else
+	      cp_lexer_commit_tokens (parser->lexer);
 
-	    /* Look for an expression.  */
-	    expression = cp_parser_expression (parser, & idk);
 	    /* Compute its typeid.  */
 	    postfix_expression = build_typeid (expression, tf_warning_or_error);
 	    /* Look for the `)' token.  */
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index f7aa10226..40ec4d800 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -23003,8 +23003,21 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
 	  }
 	else
 	  {
-	    operand_0 = RECUR (operand_0);
-	    RETURN (build_typeid (operand_0, complain));
+	    /* [expr.typeid]/4-5: substitute the operand unevaluated first, then
+	       again evaluated if it is a polymorphic glvalue, so the /4
+	       side-effects occur.  The unevaluated pass instantiates nothing,
+	       so re-substituting has nothing to undo (PR c++/125886).  */
+	    tree operand;
+	    tree uneval;
+	      {
+		cp_unevaluated u;
+		uneval = RECUR (operand_0);
+	      }
+	    if (typeid_evaluated_p (uneval))
+	      operand = RECUR (operand_0);
+	    else
+	      operand = uneval;
+	    RETURN (build_typeid (operand, complain));
 	  }
       }
 
diff --git a/gcc/cp/rtti.cc b/gcc/cp/rtti.cc
index 7e6fa5193..9d3b65fe3 100644
--- a/gcc/cp/rtti.cc
+++ b/gcc/cp/rtti.cc
@@ -340,6 +340,28 @@ typeid_ok_p (void)
   return true;
 }
 
+/* True if EXP is a glvalue expression of polymorphic class type whose
+   dynamic type is not known statically, so that typeid (EXP) must be
+   evaluated per [expr.typeid]/4.  */
+
+bool
+typeid_evaluated_p (tree exp)
+{
+  if (exp == error_mark_node)
+    return false;
+  tree t = TREE_TYPE (exp);
+  if (!t || t == error_mark_node)
+    return false;
+  if (TYPE_REF_P (t))
+    t = TREE_TYPE (t);
+  if (TREE_CODE (t) != RECORD_TYPE && TREE_CODE (t) != UNION_TYPE)
+    return false;
+  int nonnull = 0;
+  return (TYPE_POLYMORPHIC_P (t)
+	  && !resolves_to_fixed_type_p (exp, &nonnull)
+	  && glvalue_p (exp));
+}
+
 /* Return an expression for "typeid(EXP)".  The expression returned is
    an lvalue of type "const std::type_info".  */
 
@@ -347,7 +369,6 @@ tree
 build_typeid (tree exp, tsubst_flags_t complain)
 {
   tree cond = NULL_TREE, initial_expr = exp;
-  int nonnull = 0;
 
   if (exp == error_mark_node || !typeid_ok_p ())
     return error_mark_node;
@@ -355,17 +376,18 @@ build_typeid (tree exp, tsubst_flags_t complain)
   if (processing_template_decl)
     return build_min (TYPEID_EXPR, const_type_info_type_node, exp);
 
-  if (CLASS_TYPE_P (TREE_TYPE (exp))
-      && TYPE_POLYMORPHIC_P (TREE_TYPE (exp))
-      && ! resolves_to_fixed_type_p (exp, &nonnull)
-      && ! nonnull)
+  if (typeid_evaluated_p (exp))
     {
-      /* So we need to look into the vtable of the type of exp.
-         Make sure it isn't a null lvalue.  */
-      exp = cp_build_addr_expr (exp, complain);
-      exp = save_expr (exp);
-      cond = cp_convert (boolean_type_node, exp, complain);
-      exp = cp_build_fold_indirect_ref (exp);
+      int nonnull = 0;
+      resolves_to_fixed_type_p (exp, &nonnull);
+      if (!nonnull)
+        {
+          /* Make sure it isn't a null lvalue; evaluate it once.  */
+          exp = cp_build_addr_expr (exp, complain);
+          exp = save_expr (exp);
+          cond = cp_convert (boolean_type_node, exp, complain);
+          exp = cp_build_fold_indirect_ref (exp);
+        }
     }
 
   exp = get_tinfo_ptr_dynamic (exp, complain);
diff --git a/gcc/testsuite/g++.dg/coroutines/unevaluated.C b/gcc/testsuite/g++.dg/coroutines/unevaluated.C
index 63dae38de..f763b208c 100644
--- a/gcc/testsuite/g++.dg/coroutines/unevaluated.C
+++ b/gcc/testsuite/g++.dg/coroutines/unevaluated.C
@@ -17,8 +17,7 @@ struct Task {
 // We do not permit co_await, co_yield outside a function, and so uses in
 // noexcept or requirements are covered by that.
 Task foo()  {
-    /* This one will currently fail - see PR68604.  */
-    const std::type_info& ti1 = typeid (co_await std::suspend_never{}); // { dg-error {'co_await' cannot be used in an unevaluated context} "" { xfail *-*-* } }
+    const std::type_info& ti1 = typeid (co_await std::suspend_never{}); // { dg-error {'co_await' cannot be used in an unevaluated context} }
     std::size_t x = sizeof (co_yield (19)); // { dg-error {'co_yield' cannot be used in an unevaluated context} }
     decltype (co_await std::suspend_never{}) A; // { dg-error {'co_await' cannot be used in an unevaluated context} }
     co_return;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr125886.C b/gcc/testsuite/g++.dg/cpp0x/pr125886.C
new file mode 100644
index 000000000..cc494d5c5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr125886.C
@@ -0,0 +1,67 @@
+// PR c++/125886
+// PR c++/68604
+// PR c++/116385
+// { dg-do compile { target c++11 } }
+
+#include <typeinfo>
+#include <utility>
+
+// PR c++/125886: a non-polymorphic operand is an unevaluated operand
+// ([expr.typeid]/5), so std::declval<A>() is not instantiated and its
+// static_assert does not fire.
+struct A {};
+void
+non_poly_declval ()
+{
+  (void) typeid (std::declval<A> ());
+}
+
+// PR c++/125886 (template): the evaluated/unevaluated decision is taken
+// at instantiation time in tsubst; a non-polymorphic operand is
+// unevaluated, so tmpl<A> is well-formed.
+template <typename T>
+void
+tmpl ()
+{
+  (void) typeid (std::declval<T> ());
+}
+
+template void tmpl<A> ();
+
+// PR c++/68604: an id-expression denoting a non-static data member is
+// valid in an unevaluated operand (DR613 / N2253, C++11+).
+struct C { int i; };
+void
+nsm ()
+{
+  (void) typeid (C::i);
+}
+
+// PR c++/116385: function parameters are not odr-used in an unevaluated
+// typeid operand, so they need not be captured and may appear in local
+// classes and default arguments.
+void
+params (int n)
+{
+  [&] { (void) typeid (n); };
+  struct Local { void g () { (void) typeid (n); } };
+  void g (const std::type_info& = typeid (n));
+}
+
+// A final-class polymorphic glvalue resolves to a fixed (static) type,
+// so typeid is unevaluated: no vtable lookup, no odr-use.
+struct F final { virtual ~F (); };
+void
+final_glvalue (F& f)
+{
+  (void) typeid (f);
+}
+
+// Polymorphic glvalue in lambda without capture-default must be captured,
+// since typeid is evaluated.
+struct B { virtual ~B (); };
+void
+lambda_poly_capture (B& b)
+{
+  [] { (void) typeid (b); };  // { dg-error "not captured" }
+}
diff --git a/gcc/testsuite/g++.dg/rtti/typeid14.C b/gcc/testsuite/g++.dg/rtti/typeid14.C
new file mode 100644
index 000000000..422a81fa2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/rtti/typeid14.C
@@ -0,0 +1,19 @@
+// PR c++/125886
+// { dg-do compile { target c++11 } }
+
+#include <typeinfo>
+#include <utility>
+
+// [expr.typeid]/4: a glvalue expression of a polymorphic class type is
+// evaluated, so std::declval<B>() is instantiated and
+// __declval_protector's static_assert fires (the non-template case:
+// the operand is parsed evaluated after the unevaluated probe).
+
+struct B { virtual ~B(); };
+
+void
+non_template ()
+{
+  (void) typeid (std::declval<B> ());
+}
+// { dg-error "static assertion failed: declval" "" { target *-*-* } 0 }
diff --git a/gcc/testsuite/g++.dg/rtti/typeid15.C b/gcc/testsuite/g++.dg/rtti/typeid15.C
new file mode 100644
index 000000000..76478bed3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/rtti/typeid15.C
@@ -0,0 +1,23 @@
+// PR c++/125886
+// { dg-do compile { target c++11 } }
+
+#include <typeinfo>
+#include <utility>
+
+// [expr.typeid]/4 for a template-dependent operand: the evaluated/
+// unevaluated decision is taken at instantiation time in tsubst.  For
+// a polymorphic operand the operand is re-substituted evaluated, so
+// std::declval<C>() is instantiated and __declval_protector's
+// static_assert fires.
+
+struct C { virtual ~C(); };
+
+template <typename T>
+void
+tmpl ()
+{
+  (void) typeid (std::declval<T> ());
+}
+
+template void tmpl<C> ();
+// { dg-error "static assertion failed: declval" "" { target *-*-* } 0 }
-- 
2.43.0

make -C gcc -k check-c++-all
make: Entering directory '/home/loveit0/Develop/gcc-build/gcc'
make RUNTESTFLAGS=" --stds=98,11,14,17,20,23,26,impcx" check-g++
make[1]: Entering directory '/home/loveit0/Develop/gcc-build/gcc'
rm -rf testsuite/g++-parallel
make[2]: Entering directory '/home/loveit0/Develop/gcc-build/gcc'
(rootme=`${PWDCMD-pwd}`; export rootme; \
srcdir=`cd ../../gcc/gcc; ${PWDCMD-pwd}` ; export srcdir ; \
if [ -n "" ] \
   && [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ] \
   && [ -f testsuite/g++-parallel/finished ]; then \
  rm -rf testsuite/g++; \
else \
  cd testsuite/g++; \
  rm -f tmp-site.exp; \
  sed '/set tmpdir/ s|testsuite$|testsuite/g++|' \
	< ../../site.exp > tmp-site.exp; \
  /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \
  EXPECT=expect ; export EXPECT ; \
  if [ -f ${rootme}/../expect/expect ] ; then  \
    TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \
    export TCL_LIBRARY ; \
  fi ; \
  `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ --stds=98,11,14,17,20,23,26,impcx; \
  if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ] ; then \
    touch ${rootme}/testsuite/g++-parallel/finished; \
  fi ; \
fi )
Using /home/loveit0/Develop/gcc/gcc/testsuite/lib/g++.exp as tool init file.
Test run by loveit0 on Tue Jun 30 20:31:24 2026
Native configuration is x86_64-pc-linux-gnu

		=== g++ tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/loveit0/Develop/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/analyzer/analyzer.exp ...
FAIL: c-c++-common/analyzer/flex-without-call-summaries.c  -std=c++11  at line 885 (test for warnings, line 884)
XPASS: c-c++-common/analyzer/flex-without-call-summaries.c  -std=c++11 PR analyzer/103546 (test for bogus messages, line 892)
FAIL: c-c++-common/analyzer/flex-without-call-summaries.c  -std=c++11 (test for excess errors)
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/analyzer/torture/analyzer-torture.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/asan/asan.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/bprob/bprob.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/charset/charset.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/compat/compat.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/compat/struct-layout-1.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/coroutines/torture/coro-torture.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/debug/debug.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/dfp/dfp.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/dg.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/gcov/gcov.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/goacc/goacc.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/gomp/gomp.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/graphite/graphite.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/guality/guality.exp ...
FAIL: g++.dg/guality/pr55665.C   -O2 -flto -fno-use-linker-plugin -flto-partition=none  line 23 p == 40
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/hwasan/hwasan.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/lto/lto.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/modules/modules.exp ...
FAIL: g++.dg/modules/compile-std1.C -std=c++26 -fimplicit-constexpr (test for excess errors)
FAIL: g++.dg/modules/compile-std1.C -std=c++26 -fimplicit-constexpr module-cmi std (gcm.cache/std.gcm)
FAIL: g++.dg/modules/compile-std1.C -std=c++26 -fimplicit-constexpr module-cmi std.compat (gcm.cache/std.compat.gcm)
FAIL: g++.dg/modules/xtreme-header-8.C -std=c++26 -fimplicit-constexpr (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++26 -fimplicit-constexpr (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_c.C -std=c++26 -fimplicit-constexpr (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-7_a.H -std=c++26 -fimplicit-constexpr (test for excess errors)
FAIL: g++.dg/modules/xtreme-header_a.H -std=c++26 -fimplicit-constexpr (test for excess errors)
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/pch/pch.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/plugin/plugin.exp ...
FAIL: g++.dg/plugin/std-module-exports-c++20.C -fplugin=./std_module_exports_plugin.so (test for excess errors)
FAIL: g++.dg/plugin/std-module-exports-c++23.C -fplugin=./std_module_exports_plugin.so (test for excess errors)
FAIL: g++.dg/plugin/std-module-exports-c++26.C -fplugin=./std_module_exports_plugin.so (test for excess errors)
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/sarif-output/sarif-output.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/special/ecos.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/tls/tls.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/tm/tm.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/torture/dg-torture.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/tsan/tsan.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/ubsan/ubsan.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.dg/vect/vect.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.old-deja/old-deja.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/aarch64.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/acle/acle.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/sme/aarch64-sme-acle-asm.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/sme/aarch64-sme.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/sme2/aarch64-sme2-acle-asm.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/sve/aarch64-ssve.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/sve/aarch64-sve.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/arm/arm.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/arm/mve.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/gcn/gcn.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/i386/i386.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/loongarch/loongarch.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/m68k/m68k.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/mips/mips.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/msp430/msp430.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/nvptx/nvptx.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/powerpc/powerpc.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/pru/pru.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/riscv/riscv.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/riscv/rvv/rvv.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/s390/s390.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/sh/sh.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/sh/torture/sh-torture.exp ...
Running /home/loveit0/Develop/gcc/gcc/testsuite/g++.target/xtensa/xtensa.exp ...

		=== g++ Summary ===

# of expected passes		598206
# of unexpected failures	14
# of unexpected successes	1
# of expected failures		5989
# of unresolved testcases	2
# of unsupported tests		21885
/home/loveit0/Develop/gcc-build/gcc/xg++  version 17.0.0 20260624 (experimental) (GCC) 

make[2]: Leaving directory '/home/loveit0/Develop/gcc-build/gcc'
make[1]: Leaving directory '/home/loveit0/Develop/gcc-build/gcc'
make: Leaving directory '/home/loveit0/Develop/gcc-build/gcc'

Reply via email to