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 rtl-optimization/113464] ICE: in lower_asm, at gimple-lower-bitint.cc:5200 with invalid __asm__ on _BitInt() at -O1 and above
Date: Thu, 18 Jan 2024 03:57:53 +0000	[thread overview]
Message-ID: <bug-113464-4-IJ6EjxjCND@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113464-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> ---
Created attachment 57128
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57128&action=edit
testcase triggering SIGSEGV at -O0

Slightly different testcase, triggers SIGSEGV at -O0 at a similar place:
$ x86_64-pc-linux-gnu-gcc testcase2.c -wrapper valgrind,-q
==8413== Invalid read of size 8
==8413==    at 0x271971F: var_to_partition (tree-ssa-live.h:163)
==8413==    by 0x271971F: lower_asm (gimple-lower-bitint.cc:5199)
==8413==    by 0x271971F: (anonymous
namespace)::bitint_large_huge::lower_stmt(gimple*)
(gimple-lower-bitint.cc:5236)
==8413==    by 0x271BB69: gimple_lower_bitint() (gimple-lower-bitint.cc:6534)
==8413==    by 0x13CBE7A: execute_one_pass(opt_pass*) (passes.cc:2646)
==8413==    by 0x13CC76F: execute_pass_list_1(opt_pass*) (passes.cc:2755)
==8413==    by 0x13CC7A8: execute_pass_list(function*, opt_pass*)
(passes.cc:2766)
==8413==    by 0xFCC675: expand (cgraphunit.cc:1842)
==8413==    by 0xFCC675: cgraph_node::expand() (cgraphunit.cc:1795)
==8413==    by 0xFCD589: output_in_order (cgraphunit.cc:2192)
==8413==    by 0xFCD589: symbol_table::compile() [clone .part.0]
(cgraphunit.cc:2396)
==8413==    by 0xFD0537: compile (cgraphunit.cc:2312)
==8413==    by 0xFD0537: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2584)
==8413==    by 0x150E111: compile_file() (toplev.cc:474)
==8413==    by 0xDE6E6B: do_compile (toplev.cc:2152)
==8413==    by 0xDE6E6B: toplev::main(int, char**) (toplev.cc:2308)
==8413==    by 0xDE864A: main (main.cc:39)
==8413==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==8413== 
during GIMPLE pass: bitintlower0
testcase2.c: In function 'bar':
testcase2.c:2:1: internal compiler error: Segmentation fault
    2 | bar(void)
      | ^~~
0x150dc2f crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:317
0x271971f var_to_partition(_var_map*, tree_node*)
        /repo/gcc-trunk/gcc/tree-ssa-live.h:163
0x271971f lower_asm
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:5199
0x271971f lower_stmt
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:5236
0x271bb69 gimple_lower_bitint
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:6534
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.

  reply	other threads:[~2024-01-18  3:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  3:05 [Bug rtl-optimization/113464] New: " zsojka at seznam dot cz
2024-01-18  3:57 ` zsojka at seznam dot cz [this message]
2024-01-18 19:10 ` [Bug tree-optimization/113464] " jakub at gcc dot gnu.org
2024-01-19  9:02 ` cvs-commit at gcc dot gnu.org
2024-01-19  9:05 ` jakub at gcc dot gnu.org
2024-01-20 17:11 ` pinskia 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-113464-4-IJ6EjxjCND@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).