aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-12-08 04:58:14 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-08 05:01:44 +0100
commit5e59616b942a5aeecca59c54142763aa0e61a3e3 (patch)
treeeeddbde7a0b8fe930512ae14e1d2fc1afdc3704e /src/vhdl
parent1d169d43dac7840f413a98265ac3a2324c9fb76c (diff)
downloadghdl-5e59616b942a5aeecca59c54142763aa0e61a3e3.tar.gz
ghdl-5e59616b942a5aeecca59c54142763aa0e61a3e3.tar.bz2
ghdl-5e59616b942a5aeecca59c54142763aa0e61a3e3.zip
sem_assocs.Extract_Non_Object_Association: fix when multiple assocs.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/sem_assocs.adb11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb
index f8620182c..968ad8a28 100644
--- a/src/vhdl/sem_assocs.adb
+++ b/src/vhdl/sem_assocs.adb
@@ -111,18 +111,20 @@ package body Sem_Assocs is
Res := Null_Iir;
-- Common case: only objects in interfaces.
- while Inter /= Null_Iir loop
+ while Is_Valid (Inter) loop
exit when Get_Kind (Inter)
not in Iir_Kinds_Interface_Object_Declaration;
Inter := Get_Chain (Inter);
end loop;
- if Inter = Null_Iir then
+ if Is_Null (Inter) then
+ -- Only interface object, nothing to to.
return Assoc_Chain;
end if;
+ Inter := Inter_Chain;
loop
-- Don't try to detect errors.
- if Assoc = Null_Iir then
+ if Is_Null (Assoc) then
return Res;
end if;
@@ -162,6 +164,9 @@ package body Sem_Assocs is
end if;
Prev_Assoc := Assoc;
Assoc := Get_Chain (Assoc);
+ if Is_Valid (Inter) then
+ Inter := Get_Chain (Inter);
+ end if;
end loop;
end Extract_Non_Object_Association;