On Wed, Dec 06, 2023 at 05:09:21PM +0530, Prathamesh Kulkarni wrote: > On Tue, 5 Dec 2023 at 06:18, Marek Polacek <pola...@redhat.com> wrote: > > > > On Mon, Dec 04, 2023 at 04:49:29PM -0500, Jason Merrill wrote: > > > On 12/4/23 15:23, Marek Polacek wrote: > > > > +/* FN is not a consteval function, but may become one. Remember to > > > > + escalate it after all pending templates have been instantiated. */ > > > > + > > > > +void > > > > +maybe_store_immediate_escalating_fn (tree fn) > > > > +{ > > > > + if (unchecked_immediate_escalating_function_p (fn)) > > > > + remember_escalating_expr (fn); > > > > +} > > > > > > > +++ b/gcc/cp/decl.cc > > > > @@ -18441,7 +18441,10 @@ finish_function (bool inline_p) > > > > if (!processing_template_decl > > > > && !DECL_IMMEDIATE_FUNCTION_P (fndecl) > > > > && !DECL_OMP_DECLARE_REDUCTION_P (fndecl)) > > > > - cp_fold_function (fndecl); > > > > + { > > > > + cp_fold_function (fndecl); > > > > + maybe_store_immediate_escalating_fn (fndecl); > > > > + } > > > > > > I think maybe_store_, and the call to it from finish_function, are > > > unneeded; > > > we will have already decided whether we need to remember the function > > > during > > > the call to cp_fold_function. > > > > 'Tis true. > > > > > OK with that change. > > > > Here's what I pushed after another regtest. Thanks! > Hi Marek, > It seems the patch caused following regressions on aarch64: > > Running g++:g++.dg/modules/modules.exp ... > FAIL: g++.dg/modules/xtreme-header-4_b.C -std=c++2b (internal compiler > error: tree check: expected class 'type', have 'declaration' > (template_decl) in get_originating_module_decl, at cp/module.cc:18659) > FAIL: g++.dg/modules/xtreme-header-5_b.C -std=c++2b (internal compiler > error: tree check: expected class 'type', have 'declaration' > (template_decl) in get_originating_module_decl, at cp/module.cc:18659) > FAIL: g++.dg/modules/xtreme-header_b.C -std=c++2b (internal compiler > error: tree check: expected class 'type', have 'declaration' > (template_decl) in get_originating_module_decl, at cp/module.cc:18659) > > Log files: > https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/1299/artifact/artifacts/00-sumfiles/
Are you sure it's caused by my patch? I reckon I've seen that FAIL many times before. Marek