OSDN Git Service

* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
2
3         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
4         an alignment on fields of the RETURN type built for the CICO mechanism.
5
6 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
7
8         * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
9         a call to a function that returns an unconstrained type with default
10         discriminant.  Similarly, avoid doing the conversion to the nominal
11         result type in this case.
12
13 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
14
15         * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
16         * gcc-interface/decl.c (is_variable_size): Rename to...
17         (type_has_variable_size): ...this.
18         (adjust_packed): Adjust to above renaming.
19         (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
20         (field_is_artificial): New predicate.
21         (field_is_aliased): Likewise.
22         (field_has_self_size): Likewise.
23         (field_has_variable_size): Likewise.
24         (components_to_record): Record information for the final layout during
25         the first pass on fields.
26         If there is an aliased field placed after a field whose length depends
27         on discriminants, put all the fields of the latter sort, last.
28
29 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
30
31         * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
32         * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
33         * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
34         Access-like attribute in a dispatch table if the subprogram is public.
35
36 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
37
38         * gcc-interface/gigi.h (create_label_decl): Adjust.
39         * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
40         and invoke gnat_pushdecl on it.  Remove obsolete settings.
41         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
42         create_label_decl.
43         * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise.  Ignore the
44         label for debugging purposes.
45
46 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
47
48         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
49         object with an unconstrained nominal subtype and if optimization isn't
50         enabled, create a special VAR_DECL for debugging purposes.
51
52 2012-01-23  Robert Dewar  <dewar@adacore.com>
53
54         * sem_prag.ads, sem_prag.adb: Minor reformatting.
55
56 2012-01-23  Robert Dewar  <dewar@adacore.com>
57
58         * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
59         language defined aspect applied to renaming or formal type
60         declaration (not permitted)
61
62 2012-01-23  Matthew Heaney  <heaney@adacore.com>
63
64         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
65         comment with pragma Assert.
66
67 2012-01-23  Vincent Pucci  <pucci@adacore.com>
68
69         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
70         to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
71         * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
72         routine. In ASIS mode, convert any PPC pragmas into aspects in generic
73         subprogram declaration in order to enable the analysis of PPC boolean
74         expressions.
75
76 2012-01-23  Robert Dewar  <dewar@adacore.com>
77
78         * sem_ch3.adb (Analyze_Object_Declaration): Properly
79         handle Current_Value for volatile variables (also propagate
80         Treat_As_Volatile from type to object).
81
82 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
83
84         * sem_ch12.adb (Install_Body): Detect the case
85         where the enclosing context is a package with a stub body that
86         has already been replaced by the actual body. In such cases,
87         the freeze node for the enclosing context must be inserted after
88         the real body.
89
90 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
91
92         * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
93         subprogram before expanding the pragma into an if-statement with
94         a block, to ensure that when the subprogram is null its body is
95         properly generated before expansion.
96
97 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
98
99         * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
100         constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
101         to Saved_Formal.
102         Freeze all eligible subprograms which appear as actuals in
103         the instantiation.
104         (Has_Fully_Defined_Profile): New routine.
105         (Renames_Standard_Subprogram): New routine.
106         (Earlier): Add local variable N. Comment update. Do not use source
107         locations when trying to determine whether one node precedes another.
108
109 2012-01-23  Gary Dismukes  <dismukes@adacore.com>
110
111         * exp_ch4.adb (Expand_Concatenate): In the case
112         where the result of a concatentation can be null, set the to
113         result have both the low and high bounds of the right operand (not
114         just the high bound, as was the case prior to this fix). Also,
115         fix the saved high bound setting (Last_Opnd_High_Bound) in the
116         empty string literal case (should have been low bound minus one,
117         rather than plus one).
118
119 2012-01-23  Thomas Quinot  <quinot@adacore.com>
120
121         * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
122         omit statement SCOs for disabled pragmas.
123
124 2012-01-23  Matthew Heaney  <heaney@adacore.com>
125
126         * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
127         a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
128         a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
129         a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
130         Cursor'Write): Declare in private part.
131         (Reference_Type'Read, Reference_Type'Write): Ditto.
132         (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
133
134 2012-01-23  Robert Dewar  <dewar@adacore.com>
135
136         * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
137         reformatting.
138
139 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
140
141         * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
142         Corresponding_Body on a defaulted null formal subprogram.
143         * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
144         on a defaulted formal subprogram that is a null procedure.
145
146 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
147
148         * exp_ch9.adb: Update the comments involving pragma Implemented.
149         * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
150         constant Subp_Alias and local variable Impl_Subp. Properly
151         handle aliases of synchronized wrappers. Code cleanup.
152         (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
153         Name_Optional as part of the condition.
154         * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
155         valid choices of implementation kind.
156         (Check_Arg_Is_One_Of): New routine.
157         * snames.ads-tmlp: Add Name_Optional.
158
159 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
160
161         * par-ch13.adb: Better error recovery in illegal aspect
162         specification.
163
164 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
165
166         * a-calend.adb: Add with clause for Interfaces.C. Add constant
167         Unix_Max.
168         (Day_Of_Week): Call the internal UTC_Time_Offset.
169         (Split): Call the internal UTC_Time_Offset.
170         (Time_Of): Call the internal UTC_Time_Offset.
171         (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
172         (UTC_Time_Offset): New library-level routine.
173         * a-calend.ads (UTC_Time_Offset): Remove parameter
174         Is_Historic. Update related comment on usage.
175         * a-catizo.adb (UTC_Time_Offset): Removed.
176         (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
177         * a-caltizo.ads (UTC_Time_Offset): Removed.
178         (UTC_Time_Offset (Time)): Add back the default expression of parameter
179         Date.
180
181 2012-01-23  Robert Dewar  <dewar@adacore.com>
182
183         * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
184         (pg,po,ps): Make sure each entry starts on new line.
185
186 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
187
188         * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
189         the parameter profile of procedure localtime_tzoff and its associated
190         comment.
191         (Day_Of_Week): Do not treat the input date as historical
192         with respect to time zones.
193         (Split): Do not treat the input
194         date as historical with respect to time zones.  (Time_Of): Do
195         not treat the input constituents as forming a historical date
196         with respect to time zones.
197         (UTC_Time_Offset): Add new formal
198         parameter Is_Historic. Add local variable Flag. Update the call
199         to localtime_tzoff.
200         * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
201         (UTC_Time_Offset (Time)): Update the call to
202         Time_Zone_Operations.UTC_Time_Offset.
203         * sysdep.c (__gnat_localtime_tzoff): Update parameter
204         profile. Split the processing of offsets on Windows into two - one
205         part of historic time stamps and the other for the current time.
206
207 2012-01-23  Robert Dewar  <dewar@adacore.com>
208
209         * a-calend.adb: Minor reformatting.
210
211 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
212
213         * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
214         interface in requeue statement.
215
216 2012-01-23  Cyrille Comar  <comar@adacore.com>
217
218         * projects.texi: Remove references to main units and replace
219         with references to main programs to be coherent with the
220         documentation.
221
222 2012-01-23  Robert Dewar  <dewar@adacore.com>
223
224         * s-utf_32.adb: Minor reformatting.
225
226 2012-01-23  Vincent Celier  <celier@adacore.com>
227
228         * snames.ads-tmpl: Minor comment addition Indicate that
229         Name_Library_Encapsulated_Options is only used in gprbuild.
230
231 2012-01-23  Robert Dewar  <dewar@adacore.com>
232
233         * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
234         restrictions.
235
236 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
237
238         * snames.ads-tmpl: Add Name_Synchronization.
239         * aspects.ads, aspects.adb: Add Aspect_Synchronization to
240         enumeration type and related maps.
241         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
242         Synchronization, build corresponding pragma Implemented.
243         * sem_util.adb (Implementation_Kind): Handle both explicit and
244         implicit pragma_argument association to retrieve the given
245         synchronization mode.
246
247 2012-01-23  Robert Dewar  <dewar@adacore.com>
248
249         * sem_ch10.adb, errout.adb: Minor reformatting.
250
251 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
252
253         * sem_res.adb (Resolve_Actuals): An actual in a call to an
254         Ada 2012 Reference function does not lead to a dangerous order
255         dependence.
256
257 2012-01-23  Gary Dismukes  <dismukes@adacore.com>
258
259         * exp_util.adb (Is_Iterated_Container): Test
260         Is_Entity_Name when searching for calls to the default iterator,
261         to avoid blowing up on indirect calls which have an explicit
262         dereference as the call name.
263
264 2012-01-23  Thomas Quinot  <quinot@adacore.com>
265
266         * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
267         the complete expanded name, rather than just its Selector_Name.
268
269 2012-01-23  Thomas Quinot  <quinot@adacore.com>
270
271         * a-textio.adb (Put): Rewrite one-parameter Character version to
272         just call the two-parameter one with Current_Out.
273
274 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
275
276         * freeze.adb (Check_Current_Instance): Issue an
277         error when the prefix of 'Unchecked_Access or 'Access does not
278         denote a legal aliased view of a type.
279         (Freeze_Record_Type): Do not halt the processing of record components
280         once the Has_Controlled_Component is set as this bypasses the remaining
281         checks.
282         (Is_Aliased_View_Of_Type): New routine.
283
284 2012-01-23  Thomas Quinot  <quinot@adacore.com>
285
286         * errout.ads, freeze.adb: Minor reformatting.
287
288 2012-01-23  Thomas Quinot  <quinot@adacore.com>
289
290         * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
291         messages.
292
293 2012-01-23  Olivier Hainque  <hainque@adacore.com>
294
295         * adadecode.c (__gnat_decode): Deal with empty input early,
296         preventing potential erroneous memory access later on.
297
298 2012-01-21  Eric Botcazou  <ebotcazou@adacore.com>
299
300         PR ada/46192
301         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
302         renaming, preserve the volatileness through the indirection, if any.
303
304 2012-01-14  Andreas Schwab  <schwab@linux-m68k.org>
305
306         * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
307         $(GNATLIBCFLAGS).
308
309 2012-01-10  Pascal Obry  <obry@adacore.com>
310
311         * prj-nmsc.adb (Check_Library_Attributes):
312         Kill check for object/source directories for aggregate libraries.
313
314 2012-01-10  Matthew Heaney  <heaney@adacore.com>
315
316         * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
317         a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
318         a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
319         a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
320         a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
321         a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
322         a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
323         a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
324         a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
325         container parameter as aliased in/in out.
326         Code clean ups.
327
328 2012-01-10  Bob Duff  <duff@adacore.com>
329
330         * s-os_lib.ads: Improve comment.
331
332 2012-01-10  Geert Bosch  <bosch@adacore.com>
333
334         * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
335         for complex Scalar.
336
337 2012-01-10  Bob Duff  <duff@adacore.com>
338
339         * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
340         checking that the 'Size is correct. If the type is "mod 2**12",
341         for example, it's illegal, but Esize is the 'Object_Size, which
342         will be something like 16 or 32, so the error ('Size = 12) was
343         not detected.
344         * gnat_rm.texi: Improve documentation of shift
345         and rotate intrinsics.
346
347 2012-01-10  Pascal Obry  <obry@adacore.com>
348
349         * prj.adb (For_Every_Project_Imported): Fix
350         implementation to make sure we return each project only once
351         for aggragte libraries. It is fine to return a project twice for
352         aggregate projects, this was the case as a Project_Id is different
353         in each project tree. The new implementation use a table based on
354         the project name to ensure proper detection of duplicate project
355         in aggregate library. A new context is then created to continue
356         retrurning duplicate project for aggregate libraries.
357
358 2012-01-09  Eric Botcazou  <ebotcazou@adacore.com>
359
360         * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
361         return value in the variable-sized return type case if the target is
362         an array with fixed size.  However, do not create it if this is the
363         expression of an object declaration.
364
365 2012-01-09  Eric Botcazou  <ebotcazou@adacore.com>
366
367         * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
368
369 2012-01-06  Robert Dewar  <dewar@adacore.com>
370
371         * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
372         s-utf_32.ads: Add pragma Pure
373         * s-utf_32.adb: Suppress warnings on non-static constants (now
374         that this is Pure).
375
376 2012-01-06  Bob Duff  <duff@adacore.com>
377
378         * s-rpc.ads (Read, Write): Add overriding indicators.
379
380 2012-01-06  Robert Dewar  <dewar@adacore.com>
381
382         * gnat_rm.texi: Add documentation for conventions
383         Ada_Pass_By_Copy and Ada_Pass_By_Reference.
384
385 2012-01-06  Gary Dismukes  <dismukes@adacore.com>
386
387         * a-tienio.adb (Put): Add exception message on
388         raise statements. Remove unneeded blocks and object declarations.
389
390 2012-01-06  Robert Dewar  <dewar@adacore.com>
391
392         * sem_prag.adb: Minor reformatting.
393
394 2012-01-06  Ed Schonberg  <schonberg@adacore.com>
395
396         * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
397         that a selected component within a generic unit has been resolved
398         as a prefixed call with local references.
399         * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
400         component is always visible.
401         * sem_ch4.adb (Analyze_Selected_Component): If the node is a
402         prefixed call in an instance, do not look for visible components
403         of the type.
404         * sem_ch12.adb (Reset_Entity): If a selected component has resolved
405         to a prefixed call, mark the node accordingly when prefix and
406         selector are local references.
407
408 2012-01-02  Eric Botcazou  <ebotcazou@adacore.com>
409
410         * gnatvsn.ads (Current_Year): Bump to 2012.
411 \f
412 Copyright (C) 2012 Free Software Foundation, Inc.
413
414 Copying and distribution of this file, with or without modification,
415 are permitted in any medium without royalty provided the copyright
416 notice and this notice are preserved.