Fix PR rtl-optimization/55388

Eric Botcazou ebotcazou@adacore.com
Fri Nov 23 16:00:00 GMT 2012


This is the recent bootstrap failure on SPARC/Linux --with-cpu=ultrasparc in 
release mode: cp/decl.c:copy_type_enum is miscompiled at -O2 after
  http://gcc.gnu.org/ml/gcc-cvs/2012-11/msg00546.html

The patch has enabled the use of MEM_EXPR for bitfields.  This was possible 
thanks to earlier changes in the bitfield handling machinery in expmed.c,
except that I forgot to change the call to adjust_address in store_bit_field 
so, when an access of size 2 is turned into an access of size 4 in there, the 
MEM_EXPR isn't dropped as expected.  Fixing this is sufficient to restore 
bootstrap, but there is a latent issue in nonoverlapping_component_refs_p 
which now needs to deal with bitfields.

Bootstrapped/regtested on SPARC and x86-64/Linux, applied on the mainline.


2012-11-23  Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/55388
	* alias.c (nonoverlapping_component_refs_p): Handle bitfields.
	* emit-rtl.c (adjust_address_1): Deal with VOIDmode early.
	* expmed.c (store_bit_field): Turn the call to adjust_address
	into a call to adjust_bitfield_address_size.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr55388.diff
Type: text/x-patch
Size: 2660 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121123/c2b51382/attachment.bin>


More information about the Gcc-patches mailing list