utils.c (can_fold_for_view_convert_p): New predicate.
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 6 Oct 2008 07:09:41 +0000 (07:09 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 6 Oct 2008 07:09:41 +0000 (07:09 +0000)
commitafcea85941826a0b9a7aa561bffffa563d3871c4
tree4fd62f20d78cc99caedb6b31b232a5c7004f099f
parentde27a12c672ace89eec85d195fb9fb6e34488874
utils.c (can_fold_for_view_convert_p): New predicate.

2008-10-06  Eric Botcazou  <ebotcazou@adacore.com>

* gcc-interface/utils.c (can_fold_for_view_convert_p): New predicate.
(unchecked_convert): Use it to disable problematic folding with
VIEW_CONVERT_EXPR in the general case.  Always disable it for the
special VIEW_CONVERT_EXPR built for integral types and cope with
its addressability issues by preserving the first conversion.

From-SVN: r140902
gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/unchecked_convert2.adb [new file with mode: 0644]