public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "141242068 at smail dot nju.edu.cn" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/114203] New: Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os Date: Sat, 02 Mar 2024 04:19:34 +0000 [thread overview] Message-ID: <bug-114203-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114203 Bug ID: 114203 Summary: Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- The reproduce link: https://gcc.godbolt.org/z/T48jbo5e7 The reproducer (diff: `gcc-14 -O0` and `gcc-14 -Os`): ``` int foo (unsigned char b) { int c = 0; while (b) { b >>= 1; c++; } return c; } int main() { if (foo(0) != 0) __builtin_abort (); return 0; } ``` I have sanitized this program using ubsan and asan, ubsan and asans outputs nothing, so I think this is likely a miscompilation bug.
next reply other threads:[~2024-03-02 4:19 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-02 4:19 141242068 at smail dot nju.edu.cn [this message] 2024-03-02 4:40 ` [Bug tree-optimization/114203] [13/14 Regression] " pinskia at gcc dot gnu.org 2024-03-04 9:36 ` rguenth at gcc dot gnu.org 2024-03-04 10:45 ` cvs-commit at gcc dot gnu.org 2024-03-04 10:46 ` [Bug tree-optimization/114203] [13 " rguenth at gcc dot gnu.org 2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org 2024-03-21 11:51 ` rguenth 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-114203-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).