public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/104458] New: [11/12 Regression] ICE: SIGSEGV in gen_udivmodhiqi3 -> copy_rtx with -O1 -m8bit-idiv
Date: Wed, 09 Feb 2022 09:38:14 +0000	[thread overview]
Message-ID: <bug-104458-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 104458
           Summary: [11/12 Regression] ICE: SIGSEGV in gen_udivmodhiqi3 ->
                    copy_rtx with -O1 -m8bit-idiv
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 52384
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52384&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O1 -m8bit-idiv testcase.c -wrapper valgrind,-q
==18265== Invalid read of size 2
==18265==    at 0x131DB41: copy_rtx(rtx_def*) (rtl.cc:290)
==18265==    by 0x1B857B0: gen_udivmodhiqi3(rtx_def*, rtx_def*, rtx_def*)
(insn-emit.cc:1592)
==18265==    by 0x17C9E9C: ix86_split_idivmod(machine_mode, rtx_def**, bool)
(i386-expand.cc:1469)
==18265==    by 0x1C5D40D: gen_split_167(rtx_insn*, rtx_def**) (i386.md:8758)
==18265==    by 0x21D8CDC: split_insns(rtx_def*, rtx_insn*) (i386.md:15576)
==18265==    by 0xF725E8: try_split(rtx_def*, rtx_insn*, int)
(emit-rtl.cc:3795)
==18265==    by 0x12DCBC9: split_insn(rtx_insn*) (recog.cc:3362)
==18265==    by 0x12E3D27: split_all_insns() (recog.cc:3466)
==18265==    by 0x12E3DD8: (anonymous
namespace)::pass_split_all_insns::execute(function*) (recog.cc:4384)
==18265==    by 0x128CC49: execute_one_pass(opt_pass*) (passes.cc:2637)
==18265==    by 0x128D50F: execute_pass_list_1(opt_pass*) (passes.cc:2737)
==18265==    by 0x128D521: execute_pass_list_1(opt_pass*) (passes.cc:2738)
==18265==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==18265== 
during RTL pass: split1
testcase.c: In function 'foo':
testcase.c:9:1: internal compiler error: Segmentation fault
    9 | }
      | ^
0x139854f crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:322
0x131db41 copy_rtx(rtx_def*)
        /repo/gcc-trunk/gcc/rtl.cc:290
0x1b857b0 gen_udivmodhiqi3(rtx_def*, rtx_def*, rtx_def*)
        /repo/build-gcc-trunk-amd64/gcc/insn-emit.cc:1592
0x17c9e9c ix86_split_idivmod(machine_mode, rtx_def**, bool)
        /repo/gcc-trunk/gcc/config/i386/i386-expand.cc:1469
0x1c5d40d gen_split_167(rtx_insn*, rtx_def**)
        /repo/gcc-trunk/gcc/config/i386/i386.md:8758
0x21d8cdc split_insns(rtx_def*, rtx_insn*)
        /repo/gcc-trunk/gcc/config/i386/i386.md:15576
0xf725e8 try_split(rtx_def*, rtx_insn*, int)
        /repo/gcc-trunk/gcc/emit-rtl.cc:3795
0x12dcbc9 split_insn
        /repo/gcc-trunk/gcc/recog.cc:3362
0x12e3d27 split_all_insns()
        /repo/gcc-trunk/gcc/recog.cc:3466
0x12e3dd8 execute
        /repo/gcc-trunk/gcc/recog.cc:4384
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-7124-20220209171435-g59b31f0e2d1-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-7124-20220209171435-g59b31f0e2d1-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220209 (experimental) (GCC)

             reply	other threads:[~2022-02-09  9:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09  9:38 zsojka at seznam dot cz [this message]
2022-02-09 10:05 ` [Bug target/104458] " rguenth at gcc dot gnu.org
2022-02-09 10:54 ` ubizjak at gmail dot com
2022-02-09 19:19 ` cvs-commit at gcc dot gnu.org
2022-02-09 22:23 ` cvs-commit at gcc dot gnu.org
2022-02-09 22:43 ` cvs-commit at gcc dot gnu.org
2022-02-09 22:45 ` ubizjak at gmail dot com
2022-02-10 14:28 ` cvs-commit at gcc dot gnu.org
2022-02-10 16:34 ` cvs-commit at gcc dot gnu.org
2022-02-10 16:35 ` cvs-commit 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-104458-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: 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).