* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
@ 2021-10-04 7:34 ` marxin at gcc dot gnu.org
2021-10-04 8:01 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-04 7:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Last reconfirmed| |2021-10-04
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |rguenth at gcc dot gnu.org
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
2021-10-04 7:34 ` [Bug tree-optimization/102587] " marxin at gcc dot gnu.org
@ 2021-10-04 8:01 ` rguenth at gcc dot gnu.org
2021-10-04 8:57 ` cvs-commit at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-04 8:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'll fix the ICE but leave VLA regs uninitialized.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
2021-10-04 7:34 ` [Bug tree-optimization/102587] " marxin at gcc dot gnu.org
2021-10-04 8:01 ` rguenth at gcc dot gnu.org
@ 2021-10-04 8:57 ` cvs-commit at gcc dot gnu.org
2021-10-04 9:05 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-04 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:ad4a3c047f67d628b607bb6cf4791005affd1d83
commit r12-4138-gad4a3c047f67d628b607bb6cf4791005affd1d83
Author: Richard Biener <rguenther@suse.de>
Date: Mon Oct 4 10:02:39 2021 +0200
middle-end/102587 - avoid auto-init for VLA vectors
This avoids ICEing for VLA vector auto-init by not initializing.
2021-10-04 Richard Biener <rguenther@suse.de>
PR middle-end/102587
* internal-fn.c (expand_DEFERRED_INIT): Guard register
initialization path an avoid initializing VLA registers
with it.
* gcc.target/aarch64/sve/pr102587-1.c: New testcase.
* gcc.target/aarch64/sve/pr102587-2.c: Likewise.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-10-04 8:57 ` cvs-commit at gcc dot gnu.org
@ 2021-10-04 9:05 ` rguenth at gcc dot gnu.org
2021-10-04 9:05 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-04 9:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The ICE is fixed, but VLA registers are uninitialized.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2021-10-04 9:05 ` rguenth at gcc dot gnu.org
@ 2021-10-04 9:05 ` rguenth at gcc dot gnu.org
2021-10-04 12:11 ` rsandifo at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-04 9:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2021-10-04 9:05 ` rguenth at gcc dot gnu.org
@ 2021-10-04 12:11 ` rsandifo at gcc dot gnu.org
2021-10-04 17:10 ` qinzhao at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-10-04 12:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu.org
Resolution|FIXED |---
Status|RESOLVED |ASSIGNED
Assignee|rguenth at gcc dot gnu.org |rsandifo at gcc dot gnu.org
--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Reopening because I don't think we can simply ignore the
option like this, at least not without a warning.
Hope to fix sometime in stage 3.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (5 preceding siblings ...)
2021-10-04 12:11 ` rsandifo at gcc dot gnu.org
@ 2021-10-04 17:10 ` qinzhao at gcc dot gnu.org
2021-10-05 8:36 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2021-10-04 17:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
qinzhao at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |qinzhao at gcc dot gnu.org
--- Comment #6 from qinzhao at gcc dot gnu.org ---
with the committed patch, this testing case still failed but in a later rtl
stage:
qinzhao@gcc116:~/Bugs/102587$ sh t
/home/qinzhao/Install/latest/bin/gcc -ftrivial-auto-var-init=zero t.c -S
during RTL pass: pro_and_epilogue
t.c: In function ‘foo’:
t.c:1:33: internal compiler error: Segmentation fault
1 | void foo() { __SVFloat64_t f64; }
| ^
0xe18fab crash_signal
../../latest_gcc_git/gcc/toplev.c:331
0x122ed20 aarch64_add_offset
../../latest_gcc_git/gcc/config/aarch64/aarch64.c:5042
0x123044f aarch64_sub_sp
../../latest_gcc_git/gcc/config/aarch64/aarch64.c:5225
0x123044f aarch64_allocate_and_probe_stack_space
../../latest_gcc_git/gcc/config/aarch64/aarch64.c:8502
0x1230cfb aarch64_expand_prologue()
../../latest_gcc_git/gcc/config/aarch64/aarch64.c:8841
0x169fb63 gen_prologue()
../../latest_gcc_git/gcc/config/aarch64/aarch64.md:853
0x1226d17 target_gen_prologue
../../latest_gcc_git/gcc/config/aarch64/aarch64.md:7448
0xa9495f make_prologue_seq
../../latest_gcc_git/gcc/function.c:5825
0xa94b8b thread_prologue_and_epilogue_insns()
../../latest_gcc_git/gcc/function.c:6043
0xa95293 rest_of_handle_thread_prologue_and_epilogue
../../latest_gcc_git/gcc/function.c:6534
0xa95293 execute
../../latest_gcc_git/gcc/function.c:6610
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.
I think the reason is that the call to .DEFERRED_INIT (POLY_INI_CST[16,16], 2,
0) was not expanded at all during RTL expanding phase.
I feel the committed patch is not correct:
1. if we want to avoid auto initializing such auto variable, we should not add
call to .DEFERRED_INIT in gimplification phase at all.
2. not sure what does "POLY_INT_CST[16,16]" mean? is it a constant?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (6 preceding siblings ...)
2021-10-04 17:10 ` qinzhao at gcc dot gnu.org
@ 2021-10-05 8:36 ` cvs-commit at gcc dot gnu.org
2021-10-05 8:48 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-05 8:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:604459a09585314841cdce4698893c656481691b
commit r12-4182-g604459a09585314841cdce4698893c656481691b
Author: Richard Biener <rguenther@suse.de>
Date: Tue Oct 5 09:28:20 2021 +0200
More .DEFERRED_INIT expansion rework
This avoids looking at the type size and instead uses the size
as passed to .DEFERRED_INIT to determine the size of the non-MEM
to be initialized. It also arranges for possibly poly-int
inits to always use zero-initialization rather than not initializing
and when we need to pun puns the LHS instead of the constant value.
That correctly initializes the variable-size typed array in the
testcase for PR102285 and the SVE vector in PR102587 where for
the testcase I needed to add a SVE capable -march as to not
ICE later.
2021-10-05 Richard Biener <rguenther@suse.de>
PR middle-end/102587
PR middle-end/102285
* internal-fn.c (expand_DEFERRED_INIT): Fall back to
zero-initialization as last resort, use the constant
size as given by the DEFERRED_INIT argument to build
the initializer.
* gcc.target/aarch64/sve/pr102587-1.c: Add -march=armv8.3-a+sve.
* gcc.target/aarch64/sve/pr102587-2.c: Likewise.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (7 preceding siblings ...)
2021-10-05 8:36 ` cvs-commit at gcc dot gnu.org
@ 2021-10-05 8:48 ` rguenth at gcc dot gnu.org
2021-10-14 7:27 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-05 8:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
pattern-init support for SVE vectors is still missing as well as maybe handling
aggregates with embedded SVE vectors if that's a thing.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (8 preceding siblings ...)
2021-10-05 8:48 ` rguenth at gcc dot gnu.org
@ 2021-10-14 7:27 ` pinskia at gcc dot gnu.org
2022-05-06 8:31 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-14 7:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 102741 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (9 preceding siblings ...)
2021-10-14 7:27 ` pinskia at gcc dot gnu.org
@ 2022-05-06 8:31 ` jakub at gcc dot gnu.org
2023-05-08 12:22 ` rguenth at gcc dot gnu.org
2023-08-10 8:58 ` pinskia at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06 8:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |12.2
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (10 preceding siblings ...)
2022-05-06 8:31 ` jakub at gcc dot gnu.org
@ 2023-05-08 12:22 ` rguenth at gcc dot gnu.org
2023-08-10 8:58 ` pinskia at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/102587] ICE in tree_to_uhwi, at tree.h:4668
2021-10-04 7:33 [Bug tree-optimization/102587] New: ICE in tree_to_uhwi, at tree.h:4668 marxin at gcc dot gnu.org
` (11 preceding siblings ...)
2023-05-08 12:22 ` rguenth at gcc dot gnu.org
@ 2023-08-10 8:58 ` pinskia at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-10 8:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102587
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu.org
--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 110969 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread