On 12/12/2011 01:48 PM, BELBACHIR Selim wrote:
> Everything seems good when I use a union instead of "*((int *)(&af))".
>
> But I think that "*((int *)(&af))" is a valid syntax to get the
> integer representation of my floating point value (in my test case
> 0x3F80 for 1.0f in IEEE-754). It ma
On 12/12/11 14:48, BELBACHIR Selim wrote:
> Everything seems good when I use a union instead of "*((int *)(&af))".
This casting variant rings a bell here, especially when it breaks with
optimization but works as union:
Does it make a difference when you compile with "-fno-strict-aliasing" ?
/ha
I don't know ...
>
> Selim
>
>
> -Message d'origine-
> De : gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] De la part de
> Andrew Haley
> Envoyé : vendredi 9 décembre 2011 18:37
> À : gcc@gcc.gnu.org
> Objet : Re: dse2 remove wrong insn
>
>
mb ? I don't know ...
Selim
-Message d'origine-
De : gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] De la part de Andrew
Haley
Envoyé : vendredi 9 décembre 2011 18:37
À : gcc@gcc.gnu.org
Objet : Re: dse2 remove wrong insn
On 12/09/2011 03:05 PM, BELBACHIR Selim wrote:
&
On 12/09/2011 03:05 PM, BELBACHIR Selim wrote:
> int main() {
> int x;
> float af;
> ff(&x);
> af = f2(1.0f);
> return *((int *)(&af));
> }
Please try this again, but with a union rather than a pointer
cast. I don't think this code is legal C.
Andrew.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 12/09/11 08:05, BELBACHIR Selim wrote:
> Hi,
>
> I'm still working on a new gcc-4.5.2 backend for a private
> processor. I encountered a strange behavior and I'm unable to find
> what causes this behavior. As an overview, it seems that dse2 pass
>
BELBACHIR Selim wrote:
> Hi,
>
> I'm still working on a new gcc-4.5.2 backend for a private processor.
> I encountered a strange behavior and I'm unable to find what causes this
> behavior.
> As an overview, it seems that dse2 pass removes insn where it should not
> (optim -O2, -O3)
>
> Here is
Hi,
I'm still working on a new gcc-4.5.2 backend for a private processor.
I encountered a strange behavior and I'm unable to find what causes this
behavior.
As an overview, it seems that dse2 pass removes insn where it should not (optim
-O2, -O3)
Here is the code giving me headachs which return