This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31136] [4.2 Regression] FRE ignores bit-field truncation (C and C++ front-end don't produce bit-field truncation
- From: "pinskia at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Mar 2007 07:57:22 -0000
- Subject: [Bug tree-optimization/31136] [4.2 Regression] FRE ignores bit-field truncation (C and C++ front-end don't produce bit-field truncation
- References: <bug-31136-12896@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from pinskia at gmail dot com 2007-03-23 07:57 -------
Subject: Re: [4.2 Regression] FRE ignores bit-field truncation (C and C++
front-end don't produce bit-field truncation
On 23 Mar 2007 05:01:00 -0000, spark at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
> The problematic STRIP_SIGN_NOPS() call is from fold_unary()
> which is called from try_combine_conversion() in tree-ssa-pre.c.
>
> STRIP_SIGN_NOPS() is called with the expression:
No, STRIP_SIGN_NOPS is correct, just fold_unary is incorrect in its
folding. It should have called fold_convert on the expression if the
types are different and it is a constant.
-- Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31136