Argh, I must have typoed when I realized that we wanted to check
ff_genericize here rather than !ff_only_non_odr. And didn't notice the
problem because I also forgot the -O in the testcase.
PR c++/124973
gcc/cp/ChangeLog:
* cp-gimplify.cc (cp_fold_r): Fix typo.
gcc/testsuite/ChangeLog:
* g++.dg/modules/consteval-1_b.C: Add -O.
case TARGET_EXPR:
if (!flag_no_inline
- && (data->flags && ff_genericize))
+ && (data->flags & ff_genericize))
if (tree &init = TARGET_EXPR_INITIAL (stmt))
{
tree folded = maybe_constant_init (init, TARGET_EXPR_SLOT (stmt),
// PR c++/124973
// { dg-do compile { target c++20 } }
-// { dg-additional-options "-fmodules" }
+// { dg-additional-options "-fmodules -O" }
export module left; // { dg-module-cmi left }
import right;