summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_aggr.adb
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-17 06:29:06 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-17 06:29:06 +0000
commitcc5193bb7e518249b7ed62c484802e719f69fd6d (patch)
tree795c51eddeeb744cf93dae3fd38f448824cdc93b /gcc/ada/sem_aggr.adb
parentd98b2a2eca4f4e0f1baff4a64be2c0b677f9d191 (diff)
downloadgcc-cc5193bb7e518249b7ed62c484802e719f69fd6d.tar.gz
2011-10-17 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 180071 using svnmerge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@180075 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r--gcc/ada/sem_aggr.adb13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index f4d2ad8a0a5..011a444cf0d 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -1675,8 +1675,12 @@ package body Sem_Aggr is
-- unless the expression covers a single component, or the
-- expander is inactive.
+ -- In Alfa mode, expressions that can perform side-effects will be
+ -- recognized by the gnat2why back-end, and the whole subprogram
+ -- will be ignored. So semantic analysis can be performed safely.
+
if Single_Elmt
- or else not Expander_Active
+ or else not Full_Expander_Active
or else In_Spec_Expression
then
Analyze_And_Resolve (Expr, Component_Typ);
@@ -3121,6 +3125,13 @@ package body Sem_Aggr is
Expr := New_Copy_Tree (Expression (Parent (Compon)));
+ -- Component may have no default, in which case the
+ -- expression is empty and the component is default-
+ -- initialized, but an association for the component
+ -- exists, and it is not covered by an others clause.
+
+ return Expr;
+
else
if Present (Next (Selector_Name)) then
Expr := New_Copy_Tree (Expression (Assoc));