summaryrefslogtreecommitdiffstats
path: root/gcc/ada/freeze.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-29 11:12:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-29 11:12:17 +0000
commit53c179ea5916bba5222b8f1c26c676ec7a7eef94 (patch)
tree814b7943f7ccb8cd2729a81e53f68f45e54ea661 /gcc/ada/freeze.adb
parentb0bc40fdc42f6914baeeee0c860fcd6bd0197cfa (diff)
downloadppe42-gcc-53c179ea5916bba5222b8f1c26c676ec7a7eef94.tar.gz
ppe42-gcc-53c179ea5916bba5222b8f1c26c676ec7a7eef94.zip
2011-08-29 Robert Dewar <dewar@adacore.com>
* a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting. 2011-08-29 Bob Duff <duff@adacore.com> * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case of <>, because this is the routine that checks for dimensionality errors (for example, for a two-dimensional array, (others => <>) should be (others => (others => <>)). 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com> * impunit.adb: Add new run-time units. * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb, s-stposu.ads, s-stposu.adb: Code clean up. Handle protected class-wide or task class-wide types Handle C/C++/CIL/Java types. * s-spsufi.adb, s-spsufi.ads: New files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r--gcc/ada/freeze.adb27
1 files changed, 12 insertions, 15 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 0d3c1312538..3917aa40aa1 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -1439,27 +1439,24 @@ package body Freeze is
end loop;
end;
- -- We add finalization collections to access types whose designated
- -- types require finalization. This is normally done when freezing
- -- the type, but this misses recursive type definitions where the
- -- later members of the recursion introduce controlled components
- -- (such as can happen when incomplete types are involved), as well
- -- cases where a component type is private and the controlled full
- -- type occurs after the access type is frozen. Cases that don't
- -- need a finalization collection are generic formal types (the
- -- actual type will have it) and types with Java and CIL conventions,
- -- since those are used for API bindings. (Are there any other cases
- -- that should be excluded here???)
+ -- We add finalization masters to access types whose designated types
+ -- require finalization. This is normally done when freezing the
+ -- type, but this misses recursive type definitions where the later
+ -- members of the recursion introduce controlled components (such as
+ -- can happen when incomplete types are involved), as well cases
+ -- where a component type is private and the controlled full type
+ -- occurs after the access type is frozen. Cases that don't need a
+ -- finalization master are generic formal types (the actual type will
+ -- have it) and types with Java and CIL conventions, since those are
+ -- used for API bindings. (Are there any other cases that should be
+ -- excluded here???)
elsif Is_Access_Type (E)
and then Comes_From_Source (E)
and then not Is_Generic_Type (E)
and then Needs_Finalization (Designated_Type (E))
- and then No (Associated_Collection (E))
- and then Convention (Designated_Type (E)) /= Convention_Java
- and then Convention (Designated_Type (E)) /= Convention_CIL
then
- Build_Finalization_Collection (E);
+ Build_Finalization_Master (E);
end if;
Next_Entity (E);
OpenPOWER on IntegriCloud