[PATCH] Fix PR middle-end/26635

Eric Botcazou ebotcazou@adacore.com
Mon Apr 3 16:21:00 GMT 2006


> Revised patch attached.

It turns out that totally disabling the optimization proves detrimental to the 
Ada compiler, especially for size expressions of variable-sized types that 
are not as simplified as they used to be.

So I'm proposing to re-enable it for TYPE_IS_SIZETYPE types.  The revised 
patch has been tested on x86_64-suse-linux.


2006-04-04  Eric Botcazou  <ebotcazou@adacore.com>

        PR middle-end/26635
        * flags.h (flag_modv): Declare.
        * c-common.c (c_common_nodes_and_builtins): Set flag_modv to 1.
        * convert.c (convert_to_integer): Do not narrow the type of PLUS_EXPR
	or MINUS_EXPR if it is signed but not a sizetype and !flag_modv and
	the unwidened type is signed.
        * toplev.c (flag_modv): New global variable.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f217-005-3.diff
Type: text/x-diff
Size: 2634 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060403/3823b6e5/attachment.bin>


More information about the Gcc-patches mailing list