public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105402] New: ICE: in emit_swap_insn, at reg-stack.c:837 at -Og with custom target flags
@ 2022-04-27  4:16 zsojka at seznam dot cz
  2022-04-27  8:53 ` [Bug target/105402] " marxin at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: zsojka at seznam dot cz @ 2022-04-27  4:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105402
           Summary: ICE: in emit_swap_insn, at reg-stack.c:837 at -Og with
                    custom target flags
           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 52888
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52888&action=edit
reduced testcase

I don't know how much this relates to PR39607; there are no unitialized
variables, but there is dead code and undefined behavior (at runtime).

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Og -mstringop-strategy=libcall
-fsanitize=integer-divide-by-zero -mregparm=3 -mtune=eden-x4 -m32 testcase.c
testcase.c: In function 'foo':
testcase.c:11:5: warning: division by zero [-Wdiv-by-zero]
   11 |   0 / 0;
      |     ^
during RTL pass: stack
testcase.c:12:1: internal compiler error: in emit_swap_insn, at
reg-stack.cc:843
   12 | }
      | ^
0x7b448f emit_swap_insn
        /repo/gcc-trunk/gcc/reg-stack.cc:843
0x1355cec move_for_stack_reg
        /repo/gcc-trunk/gcc/reg-stack.cc:1135
0x1358256 subst_stack_regs
        /repo/gcc-trunk/gcc/reg-stack.cc:2457
0x13586c9 convert_regs_1
        /repo/gcc-trunk/gcc/reg-stack.cc:3091
0x13586c9 convert_regs_2
        /repo/gcc-trunk/gcc/reg-stack.cc:3225
0x1359858 convert_regs
        /repo/gcc-trunk/gcc/reg-stack.cc:3260
0x1359858 reg_to_stack
        /repo/gcc-trunk/gcc/reg-stack.cc:3385
0x1359858 rest_of_handle_stack_regs
        /repo/gcc-trunk/gcc/reg-stack.cc:3441
0x1359858 execute
        /repo/gcc-trunk/gcc/reg-stack.cc:3473
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-8264-20220426101158-g7d31c678d68-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-8264-20220426101158-g7d31c678d68-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220426 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/105402] ICE: in emit_swap_insn, at reg-stack.c:837 at -Og with custom target flags
  2022-04-27  4:16 [Bug target/105402] New: ICE: in emit_swap_insn, at reg-stack.c:837 at -Og with custom target flags zsojka at seznam dot cz
@ 2022-04-27  8:53 ` marxin at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-27  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-04-27
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r8-1207-gb69d9ac6a9f6fae4, but it likely only exposed a latent
issue.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-27  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27  4:16 [Bug target/105402] New: ICE: in emit_swap_insn, at reg-stack.c:837 at -Og with custom target flags zsojka at seznam dot cz
2022-04-27  8:53 ` [Bug target/105402] " marxin 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).