[Bug middle-end/26643] Linux matroxfb_probe miscompiled

2006-03-13 Thread matz at suse dot de


--- Comment #9 from matz at suse dot de  2006-03-13 08:57 ---
-fno-ivopts fixes it.  The problem is how bitfield refs are dealt with it
seems.  With -fno-ivopts the final_cleanup pass looks like so at the
interesting point:

  D.2180 = BIT_FIELD_REF *pdev, 32, 544  4294967295;
...
  if ((BIT_FIELD_REF *b, 32, 0  4294967295) != D.2180) goto L3;
else goto L1;

ivopts lead to this code at that point:

  D.2180 = BIT_FIELD_REF *pdev, 32, 544  4294967295;
...
  if ((MEM[base: (long unsigned int *) b]  4294967295) != D.2180) goto L3;
else goto L1;

Now BIT_FIELD_REF*b,32,0 extract exactly the 32 bit at address 'b'.
But MEM[base: (long unsigned int *) b] extracts the 64 bit at that address.
The masking afterwards selects the lower 32bit from that, but ppc being
a big endian target this extracts the wrong half.  Let's CC Zdenek for this.


-- 

matz at suse dot de changed:

   What|Removed |Added

 CC||rakdver at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26643



[Bug middle-end/26643] Linux matroxfb_probe miscompiled

2006-03-11 Thread pinskia at gcc dot gnu dot org


--- Comment #6 from pinskia at gcc dot gnu dot org  2006-03-11 15:32 ---
This works on the mainline on powerpc-darwin and on the 4.1 branch on
x86_64-linux-gnu and the mainline on x86_64.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|c   |middle-end
   Keywords||wrong-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26643



[Bug middle-end/26643] Linux matroxfb_probe miscompiled

2006-03-11 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2006-03-11 15:35 ---
Can you try -O1 -fno-ivopts?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26643



[Bug middle-end/26643] Linux matroxfb_probe miscompiled

2006-03-11 Thread olh at suse dot de


--- Comment #8 from olh at suse dot de  2006-03-11 15:56 ---
yes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26643