[PATCH] Fix problematic folding
Eric Botcazou
ebotcazou@adacore.com
Sat Aug 2 10:51:00 GMT 2008
> Hmm, I don't get the trunk to produce anything like the above dump - the
> additions are always gone:
Either you don't have recent enough a compiler or you didn't compile with
-gnatp like me. :-)
Anyway, I think that mimicing the other compilers is both simpler (there is no
boolean arithmetics in Ada, Gigi generates it for some specific constructs so
we can tweak the expressions) and probably safer. Thanks for the tip.
Tested on i586-suse-linux, applied on the mainline.
2008-08-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (build_binary_op) <PLUS_EXPR, MINUS_EXPR>:
New case. Convert BOOLEAN_TYPE operation to the default integer type.
2008-08-02 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/boolean_expr2.adb: New test.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 1042 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080802/16f18c63/attachment.bin>
More information about the Gcc-patches
mailing list