aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2014-02-18 11:54:13 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-02-18 12:54:13 +0100
commit3b821fe9fe8ba49149509f4f7bea6353602ad2d2 (patch)
tree4e0107cf89a93d0afab569966fac89f25c24b435 /gcc
parent365c849669a60a5b940ff12df8dcb7ac2868d921 (diff)
downloadgcc-3b821fe9fe8ba49149509f4f7bea6353602ad2d2.zip
gcc-3b821fe9fe8ba49149509f4f7bea6353602ad2d2.tar.gz
gcc-3b821fe9fe8ba49149509f4f7bea6353602ad2d2.tar.bz2
sem_aux.adb (Is_By_Reference_Type): For each components of a record type...
2014-02-18 Vincent Celier <celier@adacore.com> * sem_aux.adb (Is_By_Reference_Type): For each components of a record type, check also if the component is volatile as it may have an aspect that makes it volatile. If it is, then the record type is a by reference type. From-SVN: r207842
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/sem_aux.adb7
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 4f710514..aed187c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2014-02-18 Vincent Celier <celier@adacore.com>
+
+ * sem_aux.adb (Is_By_Reference_Type): For each components of
+ a record type, check also if the component is volatile as it
+ may have an aspect that makes it volatile. If it is, then the
+ record type is a by reference type.
+
2014-02-18 Robert Dewar <dewar@adacore.com>
* exp_attr.adb: Minor reformatting.
diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb
index 9aa7f4c..dbe676d 100644
--- a/gcc/ada/sem_aux.adb
+++ b/gcc/ada/sem_aux.adb
@@ -782,8 +782,15 @@ package body Sem_Aux is
begin
C := First_Component (Btype);
while Present (C) loop
+
+ -- For each component, test if its type is a by reference
+ -- type and if its type is volatile. Also test the component
+ -- itself for being volatile. This happens for example when
+ -- a Volatile aspect is added to a component.
+
if Is_By_Reference_Type (Etype (C))
or else Is_Volatile (Etype (C))
+ or else Is_Volatile (C)
then
return True;
end if;