public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "shaohua.li at inf dot ethz.ch" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107387] New: gcc trunk -O2 crashes when enable UBSan Date: Mon, 24 Oct 2022 20:38:45 +0000 [thread overview] Message-ID: <bug-107387-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107387 Bug ID: 107387 Summary: gcc trunk -O2 crashes when enable UBSan Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: shaohua.li at inf dot ethz.ch Target Milestone: --- % gcc-tk -v Using built-in specs. COLLECT_GCC=gcc-tk COLLECT_LTO_WRAPPER=/zdata/shaoli/compilers/ccbuilder-compilers/gcc-99da523359e9333555585484eb3b8f854a98f1b4/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --disable-multilib --disable-bootstrap --enable-languages=c,c++ --prefix=/zdata/shaoli/compilers/ccbuilder-compilers/gcc-99da523359e9333555585484eb3b8f854a98f1b4 Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20221013 (experimental) (GCC) % % gcc-tk -fsanitize=undefined -O2 a.c a.c: In function ‘m’: a.c:8:59: warning: division by zero [-Wdiv-by-zero] 8 | static inline __attribute__((always_inline)) void m() { 0 / 0; } | ^ during GIMPLE pass: slp a.c: In function ‘p.isra’: a.c:31:7: internal compiler error: in to_sreal_scale, at profile-count.cc:339 31 | void *p() { | ^ 0x2059aee internal_error(char const*, ...) ???:0 0x99f3c4 fancy_abort(char const*, int, char const*) ???:0 0x1310657 vect_optimize_slp_pass::start_choosing_layouts() ???:0 0x13118af vect_optimize_slp_pass::run() ???:0 0x1319cd9 vect_slp_function(function*) ???:0 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. % % cat a.c int a, b, c, e, k; char *d; struct { short f; short g; } l; static int h = 1; static inline __attribute__((always_inline)) void m() { 0 / 0; } static int n() { return a && b && a < b ?: b; } static int *o(); static void *p(); static unsigned short q(int); void r() { p(); o(&a); m(); } int *o(int *s) { *s = n(); } unsigned short q(int s) { if (s) { int i = 0; for (; i < 7;) i = 7; k = n(); } } void *p() { int i, j; char *t[81]; for (; i < 8; i++) for (; j; j++) t[e] = d; q(h); if (c) l.g = l.f = 0; } % Compiler explorer: https://godbolt.org/z/qEWr71vbd
next reply other threads:[~2022-10-24 20:38 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-24 20:38 shaohua.li at inf dot ethz.ch [this message] 2022-10-24 20:42 ` [Bug c/107387] [13 Regression] " mpolacek at gcc dot gnu.org 2022-10-24 20:44 ` [Bug tree-optimization/107387] " mpolacek at gcc dot gnu.org 2022-10-25 7:01 ` [Bug tree-optimization/107387] [13 Regression] gcc trunk -O2 crashes when enable UBSan since r13-2288-g61c4c989034548 rguenth at gcc dot gnu.org 2022-10-25 9:06 ` rsandifo at gcc dot gnu.org 2022-10-26 9:07 ` rsandifo 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-107387-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).