[Bug middle-end/26643] Linux matroxfb_probe miscompiled
matz at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Mar 13 08:57:00 GMT 2006
------- 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
More information about the Gcc-bugs
mailing list