public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug middle-end/113199] New: [14 Regression][GCN] ICE (segfault) when compiling Newlib @ 2024-01-02 14:14 burnus at gcc dot gnu.org 2024-01-02 15:28 ` [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c tnfchris at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: burnus at gcc dot gnu.org @ 2024-01-02 14:14 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113199 Bug ID: 113199 Summary: [14 Regression][GCN] ICE (segfault) when compiling Newlib Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: ams at gcc dot gnu.org, tnfchris at gcc dot gnu.org Target Milestone: --- Created attachment 56974 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56974&action=edit Reduced testcase This is with mainline - with the patch for PR113163 applied, i.e. https://gcc.gnu.org/pipermail/gcc-patches/2023-December/641555.html Compiling Newlib's libc/time/wcsftime.c fails as follows. Here for the reduced testcase, compiling it with: gcc -O2 input7.i during GIMPLE pass: vect input7.i: In function '__strftime': input7.i:14:1: internal compiler error: Segmentation fault 14 | __strftime (wchar_t *s, size_t maxsize, const wchar_t *format, | ^~~~~~~~~~ 0x11dcbff crash_signal src/gcc-mainline/gcc/toplev.cc:316 0x7f0481ea008f ??? /build/glibc-wuryBv/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x1222566 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) src/gcc-mainline/gcc/tree.h:3757 0x1222566 verify_gimple_assign_ternary src/gcc-mainline/gcc/tree-cfg.cc:4334 0x1227c8e verify_gimple_in_cfg(function*, bool, bool) src/gcc-mainline/gcc/tree-cfg.cc:5602 0x10cde64 execute_function_todo src/gcc-mainline/gcc/passes.cc:2088 0x10ce3ab execute_todo src/gcc-mainline/gcc/passes.cc:2142 * * * verify_gimple_assign_ternary (stmt=0x7ffff7bdb060) at /net/build5-fossa-cs/scratch/tburnus/fsf.mainline.x86_64-linux-gnu-amdgcn/src/gcc-mainline/gcc/tree-cfg.cc:4334 4334 tree rhs3_type = TREE_TYPE (rhs3); (gdb) p rhs3 $1 = (tree) 0x0 (gdb) up #1 0x0000000001227c8f in verify_gimple_in_cfg (fn=0x7ffff7ba4228, verify_nothrow=verify_nothrow@entry=true, ice=ice@entry=true) at /net/build5-fossa-cs/scratch/tburnus/fsf.mainline.x86_64-linux-gnu-amdgcn/src/gcc-mainline/gcc/tree-cfg.cc:5602 5602 err2 |= verify_gimple_stmt (stmt); (gdb) p stmt $2 = (gimple *) 0x7ffff7bdb060 (gdb) p debug_gimple_stmt(stmt) loop_mask_46 = VEC_PERM_EXPR <loop_mask_69, loop_mask_69, >; ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c 2024-01-02 14:14 [Bug middle-end/113199] New: [14 Regression][GCN] ICE (segfault) when compiling Newlib burnus at gcc dot gnu.org @ 2024-01-02 15:28 ` tnfchris at gcc dot gnu.org 2024-01-02 17:58 ` tnfchris at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: tnfchris at gcc dot gnu.org @ 2024-01-02 15:28 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113199 Tamar Christina <tnfchris at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-01-02 Assignee|unassigned at gcc dot gnu.org |tnfchris at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Tamar Christina <tnfchris at gcc dot gnu.org> --- Thanks, patch for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113137 will reject this function since it's not safe to vectorize. For this is looks like I has assumed the target could reverse a mask and didn't check. I'll add a check. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c 2024-01-02 14:14 [Bug middle-end/113199] New: [14 Regression][GCN] ICE (segfault) when compiling Newlib burnus at gcc dot gnu.org 2024-01-02 15:28 ` [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c tnfchris at gcc dot gnu.org @ 2024-01-02 17:58 ` tnfchris at gcc dot gnu.org 2024-01-06 6:14 ` pinskia at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: tnfchris at gcc dot gnu.org @ 2024-01-02 17:58 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113199 --- Comment #2 from Tamar Christina <tnfchris at gcc dot gnu.org> --- Created attachment 56980 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56980&action=edit submitted-patch.patch Have submitted this to list. thanks for report! ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c 2024-01-02 14:14 [Bug middle-end/113199] New: [14 Regression][GCN] ICE (segfault) when compiling Newlib burnus at gcc dot gnu.org 2024-01-02 15:28 ` [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c tnfchris at gcc dot gnu.org 2024-01-02 17:58 ` tnfchris at gcc dot gnu.org @ 2024-01-06 6:14 ` pinskia at gcc dot gnu.org 2024-01-09 13:39 ` cvs-commit at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu.org @ 2024-01-06 6:14 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113199 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |14.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c 2024-01-02 14:14 [Bug middle-end/113199] New: [14 Regression][GCN] ICE (segfault) when compiling Newlib burnus at gcc dot gnu.org ` (2 preceding siblings ...) 2024-01-06 6:14 ` pinskia at gcc dot gnu.org @ 2024-01-09 13:39 ` cvs-commit at gcc dot gnu.org 2024-01-09 13:45 ` tnfchris at gcc dot gnu.org 2024-01-09 14:08 ` ams at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2024-01-09 13:39 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113199 --- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>: https://gcc.gnu.org/g:80bb94e88faaadd4d6f008fececb46214dc89e9f commit r14-7065-g80bb94e88faaadd4d6f008fececb46214dc89e9f Author: Tamar Christina <tamar.christina@arm.com> Date: Tue Jan 9 13:35:49 2024 +0000 middle-end: check if target can do extract first for early breaks [PR113199] I was generating the vector reverse mask without checking if the target actually supported such an operation. This patch changes it to if the bitstart is 0 then use BIT_FIELD_REF instead to extract the first element since this is supported by all targets. This is good for now since masks always come from whilelo. But in the future when masks can come from other sources we will need the old code back. gcc/ChangeLog: PR tree-optimization/113199 * tree-vect-loop.cc (vectorizable_live_operation_1): Use BIT_FIELD_REF. gcc/testsuite/ChangeLog: PR tree-optimization/113199 * gcc.target/gcn/pr113199.c: New test. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c 2024-01-02 14:14 [Bug middle-end/113199] New: [14 Regression][GCN] ICE (segfault) when compiling Newlib burnus at gcc dot gnu.org ` (3 preceding siblings ...) 2024-01-09 13:39 ` cvs-commit at gcc dot gnu.org @ 2024-01-09 13:45 ` tnfchris at gcc dot gnu.org 2024-01-09 14:08 ` ams at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: tnfchris at gcc dot gnu.org @ 2024-01-09 13:45 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113199 Tamar Christina <tnfchris at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> --- Fixed, thanks for the report! ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c 2024-01-02 14:14 [Bug middle-end/113199] New: [14 Regression][GCN] ICE (segfault) when compiling Newlib burnus at gcc dot gnu.org ` (4 preceding siblings ...) 2024-01-09 13:45 ` tnfchris at gcc dot gnu.org @ 2024-01-09 14:08 ` ams at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: ams at gcc dot gnu.org @ 2024-01-09 14:08 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113199 --- Comment #5 from Andrew Stubbs <ams at gcc dot gnu.org> --- I can confirm that I can now build the amdgcn toolchain once more. :-) Thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-01-09 14:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-01-02 14:14 [Bug middle-end/113199] New: [14 Regression][GCN] ICE (segfault) when compiling Newlib burnus at gcc dot gnu.org 2024-01-02 15:28 ` [Bug middle-end/113199] [14 Regression][GCN] ICE (segfault) due to invalid 'loop_mask_46 = VEC_PERM_EXPR' when compiling Newlib's wcsftime.c tnfchris at gcc dot gnu.org 2024-01-02 17:58 ` tnfchris at gcc dot gnu.org 2024-01-06 6:14 ` pinskia at gcc dot gnu.org 2024-01-09 13:39 ` cvs-commit at gcc dot gnu.org 2024-01-09 13:45 ` tnfchris at gcc dot gnu.org 2024-01-09 14:08 ` ams 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).