public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/31136] [4.2 Regression] FRE ignores bit-field truncation (C and C++ front-end don't produce bit-field truncation Date: Sat, 21 Apr 2007 15:56:00 -0000 [thread overview] Message-ID: <20070421155626.28419.qmail@sourceware.org> (raw) In-Reply-To: <bug-31136-12896@http.gcc.gnu.org/bugzilla/> ------- Comment #14 from rguenth at gcc dot gnu dot org 2007-04-21 16:56 ------- Indeed. int main(void){ s.b6 = 31; s.b4 = s.b6 + s.b6; s.b6 = s.b4; return s.b6 == 15 ? 0 : 1; } Created value VH.0 for 31 + 31 ... <bb 2>: s.b6 = 31; D.1530_3 = 31; D.1531_4 = 31; D.1530_5 = 31; D.1531_6 = 31; D.1532_7 = D.1531_6 + D.1531_6; D.1533_8 = (<unnamed-unsigned:4>) D.1532_7; but luckily we don't fold (<unnamed-unsigned:4>) (31 + 31) wrong. (But note we also don't constant fold) Still, for folding (<unnamed-unsigned:6>)(<unnamed-unsigned:4>) 31:6 there is a bug in fold_unary as we are calling fold_convert_const (code, type, arg0) where arg is 31:6 and type (<unnamed-unsigned:6>) which is obviously a no-op. We should call it on op0 instead. I'm going to test this (it's broken on the mainline as well) and commit if it succeeds. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2007-03-20 10:00:19 |2007-04-21 16:56:26 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31136
next prev parent reply other threads:[~2007-04-21 15:56 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-03-11 18:48 [Bug tree-optimization/31136] New: FRE ignores " TabonyEE at austin dot rr dot com 2007-03-19 23:19 ` [Bug tree-optimization/31136] " TabonyEE at austin dot rr dot com 2007-03-20 0:24 ` pinskia at gcc dot gnu dot org 2007-03-20 0:39 ` TabonyEE at austin dot rr dot com 2007-03-20 6:41 ` [Bug c/31136] " pinskia at gcc dot gnu dot org 2007-03-20 10:00 ` [Bug c/31136] [4.2 Regression] " rguenth at gcc dot gnu dot org 2007-03-22 23:14 ` [Bug c/31136] [4.2 Regression] FRE ignores bit-field truncation (C and C++ front-end don't produce " mmitchel at gcc dot gnu dot org 2007-03-23 3:45 ` [Bug tree-optimization/31136] " jsm28 at gcc dot gnu dot org 2007-03-23 5:01 ` spark at gcc dot gnu dot org 2007-03-23 7:57 ` Andrew Pinski 2007-03-23 8:01 ` Andrew Pinski 2007-03-23 7:57 ` pinskia at gmail dot com 2007-03-23 8:01 ` pinskia at gmail dot com 2007-03-23 8:18 ` pinskia at gcc dot gnu dot org 2007-03-23 13:41 ` joseph at codesourcery dot com 2007-03-26 4:43 ` mmitchel at gcc dot gnu dot org 2007-04-21 15:37 ` rguenth at gcc dot gnu dot org 2007-04-21 15:56 ` rguenth at gcc dot gnu dot org [this message] 2007-04-21 15:58 ` rguenth at gcc dot gnu dot org 2007-04-21 17:44 ` rguenth at gcc dot gnu dot org 2007-04-21 17:47 ` rguenth at gcc dot gnu dot org 2007-04-21 17:53 ` rguenth at gcc dot gnu dot 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=20070421155626.28419.qmail@sourceware.org \ --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).