[PATCH] Fix PR middle-end/18045

Eric Botcazou ebotcazou@libertysurf.fr
Mon Oct 18 22:56:00 GMT 2004


Hello,

This is the miscompilation of the Ada front-end on i486-linux, namely 
ada/uintp.adb:UI_From_Dint.  The problem is that the recently added 
expand_smod_pow2 cannot handle modes whose size is greater than that of 
HOST_WIDE_INT on targets where branches are cheap.  The testcase demonstrates 
the problem with DImode and HOST_WIDE_INT=32-bit long.

Bootstrapped/regtested on i486-mandrake-linux-gnu, approved offline by Roger, 
applied to mainline.


2004-10-18  Eric Botcazou  <ebotcazou@libertysurf.fr>

	PR middle-end/18045
	* expmed.c (expand_smod_pow2): Handle modes whose size
	is greater than that of HOST_WIDE_INT.


2004-10-18  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* gcc.dg/smod-1.c: New test.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr18405.diff
Type: text/x-diff
Size: 3685 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041018/56495304/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smod-1.c
Type: text/x-csrc
Size: 433 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041018/56495304/attachment-0001.bin>


More information about the Gcc-patches mailing list