public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102414] New: [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442
@ 2021-09-20 19:03 gscfq@t-online.de
2021-09-20 22:44 ` [Bug c++/102414] " pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: gscfq@t-online.de @ 2021-09-20 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102414
Bug ID: 102414
Summary: [12 Regression] ICE in unify_array_domain, at
cp/pt.c:23442
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: ---
Started between 20210627 and 20210704 :
$ cat z1.cc
void f ()
{
int a[3];
auto (*b)[0/0] = &a;
}
$ g++-12-20210919 -c z1.cc
z1.cc: In function 'void f()':
z1.cc:4:14: warning: division by zero [-Wdiv-by-zero]
4 | auto (*b)[0/0] = &a;
| ~^~
z1.cc:4:21: internal compiler error: in unify_array_domain, at cp/pt.c:23442
4 | auto (*b)[0/0] = &a;
| ^
0x671a18 unify_array_domain
../../gcc/cp/pt.c:23442
0x8160a5 unify
../../gcc/cp/pt.c:24013
0x815da3 unify
../../gcc/cp/pt.c:24319
0x814b99 unify_one_argument
../../gcc/cp/pt.c:22271
0x8225b6 type_unification_real
../../gcc/cp/pt.c:22390
0x80aea5 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
../../gcc/cp/pt.c:29807
0x732d36 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/cp/decl.c:7948
0x7f3caf cp_parser_init_declarator
../../gcc/cp/parser.c:22665
0x7d1b52 cp_parser_simple_declaration
../../gcc/cp/parser.c:15133
0x7d37c9 cp_parser_declaration_statement
../../gcc/cp/parser.c:14214
0x7d3e4c cp_parser_statement
../../gcc/cp/parser.c:12306
0x7d4cb4 cp_parser_statement_seq_opt
../../gcc/cp/parser.c:12713
0x7d4d6f cp_parser_compound_statement
../../gcc/cp/parser.c:12662
0x7f2e78 cp_parser_function_body
../../gcc/cp/parser.c:24893
0x7f2e78 cp_parser_ctor_initializer_opt_and_function_body
../../gcc/cp/parser.c:24944
0x7f3326 cp_parser_function_definition_after_declarator
../../gcc/cp/parser.c:31066
0x7f4247 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/cp/parser.c:30982
0x7f4247 cp_parser_init_declarator
../../gcc/cp/parser.c:22427
0x7d1b52 cp_parser_simple_declaration
../../gcc/cp/parser.c:15133
0x7f9a1f cp_parser_declaration
../../gcc/cp/parser.c:14819
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442
2021-09-20 19:03 [Bug c++/102414] New: [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 gscfq@t-online.de
@ 2021-09-20 22:44 ` pinskia at gcc dot gnu.org
2021-09-27 12:54 ` [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2 marxin at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-20 22:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102414
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2
2021-09-20 19:03 [Bug c++/102414] New: [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 gscfq@t-online.de
2021-09-20 22:44 ` [Bug c++/102414] " pinskia at gcc dot gnu.org
@ 2021-09-27 12:54 ` marxin at gcc dot gnu.org
2021-09-27 13:33 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-27 12:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102414
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|unify_array_domain, at |unify_array_domain, at
|cp/pt.c:23442 |cp/pt.c:23442 since
| |r12-1933-ge66d0b7b87d105d2
Last reconfirmed| |2021-09-27
Status|UNCONFIRMED |NEW
CC| |marxin at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-1933-ge66d0b7b87d105d2.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2
2021-09-20 19:03 [Bug c++/102414] New: [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 gscfq@t-online.de
2021-09-20 22:44 ` [Bug c++/102414] " pinskia at gcc dot gnu.org
2021-09-27 12:54 ` [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2 marxin at gcc dot gnu.org
@ 2021-09-27 13:33 ` mpolacek at gcc dot gnu.org
2022-01-20 9:56 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-09-27 13:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102414
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2
2021-09-20 19:03 [Bug c++/102414] New: [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 gscfq@t-online.de
` (2 preceding siblings ...)
2021-09-27 13:33 ` mpolacek at gcc dot gnu.org
@ 2022-01-20 9:56 ` rguenth at gcc dot gnu.org
2022-01-31 20:36 ` cvs-commit at gcc dot gnu.org
2022-01-31 20:38 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-20 9:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102414
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11 rejects the code, so does clang
t.ii: In function 'void f()':
t.ii:4:14: warning: division by zero [-Wdiv-by-zero]
4 | auto (*b)[0/0] = &a;
| ~^~
t.ii:4:10: error: 'b' declared as array of 'auto'
4 | auto (*b)[0/0] = &a;
| ^
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2
2021-09-20 19:03 [Bug c++/102414] New: [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 gscfq@t-online.de
` (3 preceding siblings ...)
2022-01-20 9:56 ` rguenth at gcc dot gnu.org
@ 2022-01-31 20:36 ` cvs-commit at gcc dot gnu.org
2022-01-31 20:38 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-31 20:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102414
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:874ad5d6745bf3bbe4aa138cef09c669b3fb9b07
commit r12-6952-g874ad5d6745bf3bbe4aa138cef09c669b3fb9b07
Author: Marek Polacek <polacek@redhat.com>
Date: Thu Jan 27 18:11:03 2022 -0500
c++: ICE with auto[] and VLA [PR102414]
Here we ICE in unify_array_domain when we're trying to deduce the type
of an array, as in
auto(*p)[i] = (int(*)[i])0;
but unify_array_domain doesn't arbitrarily complex bounds. Another
test is, e.g.,
auto (*b)[0/0] = &a;
where the type of the array is
<<< Unknown tree: template_type_parm >>>[0:(sizetype) ((ssizetype) (0 /
0) - 1)]
It seems to me that we need not handle these.
PR c++/102414
PR c++/101874
gcc/cp/ChangeLog:
* decl.cc (create_array_type_for_decl): Use template_placeholder_p.
Sorry on a variable-length array of auto.
gcc/testsuite/ChangeLog:
* g++.dg/cpp23/auto-array3.C: New test.
* g++.dg/cpp23/auto-array4.C: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2
2021-09-20 19:03 [Bug c++/102414] New: [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 gscfq@t-online.de
` (4 preceding siblings ...)
2022-01-31 20:36 ` cvs-commit at gcc dot gnu.org
@ 2022-01-31 20:38 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-01-31 20:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102414
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-01-31 20:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 19:03 [Bug c++/102414] New: [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 gscfq@t-online.de
2021-09-20 22:44 ` [Bug c++/102414] " pinskia at gcc dot gnu.org
2021-09-27 12:54 ` [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2 marxin at gcc dot gnu.org
2021-09-27 13:33 ` mpolacek at gcc dot gnu.org
2022-01-20 9:56 ` rguenth at gcc dot gnu.org
2022-01-31 20:36 ` cvs-commit at gcc dot gnu.org
2022-01-31 20:38 ` mpolacek 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).