* [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483
2020-12-16 18:17 [Bug c++/98326] New: ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer leni536 at gmail dot com
@ 2020-12-17 11:05 ` marxin at gcc dot gnu.org
2021-01-04 15:30 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17 11:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98326
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Target Milestone|--- |10.3
Last reconfirmed| |2020-12-17
Known to fail| |10.2.0, 11.0
Known to work| |9.3.0
CC| |marxin at gcc dot gnu.org
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Summary|ICE: in create_tmp_var, at |[10/11 Regression] ICE: in
|gimple-expr.c:482, |create_tmp_var, at
|converting stateless |gimple-expr.c:482,
|generic-lambda to function |converting stateless
|pointer |generic-lambda to function
| |pointer since
| |r10-599-gc652ff8312433483
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r10-599-gc652ff8312433483.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483
2020-12-16 18:17 [Bug c++/98326] New: ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer leni536 at gmail dot com
2020-12-17 11:05 ` [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483 marxin at gcc dot gnu.org
@ 2021-01-04 15:30 ` rguenth at gcc dot gnu.org
2021-02-03 13:22 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-04 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98326
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483
2020-12-16 18:17 [Bug c++/98326] New: ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer leni536 at gmail dot com
2020-12-17 11:05 ` [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483 marxin at gcc dot gnu.org
2021-01-04 15:30 ` rguenth at gcc dot gnu.org
@ 2021-02-03 13:22 ` jakub at gcc dot gnu.org
2021-02-08 21:15 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-03 13:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98326
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, shouldn't either the cp/call.c change have been:
- && ! TREE_ADDRESSABLE (TREE_TYPE (arg)))
+ && ! TREE_ADDRESSABLE (TREE_TYPE (arg))
+ && simple_empty_class_p (TREE_TYPE (arg), arg, INIT_EXPR))
rather than
- && ! TREE_ADDRESSABLE (TREE_TYPE (arg)))
+ && simple_empty_class_p (TREE_TYPE (arg), arg, INIT_EXPR))
so it would don't try to handle TREE_ADDRESSABLE classes this way?
Or perhaps simple_empty_class_p should punt for TREE_ADDRESSABLE types?
In any case, passing CONSTRUCTOR with TREE_ADDRESSABLE type directly as
argument to function call leads to creating temporaries of the type, which
aren't allowed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483
2020-12-16 18:17 [Bug c++/98326] New: ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer leni536 at gmail dot com
` (2 preceding siblings ...)
2021-02-03 13:22 ` jakub at gcc dot gnu.org
@ 2021-02-08 21:15 ` jason at gcc dot gnu.org
2021-02-09 1:52 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2021-02-08 21:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98326
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483
2020-12-16 18:17 [Bug c++/98326] New: ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer leni536 at gmail dot com
` (3 preceding siblings ...)
2021-02-08 21:15 ` jason at gcc dot gnu.org
@ 2021-02-09 1:52 ` cvs-commit at gcc dot gnu.org
2021-02-12 2:30 ` cvs-commit at gcc dot gnu.org
2021-02-12 2:50 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-09 1:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98326
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:bdbca69e0720fa9062fe71782235141f629ae006
commit r11-7142-gbdbca69e0720fa9062fe71782235141f629ae006
Author: Jason Merrill <jason@redhat.com>
Date: Mon Feb 8 17:04:03 2021 -0500
c++: generic lambda, fn* conv, empty class [PR98326]
Here, in the thunk returned from the captureless lambda conversion to
pointer-to-function, we try to pass through invisible reference parameters
by reference, without doing a copy. The empty class copy optimization was
messing that up.
gcc/cp/ChangeLog:
PR c++/98326
PR c++/20408
* cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
parm.
gcc/testsuite/ChangeLog:
PR c++/98326
* g++.dg/cpp1y/lambda-generic-empty1.C: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483
2020-12-16 18:17 [Bug c++/98326] New: ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer leni536 at gmail dot com
` (4 preceding siblings ...)
2021-02-09 1:52 ` cvs-commit at gcc dot gnu.org
@ 2021-02-12 2:30 ` cvs-commit at gcc dot gnu.org
2021-02-12 2:50 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-12 2:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98326
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:031e97207463710797625382baff112b6c3ade51
commit r10-9362-g031e97207463710797625382baff112b6c3ade51
Author: Jason Merrill <jason@redhat.com>
Date: Mon Feb 8 17:04:03 2021 -0500
c++: generic lambda, fn* conv, empty class [PR98326]
Here, in the thunk returned from the captureless lambda conversion to
pointer-to-function, we try to pass through invisible reference parameters
by reference, without doing a copy. The empty class copy optimization was
messing that up.
gcc/cp/ChangeLog:
PR c++/98326
PR c++/20408
* cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
parm.
gcc/testsuite/ChangeLog:
PR c++/98326
* g++.dg/cpp1y/lambda-generic-empty1.C: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/98326] [10/11 Regression] ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer since r10-599-gc652ff8312433483
2020-12-16 18:17 [Bug c++/98326] New: ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer leni536 at gmail dot com
` (5 preceding siblings ...)
2021-02-12 2:30 ` cvs-commit at gcc dot gnu.org
@ 2021-02-12 2:50 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2021-02-12 2:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98326
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 10.3/11.
^ permalink raw reply [flat|nested] 8+ messages in thread