public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/108984] [13 Regression] LTO bootstrap causes testsuite ICE
Date: Wed, 01 Mar 2023 10:44:00 +0000	[thread overview]
Message-ID: <bug-108984-4-BcJUZGBSlB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108984-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-linux
           Keywords|                            |lto
   Target Milestone|---                         |13.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It does look like a wrong-code issue, the GEN_INT (-align_bytes) argument is
percieved as NULL.

   0x00000000011fcf92 <+578>:   mov    $0x40,%eax
   0x00000000011fcf97 <+583>:   sub    %r12d,%eax
   0x00000000011fcf9a <+586>:   cltq   
   0x00000000011fcf9c <+588>:   mov    0x2c9ada0(,%rax,8),%rsi
   0x00000000011fcfa4 <+596>:   mov    0x196302d(%rip),%rax        # 0x2b5ffd8
<this_target_rtl>
   0x00000000011fcfab <+603>:   mov    (%rax),%rdi
   0x00000000011fcfae <+606>:   call   0x11fcca0 <gen_and2_insn(rtx, rtx)>

and %rsi is indeed NULL at the call.  %rax is -448.  gdb locates the computed
address at

$9 = (rtx *) 0x2c99fa0 <_ZL13ix86_builtins.lto_priv.0+22848>

so it looks like we run into

rtx
gen_rtx_CONST_INT (machine_mode mode ATTRIBUTE_UNUSED, HOST_WIDE_INT arg)
{
  if (arg >= - MAX_SAVED_CONST_INT && arg <= MAX_SAVED_CONST_INT)
    return const_int_rtx[arg + MAX_SAVED_CONST_INT];

but MAX_SAVED_CONST_INT is 64 and gdb says align_bytes is 512.  So
something seems to have elided the range check.

  reply	other threads:[~2023-03-01 10:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 10:25 [Bug target/108984] New: " rguenth at gcc dot gnu.org
2023-03-01 10:44 ` rguenth at gcc dot gnu.org [this message]
2023-03-01 12:14 ` [Bug target/108984] " rguenth at gcc dot gnu.org
2023-03-01 12:21 ` jakub at gcc dot gnu.org
2023-03-01 13:05 ` rguenth at gcc dot gnu.org
2023-03-01 13:23 ` rguenth at gcc dot gnu.org
2023-03-01 13:34 ` rguenth at gcc dot gnu.org
2023-03-01 13:45 ` jakub at gcc dot gnu.org
2023-03-01 14:01 ` rguenth at gcc dot gnu.org
2023-03-02  7:25 ` rguenth 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-108984-4-BcJUZGBSlB@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).