public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "qiaopeixin at huawei dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto Date: Thu, 12 Nov 2020 12:19:38 +0000 [thread overview] Message-ID: <bug-97812-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97812 Bug ID: 97812 Summary: Wrong output when compiling the testcase with -O2 -flto Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: qiaopeixin at huawei dot com CC: marxin at gcc dot gnu.org Target Milestone: --- Hi, gcc-trunk outputs wrong result when compiling the following testcase with -O2 -flto: #include<stdio.h> short a; volatile short b = 4066; char c; int main() { unsigned d = b & 2305; signed char e = d; c = e ? : e; if (d) { printf("%d\n", a); } } $gcc -O0 -w test.c && ./a.out 0 $gcc -O2 -flto -w test.c && ./a.out (nothing) gcc version 11.0.0 20201111 (experimental) (GCC)
next reply other threads:[~2020-11-12 12:19 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-12 12:19 qiaopeixin at huawei dot com [this message] 2020-11-12 12:23 ` [Bug lto/97812] " jakub at gcc dot gnu.org 2020-11-12 12:24 ` marxin at gcc dot gnu.org 2020-11-12 13:12 ` qiaopeixin at huawei dot com 2020-11-12 13:16 ` qiaopeixin at huawei dot com 2020-11-12 13:24 ` jakub at gcc dot gnu.org 2020-11-12 13:35 ` marxin at gcc dot gnu.org 2020-11-12 13:55 ` marxin at gcc dot gnu.org 2020-11-13 8:53 ` [Bug lto/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262 marxin at gcc dot gnu.org 2020-11-13 10:15 ` rguenth at gcc dot gnu.org 2020-11-13 10:27 ` rguenth at gcc dot gnu.org 2020-11-13 10:38 ` [Bug tree-optimization/97812] " rguenth at gcc dot gnu.org 2020-11-13 11:25 ` cvs-commit at gcc dot gnu.org 2020-11-13 11:25 ` [Bug tree-optimization/97812] [9/10 " rguenth at gcc dot gnu.org 2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org 2020-12-02 12:21 ` [Bug tree-optimization/97812] [9 " cvs-commit at gcc dot gnu.org 2020-12-02 12:27 ` 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-97812-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).