public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845
@ 2021-06-14 17:23 gscfq@t-online.de
2021-06-15 7:22 ` [Bug c++/101072] [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755 marxin at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: gscfq@t-online.de @ 2021-06-14 17:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
Bug ID: 101072
Summary: [11/12 Regression] ICE in build_target_expr_with_type,
at cp/tree.c:845
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
With file gcc/testsuite/g++.dg/cpp0x/constexpr-empty14.C and option
-fno-elide-constructors, changed between 20201129 and 20201206 :
$ g++-12-20210613 -c constexpr-empty14.C -fno-elide-constructors
constexpr-empty14.C: In function 'void foo(S)':
constexpr-empty14.C:9:19: internal compiler error: in
build_target_expr_with_type, at cp/tree.c:845
9 | constexpr S x = s;
| ^
0x86c2c0 build_target_expr_with_type(tree_node*, tree_node*, int)
../../gcc/cp/tree.c:845
0x81d535 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/cp/pt.c:20831
0x6ffa0c fold_non_dependent_expr_template
../../gcc/cp/constexpr.c:7597
0x886e74 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
../../gcc/cp/typeck2.c:764
0x744fcd check_initializer
../../gcc/cp/decl.c:7163
0x747317 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/cp/decl.c:7963
0x802791 cp_parser_init_declarator
../../gcc/cp/parser.c:22044
0x7e348a cp_parser_simple_declaration
../../gcc/cp/parser.c:14587
0x7e5049 cp_parser_declaration_statement
../../gcc/cp/parser.c:13722
0x7e5941 cp_parser_statement
../../gcc/cp/parser.c:11852
0x7e6254 cp_parser_statement_seq_opt
../../gcc/cp/parser.c:12219
0x7e630f cp_parser_compound_statement
../../gcc/cp/parser.c:12168
0x8017f8 cp_parser_function_body
../../gcc/cp/parser.c:24236
0x8017f8 cp_parser_ctor_initializer_opt_and_function_body
../../gcc/cp/parser.c:24287
0x801ca6 cp_parser_function_definition_after_declarator
../../gcc/cp/parser.c:30246
0x802b6c cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/cp/parser.c:30162
0x802b6c cp_parser_init_declarator
../../gcc/cp/parser.c:21806
0x8052b4 cp_parser_single_declaration
../../gcc/cp/parser.c:30742
0x805495 cp_parser_template_declaration_after_parameters
../../gcc/cp/parser.c:30314
0x805c5b cp_parser_explicit_template_declaration
../../gcc/cp/parser.c:30580
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
@ 2021-06-15 7:22 ` marxin at gcc dot gnu.org
2021-06-15 7:53 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-15 7:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-06-15
Summary|[11/12 Regression] ICE in |[11/12 Regression] ICE in
|build_target_expr_with_type |build_target_expr_with_type
|, at cp/tree.c:845 |, at cp/tree.c:845 since
| |r11-5681-gd9288bd28e24c755
Ever confirmed|0 |1
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-5681-gd9288bd28e24c755.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
2021-06-15 7:22 ` [Bug c++/101072] [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755 marxin at gcc dot gnu.org
@ 2021-06-15 7:53 ` rguenth at gcc dot gnu.org
2021-07-07 21:38 ` jason at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-15 7:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|--- |11.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
2021-06-15 7:22 ` [Bug c++/101072] [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755 marxin at gcc dot gnu.org
2021-06-15 7:53 ` rguenth at gcc dot gnu.org
@ 2021-07-07 21:38 ` jason at gcc dot gnu.org
2021-07-07 22:50 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2021-07-07 21:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
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] 11+ messages in thread
* [Bug c++/101072] [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
` (2 preceding siblings ...)
2021-07-07 21:38 ` jason at gcc dot gnu.org
@ 2021-07-07 22:50 ` cvs-commit at gcc dot gnu.org
2021-07-07 22:50 ` [Bug c++/101072] [12 " jason at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-07 22:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:79663c962588e8c033ff39be39e938e2cc866e12
commit r11-8705-g79663c962588e8c033ff39be39e938e2cc866e12
Author: Jason Merrill <jason@redhat.com>
Date: Wed Jul 7 17:57:40 2021 -0400
Revert "c++: Improve init handling"
Apparently looking through these codes means that in a template, we end up
feeding a TARGET_EXPR to fold_non_dependent_expr, which should never
happen. This is a broader issue, but for now let's just revert the change.
This reverts commit d9288bd28e24c755a7216311ee5247e7c88270a6.
PR c++/101072
gcc/cp/ChangeLog:
* decl.c (check_initializer): Don't look through STMT_EXPR and
BIND_EXPR.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/constexpr-empty14.C: Add -fno-elide-constructors.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
` (3 preceding siblings ...)
2021-07-07 22:50 ` cvs-commit at gcc dot gnu.org
@ 2021-07-07 22:50 ` jason at gcc dot gnu.org
2021-07-28 7:07 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2021-07-07 22:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12 Regression] ICE in |[12 Regression] ICE in
|build_target_expr_with_type |build_target_expr_with_type
|, at cp/tree.c:845 since |, at cp/tree.c:845 since
|r11-5681-gd9288bd28e24c755 |r11-5681-gd9288bd28e24c755
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11.2 so far.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
` (4 preceding siblings ...)
2021-07-07 22:50 ` [Bug c++/101072] [12 " jason at gcc dot gnu.org
@ 2021-07-28 7:07 ` rguenth at gcc dot gnu.org
2021-12-28 23:48 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-28 7:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.2 |11.3
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.2 is being released, retargeting bugs to GCC 11.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
` (5 preceding siblings ...)
2021-07-28 7:07 ` rguenth at gcc dot gnu.org
@ 2021-12-28 23:48 ` pinskia at gcc dot gnu.org
2022-01-23 3:19 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-28 23:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |11.1.0, 12.0
Target Milestone|11.3 |12.0
Known to work| |10.3.0, 11.2.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
` (6 preceding siblings ...)
2021-12-28 23:48 ` pinskia at gcc dot gnu.org
@ 2022-01-23 3:19 ` cvs-commit at gcc dot gnu.org
2022-01-23 22:33 ` jason at gcc dot gnu.org
2022-01-26 19:27 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-23 3:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
--- Comment #5 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:053bcc97f4a59e3f2811b8a1edf60fd733a580a0
commit r12-6821-g053bcc97f4a59e3f2811b8a1edf60fd733a580a0
Author: Jason Merrill <jason@redhat.com>
Date: Thu Jan 20 05:45:02 2022 -0500
c++: constexpr and -fno-elide-constructors [PR101072]
We've been trying for a while to avoid TARGET_EXPRs in template code, but
there were still a few that snuck through, and the one in this case broke
the code that tried to handle it. Fixed by using IMPLICIT_CONV_EXPR, as we
have done elsewhere.
I also noticed that finish_compound_literal was assuming that all T{init}
were for aggregate T, and we got a few more TARGET_EXPRs from that. Fixed
by only messing with TARGET_EXPR if we actually have an aggregate init.
PR c++/101072
gcc/cp/ChangeLog:
* cp-tree.h (build_implicit_conv_flags): Declare.
* call.cc (build_implicit_conv_flags): Split out from...
(perform_implicit_conversion_flags): ...here.
* decl.cc (check_initializer): Use it.
* pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling.
* semantics.cc (finish_compound_literal): Don't treat
scalar values like CONSTRUCTORs.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/constexpr-empty14a.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
` (7 preceding siblings ...)
2022-01-23 3:19 ` cvs-commit at gcc dot gnu.org
@ 2022-01-23 22:33 ` jason at gcc dot gnu.org
2022-01-26 19:27 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2022-01-23 22:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/101072] [12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
` (8 preceding siblings ...)
2022-01-23 22:33 ` jason at gcc dot gnu.org
@ 2022-01-26 19:27 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-26 19:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
--- Comment #7 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:9bf217920457f2e2d46b601f24721780a20a031b
commit r12-6883-g9bf217920457f2e2d46b601f24721780a20a031b
Author: Jason Merrill <jason@redhat.com>
Date: Wed Jan 26 12:44:31 2022 -0500
c++: vector compound literal [PR104206]
My patch for PR101072 removed the specific VECTOR_TYPE handling here, which
broke pr72747-2.c on PPC; this patch restores it.
PR c++/104206
PR c++/101072
gcc/cp/ChangeLog:
* semantics.cc (finish_compound_literal): Restore VECTOR_TYPE
check.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-01-26 19:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 17:23 [Bug c++/101072] New: [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 gscfq@t-online.de
2021-06-15 7:22 ` [Bug c++/101072] [11/12 Regression] ICE in build_target_expr_with_type, at cp/tree.c:845 since r11-5681-gd9288bd28e24c755 marxin at gcc dot gnu.org
2021-06-15 7:53 ` rguenth at gcc dot gnu.org
2021-07-07 21:38 ` jason at gcc dot gnu.org
2021-07-07 22:50 ` cvs-commit at gcc dot gnu.org
2021-07-07 22:50 ` [Bug c++/101072] [12 " jason at gcc dot gnu.org
2021-07-28 7:07 ` rguenth at gcc dot gnu.org
2021-12-28 23:48 ` pinskia at gcc dot gnu.org
2022-01-23 3:19 ` cvs-commit at gcc dot gnu.org
2022-01-23 22:33 ` jason at gcc dot gnu.org
2022-01-26 19:27 ` cvs-commit 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).