[Ada] Fix wrong size computation with boolean discriminant
Eric Botcazou
ebotcazou@adacore.com
Fri Feb 24 10:04:00 GMT 2017
This is a regression present on the mainline and caused by the wrong handling
of TRUTH_NOT_EXPR by the max_size function.
Tested on x86_64-suse-linux, applied on the mainline.
2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
argument when recursing on TRUTH_NOT_EXPR.
2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/discr47.adb: New test.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 483 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170224/58526e1e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: discr47.adb
Type: text/x-adasrc
Size: 299 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170224/58526e1e/attachment-0001.bin>
More information about the Gcc-patches
mailing list