public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zeccav at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61158] New: negative shift at fold-const.c:12095 Date: Mon, 12 May 2014 18:03:00 -0000 [thread overview] Message-ID: <bug-61158-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61158 Bug ID: 61158 Summary: negative shift at fold-const.c:12095 Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Compilation of the following forces a negative shift, result undefined in my opinion /* gcc -S negative shift at fold-const.c:12095 * x86_64 * "zerobits <<= prec - shiftc;" * because prec - shiftc = -8 * result is undefined * compiling Linux Fedora 20 source code kernel/trace/blktrace.c * checked with "gcc_assert(prec >= shiftc && prec-shiftc < HOST_BITS_PER_WIDE_INT);" immediately before */ typedef unsigned long long __u64; void blk_add_trace_unplug(unsigned int depth) { ((__u64)(depth) & (__u64)0x00ff000000000000ULL) >> 40; }
next reply other threads:[~2014-05-12 18:03 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-05-12 18:03 zeccav at gmail dot com [this message] 2014-05-13 18:10 ` [Bug middle-end/61158] " mpolacek at gcc dot gnu.org 2014-05-14 5:19 ` zeccav at gmail dot com 2014-05-14 10:08 ` mpolacek at gcc dot gnu.org 2014-05-14 10:40 ` jakub at gcc dot gnu.org 2014-05-15 10:01 ` jakub at gcc dot gnu.org 2014-05-15 10:08 ` jakub at gcc dot gnu.org 2014-05-15 10:08 ` jakub at gcc dot gnu.org 2014-09-06 17:13 ` danglin at gcc dot gnu.org 2014-09-06 18:01 ` danglin at gcc dot gnu.org 2021-02-21 7:51 ` zeccav at gmail dot com
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-61158-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).