[Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr)) median(ndarray) [with T = double]’: since r13-3290-g98e341130f87984a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Jakub Jelinek --- Fixed.
[Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr)) median(ndarray) [with T = double]’: since r13-3290-g98e341130f87984a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:b1ed0c9671b99c6b06cbb8c61be14cdec0998de8 commit r13-5751-gb1ed0c9671b99c6b06cbb8c61be14cdec0998de8 Author: Jakub Jelinek Date: Thu Feb 9 09:31:55 2023 +0100 c++: Mangle EXCESS_PRECISION_EXPR as fold_convert REAL_CST [PR108698] For standard excess precision, like the C FE we parse floating point constants as EXCESS_PRECISION_EXPR of promoted REAL_CST rather than the nominal REAL_CST, and as the following testcase shows the constants might need mangling. The following patch mangles those as fold_convert of the REAL_CST to EXCESS_PRECISION_EXPR type, i.e. how they were mangled before. I'm not really sure EXCESS_PRECISION_EXPR can appear elsewhere in expressions that would need mangling, tried various testcases but haven't managed to come up with one. If that is possible, we'd keep ICEing on it without/with this patch, and the big question is how to mangle those; they could be mangled as casts from the promoted type back to nominal, but then in the mangled expressions one could see the effects of excess precision. Until we have a reproducer, that is just theoretical though. 2023-02-09 Jakub Jelinek PR c++/108698 * mangle.cc (write_expression, write_template_arg): Handle EXCESS_PRECISION_EXPR with REAL_CST operand as write_template_arg_literal on fold_convert of the REAL_CST to EXCESS_PRECISION_EXPR type. * g++.dg/cpp0x/pr108698.C: New test.
[Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr)) median(ndarray) [with T = double]’: since r13-3290-g98e341130f87984a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698 --- Comment #3 from Jakub Jelinek --- I mean in mangling...
[Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr)) median(ndarray) [with T = double]’: since r13-3290-g98e341130f87984a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698 --- Comment #2 from Jakub Jelinek --- Created attachment 54423 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54423=edit gcc13-pr108698.patch Actually, if it is just EXCESS_PRECISION_EXPR around REAL_CST, that one can be handled easily compatibly with what it used to do before. I haven't been able to get EXCESS_PRECISION_EXPR with other operands so far.
[Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr)) median(ndarray) [with T = double]’: since r13-3290-g98e341130f87984a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698 --- Comment #1 from Jakub Jelinek --- Simpler testcase: template decltype (T () * T () + 1.0) foo () { return T () * T () + 1.0; } void bar () { foo (); foo (); foo (); } The question is if the excess precision should be visible in the mangling in some way or not.