public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "a.elovikov at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112816] New: internal compiler error: in extract_insn, at recog.cc:2804, unrecognizable_insn for __builtin_signbit Date: Fri, 01 Dec 2023 21:12:44 +0000 [thread overview] Message-ID: <bug-112816-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112816 Bug ID: 112816 Summary: internal compiler error: in extract_insn, at recog.cc:2804, unrecognizable_insn for __builtin_signbit Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: a.elovikov at gmail dot com Target Milestone: --- https://godbolt.org/z/3vzejjWcq constexpr int N = 4; template <typename T> struct S { T x[N]; T& operator[](int idx) { return x[idx]; } }; auto foo(S<float> x) { S<int> res; for (int i = 0; i < 4; ++i) res[i] = __builtin_signbit(x[i]) ? -1 : 0; return res; } Copy-pasting "x86-64 gcc (trunk)" output from the godbolt link above (-O3 -std=c++17 options used): <source>: In function 'auto foo(S<float>)': <source>:13:1: error: unrecognizable insn: 13 | } | ^ (insn 20 19 21 2 (set (reg:V4SI 99 [ vect__2.11 ]) (lshiftrt:V4SI (subreg:V4SI (subreg:V4SF (reg/v:TI 105 [ x ]) 0) 0) (const_int 31 [0x1f]))) "<source>":11:31 discrim 1 -1 (nil)) during RTL pass: vregs <source>:13:1: internal compiler error: in extract_insn, at recog.cc:2804 0x26c14fe internal_error(char const*, ...) ???:0 0xb125b9 fancy_abort(char const*, int, char const*) ???:0 0x925e6a _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ???:0 0x925e8c _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1 Also reproducible with (the version I discovered it with) $ g++ --version g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
next reply other threads:[~2023-12-01 21:12 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-01 21:12 a.elovikov at gmail dot com [this message] 2023-12-01 21:17 ` [Bug target/112816] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org 2023-12-01 21:19 ` pinskia at gcc dot gnu.org 2023-12-01 21:20 ` [Bug target/112816] [11/12/13/14 Regression] ICE unrecognizable_insn with __builtin_signbit and returning struct with int[4] pinskia at gcc dot gnu.org 2023-12-02 9:05 ` jakub at gcc dot gnu.org 2023-12-02 9:10 ` jakub at gcc dot gnu.org 2023-12-02 9:16 ` jakub at gcc dot gnu.org 2023-12-04 4:12 ` liuhongt at gcc dot gnu.org 2023-12-04 8:01 ` cvs-commit at gcc dot gnu.org 2023-12-04 8:02 ` [Bug target/112816] [11/12/13 " jakub at gcc dot gnu.org 2023-12-04 17:04 ` a.elovikov at gmail dot com 2023-12-05 8:09 ` cvs-commit at gcc dot gnu.org 2023-12-05 16:32 ` cvs-commit at gcc dot gnu.org 2023-12-05 17:02 ` [Bug target/112816] [11/12 " jakub at gcc dot gnu.org 2023-12-16 0:38 ` cvs-commit at gcc dot gnu.org 2023-12-17 13:55 ` cvs-commit at gcc dot gnu.org 2023-12-18 19:30 ` a.elovikov at gmail dot com 2023-12-18 20:03 ` jakub at gcc dot gnu.org 2023-12-19 9:25 ` cvs-commit at gcc dot gnu.org 2023-12-19 9:33 ` cvs-commit at gcc dot gnu.org 2023-12-19 9:37 ` cvs-commit at gcc dot gnu.org 2023-12-19 9:45 ` cvs-commit at gcc dot gnu.org 2023-12-19 9:46 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-112816-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).