public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/105980] [11/12/13 Regression] ICE in final_scan_insn_1, at final.cc:2811
Date: Fri, 17 Jun 2022 10:21:47 +0000	[thread overview]
Message-ID: <bug-105980-4-K05c3b4Wg2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105980-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105980

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
emit_move_insn in this part of ix86_output_mi_thunk:

21464         if (!sibcall_insn_operand (fnaddr, word_mode))
21465           {
21466             tmp = gen_rtx_REG (word_mode, tmp_regno);
21467             if (GET_MODE (fnaddr) != word_mode)
21468               fnaddr = gen_rtx_ZERO_EXTEND (word_mode, fnaddr);
21469             emit_move_insn (tmp, fnaddr);
21470             fnaddr = tmp;
21471           }

is creating RTX with pseudos when trying to move fnaddr:

(symbol_ref:SI ("*.LTHUNK0") [flags 0x3] <function_decl 0x7fffea325700
*.LTHUNK0>)

to a temporary register:

(insn 6 5 7 (set (reg:SI 82)
        (plus:SI (reg:SI 82)
            (const:SI (unspec:SI [
                        (symbol_ref:SI ("*.LTHUNK0") [flags 0x3] <function_decl
0x7fffea325700 *.LTHUNK0>)
                    ] UNSPEC_GOTOFF)))) "pr105980.C":4:8 -1
     (nil))

(insn 7 6 8 (set (reg:SI 2 cx)
        (reg:SI 82)) "pr105980.C":4:8 -1
     (expr_list:REG_EQUAL (symbol_ref:SI ("*.LTHUNK0") [flags 0x3]
<function_decl 0x7fffea325700 *.LTHUNK0>)
        (nil)))

This won't fly when we are in the final pass, way late after reload.

  parent reply	other threads:[~2022-06-17 10:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 17:53 [Bug c++/105980] New: " gscfq@t-online.de
2022-06-15  9:13 ` [Bug target/105980] " rguenth at gcc dot gnu.org
2022-06-16 14:03 ` marxin at gcc dot gnu.org
2022-06-17 10:21 ` ubizjak at gmail dot com [this message]
2022-07-25 16:00 ` rguenth at gcc dot gnu.org
2022-07-29 13:46 ` jakub at gcc dot gnu.org
2022-07-29 18:41 ` hjl.tools at gmail dot com
2022-07-29 20:10 ` jakub at gcc dot gnu.org
2022-07-29 20:37 ` hjl.tools at gmail dot com
2023-01-16 18:02 ` jakub at gcc dot gnu.org
2023-01-16 19:00 ` hjl.tools at gmail dot com
2023-01-16 22:11 ` cvs-commit at gcc dot gnu.org
2023-03-24 16:15 ` [Bug target/105980] [11/12 " jakub at gcc dot gnu.org
2023-04-27 13:18 ` cvs-commit at gcc dot gnu.org
2023-05-29 10:07 ` [Bug target/105980] [11 " jakub at gcc dot gnu.org
2024-02-10 18:19 ` fxcoudert 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-105980-4-K05c3b4Wg2@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: link
Be 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).