public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108698] New: [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a
@ 2023-02-07 14:09 marxin at gcc dot gnu.org
2023-02-07 14:09 ` [Bug tree-optimization/108698] " marxin at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-02-07 14:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698
Bug ID: 108698
Summary: [13 Regression] decltype ((T() +
‘excess_precision_expr’ not supported by
dump_expr<expression error>)) median(ndarray<T>) [with
T = double]’: since r13-3290-g98e341130f87984a
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux-gnu
The following is isolated from python-scipy package:
$ cat scipy.ii
template <class> struct ndarray {};
template <class T> decltype(T() + 1.) median(ndarray<T>);
struct Trans_NS_functor_median {
template <typename... Types> void operator()(Types...) { median(Types()...);
}
};
struct siegelslopes {
void operator()(siegelslopes, double, void()) {
ndarray<double> __trans_tmp_9;
Trans_NS_functor_median{}(__trans_tmp_9);
}
} siegelslopes0_y;
double siegelslopes0_x;
void siegelslopes0_method() {
siegelslopes()(siegelslopes0_y, siegelslopes0_x, siegelslopes0_method);
}
$ g++ scipy.ii -c -m32 -std=c++14
scipy.ii: In instantiation of ‘decltype ((T() + ‘excess_precision_expr’ not
supported by dump_expr<expression error>)) median(ndarray<T>) [with T =
double]’:
scipy.ii:2:39: sorry, unimplemented: mangling excess_precision_expr
2 | template <class T> decltype(T() + 1.) median(ndarray<T>);
| ^~~~~~
$ g++-12 scipy.ii -c -m32 -std=c++14
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a
2023-02-07 14:09 [Bug tree-optimization/108698] New: [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a marxin at gcc dot gnu.org
@ 2023-02-07 14:09 ` marxin at gcc dot gnu.org
2023-02-07 16:33 ` [Bug c++/108698] " jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-02-07 14:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Ever confirmed|0 |1
CC| |jakub at gcc dot gnu.org
Priority|P3 |P1
Last reconfirmed| |2023-02-07
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a
2023-02-07 14:09 [Bug tree-optimization/108698] New: [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a marxin at gcc dot gnu.org
2023-02-07 14:09 ` [Bug tree-optimization/108698] " marxin at gcc dot gnu.org
@ 2023-02-07 16:33 ` jakub at gcc dot gnu.org
2023-02-07 19:38 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-07 16:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Simpler testcase:
template <typename T>
decltype (T () * T () + 1.0) foo ()
{
return T () * T () + 1.0;
}
void
bar ()
{
foo <float> ();
foo <double> ();
foo <long double> ();
}
The question is if the excess precision should be visible in the mangling in
some way or not.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a
2023-02-07 14:09 [Bug tree-optimization/108698] New: [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a marxin at gcc dot gnu.org
2023-02-07 14:09 ` [Bug tree-optimization/108698] " marxin at gcc dot gnu.org
2023-02-07 16:33 ` [Bug c++/108698] " jakub at gcc dot gnu.org
@ 2023-02-07 19:38 ` jakub at gcc dot gnu.org
2023-02-07 19:38 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-07 19:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 54423
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54423&action=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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a
2023-02-07 14:09 [Bug tree-optimization/108698] New: [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2023-02-07 19:38 ` jakub at gcc dot gnu.org
@ 2023-02-07 19:38 ` jakub at gcc dot gnu.org
2023-02-09 8:32 ` cvs-commit at gcc dot gnu.org
2023-02-09 8:34 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-07 19:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I mean in mangling...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a
2023-02-07 14:09 [Bug tree-optimization/108698] New: [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2023-02-07 19:38 ` jakub at gcc dot gnu.org
@ 2023-02-09 8:32 ` cvs-commit at gcc dot gnu.org
2023-02-09 8:34 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-09 8:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:b1ed0c9671b99c6b06cbb8c61be14cdec0998de8
commit r13-5751-gb1ed0c9671b99c6b06cbb8c61be14cdec0998de8
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Feb 9 09:31:55 2023 +0100
c++: Mangle EXCESS_PRECISION_EXPR <REAL_CST> 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 <jakub@redhat.com>
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/108698] [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a
2023-02-07 14:09 [Bug tree-optimization/108698] New: [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2023-02-09 8:32 ` cvs-commit at gcc dot gnu.org
@ 2023-02-09 8:34 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-09 8:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108698
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-02-09 8:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 14:09 [Bug tree-optimization/108698] New: [13 Regression] decltype ((T() + ‘excess_precision_expr’ not supported by dump_expr<expression error>)) median(ndarray<T>) [with T = double]’: since r13-3290-g98e341130f87984a marxin at gcc dot gnu.org
2023-02-07 14:09 ` [Bug tree-optimization/108698] " marxin at gcc dot gnu.org
2023-02-07 16:33 ` [Bug c++/108698] " jakub at gcc dot gnu.org
2023-02-07 19:38 ` jakub at gcc dot gnu.org
2023-02-07 19:38 ` jakub at gcc dot gnu.org
2023-02-09 8:32 ` cvs-commit at gcc dot gnu.org
2023-02-09 8:34 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).