aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-23 12:21:23 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-23 12:21:23 +0200
commit1d57c04fd72d5ab77242be1877aec05d2674c467 (patch)
treea82de8e522d4d4bab28350616d6c574da4a01f9b /gcc/ada/sem_res.adb
parentb91fccb300b34982baaf684c25d4d973df16fb4f (diff)
downloadgcc-1d57c04fd72d5ab77242be1877aec05d2674c467.zip
gcc-1d57c04fd72d5ab77242be1877aec05d2674c467.tar.gz
gcc-1d57c04fd72d5ab77242be1877aec05d2674c467.tar.bz2
[multiple changes]
2010-06-23 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Check_Constant_Address_Clauses): Do not check legality of address clauses if if Ignore_Rep_Clauses is active. * freeze.adb (Check_Address_Clause): If Ignore_Rep_Clauses is active, remove address clause from tree so that it does not reach the backend. 2010-06-23 Arnaud Charlet <charlet@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]): Do not expand 'Valid from user code in CodePeer mode, will be handled by the back-end directly. 2010-06-23 Bob Duff <duff@adacore.com> * g-comlin.ads: Minor comment improvements. 2010-06-23 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Uses_SS): The expression that initializes a controlled component of a record type may be a user-defined operator that is rewritten as a function call. From-SVN: r161271
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 9a60898..92ae30f 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -906,10 +906,12 @@ package body Sem_Res is
Expr := Original_Node (Expression (Parent (Comp)));
-- Return True if the expression is a call to a function
- -- (including an attribute function such as Image) with
- -- a result that requires a transient scope.
+ -- (including an attribute function such as Image, or a
+ -- user-defined operator) with a result that requires a
+ -- transient scope.
if (Nkind (Expr) = N_Function_Call
+ or else Nkind (Expr) in N_Op
or else (Nkind (Expr) = N_Attribute_Reference
and then Present (Expressions (Expr))))
and then Requires_Transient_Scope (Etype (Expr))