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