public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vsevolod.livinskij at frtk dot ru" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98381] New: Wrong code with -O3 -march=skylake-avx512 Date: Fri, 18 Dec 2020 20:03:46 +0000 [thread overview] Message-ID: <bug-98381-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98381 Bug ID: 98381 Summary: Wrong code with -O3 -march=skylake-avx512 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vsevolod.livinskij at frtk dot ru Target Milestone: --- Reproducer: //func.cpp extern bool var_22; void test(long long a, unsigned b, unsigned long long c) { for (long i = 0; i < 16; i += 1ULL) if (a) var_22 = 5023804122334ULL >= (char)c; } //driver.cpp #include <stdio.h> long long int a = -2161098602020439353LL; unsigned int b = 1621447385U; unsigned long long int c = 16505450185101189749ULL; bool var_22 = (bool)0; void test(long long int a, unsigned int b, unsigned long long int c); int main() { test(a, b, c); printf("%d\n", (int)var_22); } Error: >$ g++ -O3 -march=skylake-avx512 func.cpp driver.cpp && sde -skx -- ./a.out 0 >$ g++ -O0 func.cpp driver.cpp && sde -skx -- ./a.out 1 gcc version 11.0.0 20201217 (6f8486523f61bf0aa476dfa4197d1e3b71a0a8f3) (GCC)
next reply other threads:[~2020-12-18 20:03 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-18 20:03 vsevolod.livinskij at frtk dot ru [this message] 2020-12-19 14:18 ` [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072 hjl.tools at gmail dot com 2020-12-21 8:29 ` marxin at gcc dot gnu.org 2021-01-04 9:03 ` rguenth at gcc dot gnu.org 2021-01-05 14:54 ` cvs-commit at gcc dot gnu.org 2021-01-05 14:56 ` 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-98381-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).