]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Do not use ATTR_ADDR_EXPR for 'Unrestricted_Access
authorEric Botcazou <ebotcazou@adacore.come>
Mon, 11 Nov 2024 10:16:26 +0000 (11:16 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 26 Nov 2024 09:49:36 +0000 (10:49 +0100)
commitae7c0475f108f14cabcc1613df449670b1e9d1a2
tree9a7f7a9c46059f9fb7a181d2da2e4f82b41237fb
parent84d8a383c9fe80bd9c4e364505247ef025e1c2b6
ada: Do not use ATTR_ADDR_EXPR for 'Unrestricted_Access

Unlike for 'Access or 'Unchecked_Access, the Attribute_to_gnu routine passes
ATTR_ADDR_EXPR to build_unary_op for 'Unrestricted_Access, which causes the
processing done in build_unary_op to flatten the reference, in particular to
remove all intermediate (view) conversions, which may be problematic for the
SUBSTITUTE_PLACEHOLDER_IN_EXPR machinery.

gcc/ada/ChangeLog:

* gcc-interface/trans.cc (Attribute_to_gnu) <Attr_Access>: Do not
pass ATTR_ADDR_EXPR to build_unary_op for 'Unrestricted_Access.
gcc/ada/gcc-interface/trans.cc