public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cnsun at uwaterloo dot ca" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/100840] New: ICE with -O1: in replace_reg, at reg-stack.c:714 Date: Mon, 31 May 2021 06:02:26 +0000 [thread overview] Message-ID: <bug-100840-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100840 Bug ID: 100840 Summary: ICE with -O1: in replace_reg, at reg-stack.c:714 Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/configure --enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch --prefix=/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210531 (experimental) [master revision :e6428eb51:e21e93407202e62a10c372595076c593c561bb11] (GCC) $ cat mutant.c main() { long double res; asm("lxr\t%0,%1\n" : "=&f"(res)); assert(res == 42.); } $ gcc-trunk -O1 mutant.c mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | main() { | ^~~~ mutant.c: In function ‘main’: mutant.c:4:3: warning: implicit declaration of function ‘assert’ [-Wimplicit-function-declaration] 4 | assert(res == 42.); | ^~~~~~ mutant.c:1:1: note: ‘assert’ is defined in header ‘<assert.h>’; did you forget to ‘#include <assert.h>’? +++ |+#include <assert.h> 1 | main() { mutant.c:3:3: error: output constraint 0 must specify a single register 3 | asm("lxr\t%0,%1\n" : "=&f"(res)); | ^~~ during RTL pass: stack mutant.c:5:1: internal compiler error: in replace_reg, at reg-stack.c:714 5 | } | ^ 0x72f5c6 replace_reg /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:714 0x72f5c6 replace_reg /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:712 0xe6b272 compare_for_stack_reg /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:1379 0xe6b272 subst_stack_regs_pat /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:1998 0xe6bb0a subst_stack_regs /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:2441 0xe6c4ec convert_regs_1 /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:3077 0xe6c4ec convert_regs_2 /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:3211 0xe6d160 convert_regs /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:3246 0xe6d160 reg_to_stack /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:3371 0xe6d160 rest_of_handle_stack_regs /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:3426 0xe6d160 execute /tmp/tmp.zS0RT0UjCW-gcc-builder/gcc/gcc/reg-stack.c:3458 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.
next reply other threads:[~2021-05-31 6:02 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-31 6:02 cnsun at uwaterloo dot ca [this message] 2021-05-31 6:10 ` [Bug target/100840] " pinskia at gcc dot gnu.org 2021-05-31 6:12 ` pinskia at gcc dot gnu.org 2021-05-31 6:13 ` pinskia at gcc dot gnu.org 2021-05-31 11:38 ` cnsun at uwaterloo dot ca
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-100840-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: linkBe 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).