public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/47538] [4.6 Regression] GNU Scientific Library miscompiled by gcc 4.6 Date: Mon, 31 Jan 2011 13:18:00 -0000 [thread overview] Message-ID: <bug-47538-4-ZwQhtBV3GU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-47538-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47538 --- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-31 11:55:03 UTC --- Can we use sth like Index: tree-ssa-ccp.c =================================================================== --- tree-ssa-ccp.c (revision 169434) +++ tree-ssa-ccp.c (working copy) @@ -1770,9 +1770,38 @@ bit_value_binop_1 (enum tree_code code, { bool uns = (TREE_CODE (r1type) == INTEGER_TYPE && TYPE_IS_SIZETYPE (r1type) ? 0 : TYPE_UNSIGNED (r1type)); + /* Assume we'll get a constant result. Use an initial varying value, we fall back to varying in the end if necessary. */ *mask = double_int_minus_one; + + /* We have some sizetype issues, drop to varying in case there are + mismatches. */ + switch (code) + { + case LSHIFT_EXPR: + case RSHIFT_EXPR: + case LROTATE_EXPR: + case RROTATE_EXPR: + if ((TREE_CODE (type) == INTEGER_TYPE + && TYPE_IS_SIZETYPE (type) ? 0 : TYPE_UNSIGNED (type)) != uns) + return; + break; + + case EQ_EXPR: + case NE_EXPR: + case LT_EXPR: + case LE_EXPR: + case GE_EXPR: + case GT_EXPR: + if ((TREE_CODE (r2type) == INTEGER_TYPE + && TYPE_IS_SIZETYPE (r2type) ? 0 : TYPE_UNSIGNED (r2type)) != uns) + return; + break; + + default:; + } + instead? It makes it more obvious what happens (IMHO).
next prev parent reply other threads:[~2011-01-31 11:55 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-01-30 2:03 [Bug c/47538] New: " howarth at nitro dot med.uc.edu 2011-01-30 2:07 ` [Bug c/47538] " howarth at nitro dot med.uc.edu 2011-01-30 2:48 ` howarth at nitro dot med.uc.edu 2011-01-30 3:05 ` howarth at nitro dot med.uc.edu 2011-01-30 3:10 ` howarth at nitro dot med.uc.edu 2011-01-30 9:39 ` howarth at nitro dot med.uc.edu 2011-01-30 18:20 ` [Bug c/47538] [4.6 Regression] " hjl.tools at gmail dot com 2011-01-30 22:03 ` hjl.tools at gmail dot com 2011-01-31 10:16 ` [Bug tree-optimization/47538] " jakub at gcc dot gnu.org 2011-01-31 10:29 ` ebotcazou at gcc dot gnu.org 2011-01-31 10:45 ` jakub at gcc dot gnu.org 2011-01-31 10:53 ` rguenth at gcc dot gnu.org 2011-01-31 12:50 ` jakub at gcc dot gnu.org 2011-01-31 13:18 ` rguenth at gcc dot gnu.org [this message] 2011-01-31 13:24 ` rguenth at gcc dot gnu.org 2011-01-31 13:29 ` rguenth at gcc dot gnu.org 2011-01-31 15:57 ` howarth at nitro dot med.uc.edu 2011-01-31 17:07 ` jakub at gcc dot gnu.org 2011-01-31 17:23 ` jakub at gcc dot gnu.org 2011-02-02 18:31 ` dnovillo 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-47538-4-ZwQhtBV3GU@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).