From 96769d3294ec0e7f78e6f4e79b308bc249cef86a Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 18 Jun 2011 10:31:26 +0000 Subject: [PATCH] trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP on a dereference built for a by-ref object if... * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP on a dereference built for a by-ref object if it has an address clause. From-SVN: r175172 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/trans.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b3db7a928c3..fdba3c4ea1e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2011-06-18 Eric Botcazou + + * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP + on a dereference built for a by-ref object if it has an address clause. + 2011-06-18 Eric Botcazou * einfo.ads (Address_Taken): Document use for the second argument of diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 8e949a89edc..bf533bdf332 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -1018,7 +1018,8 @@ Identifier_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p) else { gnu_result = build_unary_op (INDIRECT_REF, NULL_TREE, gnu_result); - if (TREE_CODE (gnu_result) == INDIRECT_REF) + if (TREE_CODE (gnu_result) == INDIRECT_REF + && No (Address_Clause (gnat_temp))) TREE_THIS_NOTRAP (gnu_result) = 1; } -- 2.30.2