public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102360] New: ICE in can_native_interpret_type_p at gcc/fold-const.c:8800
@ 2021-09-16 8:56 marxin at gcc dot gnu.org
2021-09-16 8:56 ` [Bug tree-optimization/102360] " marxin at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-16 8:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102360
Bug ID: 102360
Summary: ICE in can_native_interpret_type_p at
gcc/fold-const.c:8800
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: qing.zhao at oracle dot com
Target Milestone: ---
Host: x86_64-linux-gnu
Target: aarch64-linux-gnu
The following fails:
$ aarch64-linux-gnu-g++
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/pr71294.C -fno-tree-dse -O1
-ftrivial-auto-var-init=pattern -c
during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/pr71294.C: In function ‘void
fn1()’:
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/pr71294.C:58:19: internal
compiler error: Segmentation fault
58 | B<double, 4, 1> d;
| ^
0xda6f3f crash_signal
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/toplev.c:328
0x7ffff786239f ???
../sysdeps/unix/sysv/linux/sigaction.c:10
0xaaec00 can_native_interpret_type_p(tree_node*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/fold-const.c:8800
0xb614c6 expand_DEFERRED_INIT
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/internal-fn.c:3054
0x9885b7 expand_call_stmt
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:2749
0x9885b7 expand_gimple_stmt_1
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:3876
0x9885b7 expand_gimple_stmt
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:4040
0x98d112 expand_gimple_basic_block
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:6082
0x98ef66 execute
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:6808
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] 5+ messages in thread
* [Bug tree-optimization/102360] ICE in can_native_interpret_type_p at gcc/fold-const.c:8800
2021-09-16 8:56 [Bug tree-optimization/102360] New: ICE in can_native_interpret_type_p at gcc/fold-const.c:8800 marxin at gcc dot gnu.org
@ 2021-09-16 8:56 ` marxin at gcc dot gnu.org
2021-09-16 9:18 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-16 8:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102360
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
Target Milestone|--- |12.0
Priority|P3 |P1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/102360] ICE in can_native_interpret_type_p at gcc/fold-const.c:8800
2021-09-16 8:56 [Bug tree-optimization/102360] New: ICE in can_native_interpret_type_p at gcc/fold-const.c:8800 marxin at gcc dot gnu.org
2021-09-16 8:56 ` [Bug tree-optimization/102360] " marxin at gcc dot gnu.org
@ 2021-09-16 9:18 ` rguenth at gcc dot gnu.org
2021-09-16 11:23 ` cvs-commit at gcc dot gnu.org
2021-09-16 11:23 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-16 9:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102360
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Last reconfirmed| |2021-09-16
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
Program received signal SIGSEGV, Segmentation fault.
0x00000000012f2e6b in can_native_interpret_type_p (type=<tree 0x0>)
at ../../src/trunk/gcc/fold-const.c:8800
8800 switch (TREE_CODE (type))
3049 if (!can_native_interpret_type_p (var_type))
3050 {
3051 alt_type
3052 = lang_hooks.types.type_for_mode (TYPE_MODE (var_type),
3053 TYPE_UNSIGNED
(var_type));
3054 gcc_assert (can_native_interpret_type_p (alt_type));
3055 }
alt_type doesn't need to exist. TYPE_MODE is OImode here.
Another issue will be that native_interpret_int refuses to interpret
types bigger than 128bit. So using
alt_type = build_nonstandard_integer_type
(GET_MODE_BITSIZE (TYPE_MODE (var_type)), 1);
will likely not help. But if we know we're using an integer type
we can natively interpret ourselves.
Note there's another hole with variable-size and SVE vector modes I think.
I'm testing something.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/102360] ICE in can_native_interpret_type_p at gcc/fold-const.c:8800
2021-09-16 8:56 [Bug tree-optimization/102360] New: ICE in can_native_interpret_type_p at gcc/fold-const.c:8800 marxin at gcc dot gnu.org
2021-09-16 8:56 ` [Bug tree-optimization/102360] " marxin at gcc dot gnu.org
2021-09-16 9:18 ` rguenth at gcc dot gnu.org
@ 2021-09-16 11:23 ` cvs-commit at gcc dot gnu.org
2021-09-16 11:23 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-16 11:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102360
--- 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:8d6b12b2233dabf3573383a15ccc67fdb925e5b3
commit r12-3578-g8d6b12b2233dabf3573383a15ccc67fdb925e5b3
Author: Richard Biener <rguenther@suse.de>
Date: Thu Sep 16 11:19:14 2021 +0200
middle-end/102360 - adjust .DEFERRED_INIT expansion
This avoids using native_interpret_type when we cannot do it with
the original type of the variable, instead use an integer type
for the initialization and side-step the size limitation of
native_interpret_int.
2021-09-16 Richard Biener <rguenther@suse.de>
PR middle-end/102360
* internal-fn.c (expand_DEFERRED_INIT): Make pattern-init
of non-memory more robust.
* g++.dg/pr102360.C: New testcase.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/102360] ICE in can_native_interpret_type_p at gcc/fold-const.c:8800
2021-09-16 8:56 [Bug tree-optimization/102360] New: ICE in can_native_interpret_type_p at gcc/fold-const.c:8800 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-09-16 11:23 ` cvs-commit at gcc dot gnu.org
@ 2021-09-16 11:23 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-16 11:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102360
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-16 11:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 8:56 [Bug tree-optimization/102360] New: ICE in can_native_interpret_type_p at gcc/fold-const.c:8800 marxin at gcc dot gnu.org
2021-09-16 8:56 ` [Bug tree-optimization/102360] " marxin at gcc dot gnu.org
2021-09-16 9:18 ` rguenth at gcc dot gnu.org
2021-09-16 11:23 ` cvs-commit at gcc dot gnu.org
2021-09-16 11:23 ` rguenth 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).