public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/90448] [8/9/10 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-22 14:57 ` paolo.carlini at oracle dot com
2020-04-22 16:05 ` cvs-commit at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2020-04-22 14:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This is already fixed in trunk: I'm adding the testcase and removingg the 10
Regression marker.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
2020-04-22 14:57 ` [Bug c++/90448] [8/9/10 Regression] decltype-based lambda parameter pack is rejected paolo.carlini at oracle dot com
@ 2020-04-22 16:05 ` cvs-commit at gcc dot gnu.org
2020-04-23 17:55 ` [Bug c++/90448] [8/9 " jakub at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-22 16:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paolo Carlini <paolo@gcc.gnu.org>:
https://gcc.gnu.org/g:183e9006cc0300257d6f74d573514ef86f78cb4e
commit r10-7885-g183e9006cc0300257d6f74d573514ef86f78cb4e
Author: Paolo Carlini <paolo.carlini@oracle.com>
Date: Wed Apr 22 18:05:18 2020 +0200
Add testcase of PR c++/90448, already fixed in trunk.
PR c++/90448
* g++.dg/cpp1y/lambda-generic-variadic20.C: New.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
2020-04-22 14:57 ` [Bug c++/90448] [8/9/10 Regression] decltype-based lambda parameter pack is rejected paolo.carlini at oracle dot com
2020-04-22 16:05 ` cvs-commit at gcc dot gnu.org
@ 2020-04-23 17:55 ` jakub at gcc dot gnu.org
2020-04-23 19:30 ` ro at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-23 17:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The testcase ICEs on powerpc64-linux with -m32:
lambda-generic-variadic20.C:5:12: internal compiler error: in
expand_expr_addr_expr_1, at expr.c:8075
5 | auto L = [](auto ... a) {
| ^~~~~~~~~~~~~~~~
6 | auto M = [](decltype(a) ... b) -> void {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 | };
| ~~
8 | return M;
| ~~~~~~~~~
9 | };
| ~
0xd9422a expand_expr_addr_expr_1
../../gcc/expr.c:8075
0xd94817 expand_expr_addr_expr
../../gcc/expr.c:8188
0xda0a68 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.c:11363
0xd94bcd expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
../../gcc/expr.c:8358
0xc050ff expand_normal
../../gcc/expr.h:288
0xc0686f precompute_register_parameters
../../gcc/calls.c:982
0xc0fc27 expand_call(tree_node*, rtx_def*, int)
../../gcc/calls.c:4398
0xd9f9cb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.c:11135
0xd94bcd expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
../../gcc/expr.c:8358
0xd8cef5 store_expr(tree_node*, rtx_def*, int, bool, bool)
../../gcc/expr.c:5752
0xd8c194 expand_assignment(tree_node*, tree_node*, bool)
../../gcc/expr.c:5514
0xc2860b expand_call_stmt
../../gcc/cfgexpand.c:2701
0xc2b6b5 expand_gimple_stmt_1
../../gcc/cfgexpand.c:3682
0xc2bc49 expand_gimple_stmt
../../gcc/cfgexpand.c:3847
0xc32a16 expand_gimple_basic_block
../../gcc/cfgexpand.c:5887
0xc3401a execute
../../gcc/cfgexpand.c:6542
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-04-23 17:55 ` [Bug c++/90448] [8/9 " jakub at gcc dot gnu.org
@ 2020-04-23 19:30 ` ro at gcc dot gnu.org
2020-04-24 13:11 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: ro at gcc dot gnu.org @ 2020-04-23 19:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ro at gcc dot gnu.org
--- Comment #6 from Rainer Orth <ro at gcc dot gnu.org> ---
I see the same ICE on 32-bit sparc-sun-solaris2.11.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-04-23 19:30 ` ro at gcc dot gnu.org
@ 2020-04-24 13:11 ` jakub at gcc dot gnu.org
2020-07-10 13:06 ` [Bug c++/90448] [8/9/10/11 " ro at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-24 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org,
| |segher at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, seems the second argument of the call is some empty class - struct
._anon_2, 1 byte long, and the FE in the CALL_EXPR passes an empty CONSTRUCTOR
of that type.
The gimplifier then creates a temporary for that (and doesn't initialize it),
so we have:
struct ._anon_2 D.3223;
<bb 2> :
<retval> = fooV<{const char*, int, double, char, float, short int, unsigned
int}>::<lambda(auto:1 ...)>::operator()<fooV<{const char*, int, doubl
e, char, float, short int, unsigned int}>::<lambda(auto:1 ...)>, const char*,
int, double, char, float, short int, unsigned int> (0B, D.3223, _2(D)
, _3(D), _4(D), _5(D), _6(D), _7(D), _8(D)); [return slot optimization]
up to *.optimized in a thunk, D.3223 is not initialized (contains just padding)
and is passed by value to the call.
Now, on powerpc -m32, the ABI wants to pass that by reference -
if (pass_by_reference (args_so_far_pnt, arg))
is true, and we enter:
/* If we're compiling a thunk, pass through invisible references
instead of making a copy. */
if (call_from_thunk_p
|| (callee_copies
&& !TREE_ADDRESSABLE (type)
&& (base = get_base_address (args[i].tree_value))
&& TREE_CODE (base) != SSA_NAME
&& (!DECL_P (base) || MEM_P (DECL_RTL (base)))))
block because call_from_thunk_p is true. But, base is a DECL with DECL_RTL of
a (reg:QI ...).
The code calls mark_addressable on args[i].tree_value, but that doesn't do
anything immediately, because currently_expanding_to_rtl is true (but even if
it would, that doesn't change DECL_RTL of the arg being passed).
Later the code calls build_fold_addr_expr_loc and ICEs when expanding that,
because trying to expand ADDR_EXPR on a VAR_DECL with DECL_RTL of (reg:QI ...)
doesn't work.
I don't see how this can be implemented other than actually making a copy,
so wonder if the condition shouldn't be
if ((call_from_thunk_p || callee_copies)
&& !TREE_ADDRESSABLE (type)
&& ...
instead. But what do I know about thunks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2020-04-24 13:11 ` jakub at gcc dot gnu.org
@ 2020-07-10 13:06 ` ro at gcc dot gnu.org
2021-01-20 15:07 ` ro at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: ro at gcc dot gnu.org @ 2020-07-10 13:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9 Regression] |[8/9/10/11 Regression]
|decltype-based lambda |decltype-based lambda
|parameter pack is rejected |parameter pack is rejected
--- Comment #8 from Rainer Orth <ro at gcc dot gnu.org> ---
At least on 32-bit Solaris/SPARC, the ICE also occurs on the gcc-10 branch and
master.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2020-07-10 13:06 ` [Bug c++/90448] [8/9/10/11 " ro at gcc dot gnu.org
@ 2021-01-20 15:07 ` ro at gcc dot gnu.org
2021-03-04 21:49 ` seurer at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: ro at gcc dot gnu.org @ 2021-01-20 15:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jozefl at gcc dot gnu.org
--- Comment #9 from Rainer Orth <ro at gcc dot gnu.org> ---
*** Bug 96458 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2021-01-20 15:07 ` ro at gcc dot gnu.org
@ 2021-03-04 21:49 ` seurer at gcc dot gnu.org
2021-03-04 21:51 ` seurer at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-03-04 21:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
seurer at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |seurer at gcc dot gnu.org
--- Comment #10 from seurer at gcc dot gnu.org ---
*** Bug 99392 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2021-03-04 21:49 ` seurer at gcc dot gnu.org
@ 2021-03-04 21:51 ` seurer at gcc dot gnu.org
2021-03-08 10:22 ` ebotcazou at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-03-04 21:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
--- Comment #11 from seurer at gcc dot gnu.org ---
This (still) fails on powerpc BE 32 bit compiler for both gcc 10 and trunk.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2021-03-04 21:51 ` seurer at gcc dot gnu.org
@ 2021-03-08 10:22 ` ebotcazou at gcc dot gnu.org
2021-03-09 15:23 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-03-08 10:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org
CC| |ebotcazou at gcc dot gnu.org
--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Likewise on SPARC 32-bit, so let's find a way out.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2021-03-08 10:22 ` ebotcazou at gcc dot gnu.org
@ 2021-03-09 15:23 ` cvs-commit at gcc dot gnu.org
2021-03-09 15:24 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-09 15:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:defafb78cbcb7e2d5abd40379afdecee8b1a0d06
commit r11-7579-gdefafb78cbcb7e2d5abd40379afdecee8b1a0d06
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Mar 9 16:12:22 2021 +0100
Fix internal error on lambda function
This boils down to the RTL expander trying to take the address of a DECL
whose RTX is a register.
gcc/
PR c++/90448
* calls.c (initialize_argument_information): When the argument
is passed by reference, do not make a copy in a thunk only if
the argument is already in memory. Remove redundant test for
the case of callee copy.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2021-03-09 15:23 ` cvs-commit at gcc dot gnu.org
@ 2021-03-09 15:24 ` cvs-commit at gcc dot gnu.org
2021-03-09 15:25 ` ebotcazou at gcc dot gnu.org
2022-04-01 6:07 ` linkw at gcc dot gnu.org
13 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-09 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:6051af8e3db9e6cea79d0e86da0e0dad286f7e4e
commit r10-9426-g6051af8e3db9e6cea79d0e86da0e0dad286f7e4e
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Mar 9 16:12:22 2021 +0100
Fix internal error on lambda function
This boils down to the RTL expander trying to take the address of a DECL
whose RTX is a register.
gcc/
PR c++/90448
* calls.c (initialize_argument_information): When the argument
is passed by reference, do not make a copy in a thunk only if
the argument is already in memory. Remove redundant test for
the case of callee copy.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2021-03-09 15:24 ` cvs-commit at gcc dot gnu.org
@ 2021-03-09 15:25 ` ebotcazou at gcc dot gnu.org
2022-04-01 6:07 ` linkw at gcc dot gnu.org
13 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-03-09 15:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Target Milestone|8.5 |10.3
Resolution|--- |FIXED
--- Comment #15 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/90448] [8/9/10/11 Regression] decltype-based lambda parameter pack is rejected
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2021-03-09 15:25 ` ebotcazou at gcc dot gnu.org
@ 2022-04-01 6:07 ` linkw at gcc dot gnu.org
13 siblings, 0 replies; 14+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-04-01 6:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
--- Comment #16 from Kewen Lin <linkw at gcc dot gnu.org> ---
*** Bug 90226 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-04-01 6:07 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-90448-4@http.gcc.gnu.org/bugzilla/>
2020-04-22 14:57 ` [Bug c++/90448] [8/9/10 Regression] decltype-based lambda parameter pack is rejected paolo.carlini at oracle dot com
2020-04-22 16:05 ` cvs-commit at gcc dot gnu.org
2020-04-23 17:55 ` [Bug c++/90448] [8/9 " jakub at gcc dot gnu.org
2020-04-23 19:30 ` ro at gcc dot gnu.org
2020-04-24 13:11 ` jakub at gcc dot gnu.org
2020-07-10 13:06 ` [Bug c++/90448] [8/9/10/11 " ro at gcc dot gnu.org
2021-01-20 15:07 ` ro at gcc dot gnu.org
2021-03-04 21:49 ` seurer at gcc dot gnu.org
2021-03-04 21:51 ` seurer at gcc dot gnu.org
2021-03-08 10:22 ` ebotcazou at gcc dot gnu.org
2021-03-09 15:23 ` cvs-commit at gcc dot gnu.org
2021-03-09 15:24 ` cvs-commit at gcc dot gnu.org
2021-03-09 15:25 ` ebotcazou at gcc dot gnu.org
2022-04-01 6:07 ` linkw 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).