1 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/gigi.h (standard_datatypes): Add ADT_parent_name_id.
4 (parent_name_id): New macro.
5 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use it.
6 * gcc-interface/trans.c (gigi): Initialize it.
7 (lvalue_required_p) <N_Type_Conversion>: New case.
8 <N_Qualified_Expression>: Likewise.
9 <N_Allocator>: Likewise.
10 * gcc-interface/utils.c (convert): Try to properly upcast tagged types.
12 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
14 * gcc-interface/ada-tree.h (TYPE_BY_REFERENCE_P): Delete.
15 (DECL_CONST_ADDRESS_P): New macro.
16 (SET_DECL_ORIGINAL_FIELD_TO_FIELD): Likewise.
17 (SAME_FIELD_P): Likewise.
18 * gcc-interface/decl.c (constructor_address_p): New static function.
19 (gnat_to_gnu_entity) <object>: Set DECL_CONST_ADDRESS_P according to
20 the return value of above function.
21 (gnat_to_gnu_entity) <E_Record_Type>: Force BLKmode for all types
23 <E_Record_Subtype>: Likewise.
24 Set TREE_ADDRESSABLE on the type if it passed by reference.
25 (make_packable_type): Use SET_DECL_ORIGINAL_FIELD_TO_FIELD.
26 (create_field_decl_from): Likewise.
27 (substitute_in_type): Likewise.
28 (purpose_member_field): Use SAME_FIELD_P.
29 * gcc-interface/misc.c (must_pass_by_ref): Test TREE_ADDRESSABLE.
30 * gcc-interface/trans.c (lvalue_required_p): Add ADDRESS_OF_CONSTANT
31 parameter and adjust recursive calls.
32 <N_Explicit_Dereference>: New case.
33 <N_Object_Declaration>: Return 1 if the object is of a class-wide type.
34 Adjust calls to lvalue_required_p. Do not return the initializer of a
35 DECL_CONST_ADDRESS_P constant if an lvalue is required for it.
36 (call_to_gnu): Delay issuing error message for a misaligned actual and
37 avoid the associated back-end assertion. Test TREE_ADDRESSABLE.
38 (gnat_gimplify_expr) <ADDR_EXPR>: Handle non-static constructors.
39 * gcc-interface/utils.c (make_dummy_type): Set TREE_ADDRESSABLE if the
40 type is passed by reference.
41 (convert) <CONSTRUCTOR>: Convert in-place in more cases.
42 * gcc-interface/utils2.c (build_cond_expr): Drop TYPE_BY_REFERENCE_P.
43 (build_simple_component_ref): Use SAME_FIELD_P.
45 2010-04-12 Eric Botcazou <ebotcazou@adacore.com>
47 * gcc-interface/trans.c (Identifier_to_gnu): Use boolean variable.
48 (call_to_gnu): Test gigi's flag TYPE_BY_REFERENCE_P instead of calling
49 front-end's predicate Is_By_Reference_Type. Use consistent order and
50 remove ??? comment. Use original conversion in all cases, if any.
51 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
52 (convert): Use local copy in more cases.
53 <INDIRECT_REF>: Remove deactivated code.
54 (unchecked_convert): Use a couple of local copies.
56 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
58 * gcc-interface/trans.c (lvalue_required_for_attribute_p): New static
60 (lvalue_required_p) <N_Attribute_Reference>: Call it.
61 (gnat_to_gnu) <N_Selected_Component>: Prevent build_component_ref from
62 folding the result only if lvalue_required_for_attribute_p is true.
63 * gcc-interface/utils.c (maybe_unconstrained_array): Pass correctly
64 typed constant to build_component_ref.
65 (unchecked_convert): Likewise.
66 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
67 (build_allocator): Likewise.
69 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
71 * gcc-interface/utils2.c (build_cond_expr): Take the address and
72 dereference if the result type is passed by reference.
74 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
76 * gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
77 (gnat_to_gnu) <N_Null_Statement>: When not optimizing, generate a
78 goto to the next statement.
80 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
82 * gcc-interface/gigi.h (maybe_variable): Delete.
83 (protect_multiple_eval): Likewise.
84 (maybe_stabilize_reference): Likewise.
85 (gnat_save_expr): Declare.
86 (gnat_protect_expr): Likewise.
87 (gnat_stabilize_reference): Likewise.
88 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use
89 gnat_stabilize_reference.
90 (maybe_variable): Delete.
91 (elaborate_expression_1): Use gnat_save_expr.
92 * gcc-interface/trans.c (Attribute_to_gnu): Use gnat_protect_expr.
93 (call_to_gnu): Pass NULL to gnat_stabilize_reference.
94 (gnat_to_gnu) <N_Object_Declaration>: Use gnat_save_expr.
95 <N_Slice>: Use gnat_protect_exp.
96 <N_Selected_Component>: Pass NULL to gnat_stabilize_reference.
97 <N_In>: Use gnat_protect_expr.
98 Pass NULL to gnat_stabilize_reference.
99 (build_unary_op_trapv): Use gnat_protect_expr.
100 (build_binary_op_trapv): Likewise.
101 (emit_range_check): Likewise.
102 (emit_index_check): Likewise.
103 (convert_with_check): Likewise.
104 (protect_multiple_eval): Move to utils2.c file.
105 (maybe_stabilize_reference): Merge into...
106 (gnat_stabilize_reference): ...this. Move to utils2.c file.
107 (gnat_stabilize_reference_1): Likewise.
108 * gcc-interface/utils.c (convert_to_fat_pointer): Use gnat_protect_expr
109 instead of protect_multiple_eval.
110 * gcc-interface/utils2.c (compare_arrays): Likewise.
111 (nonbinary_modular_operation): Likewise.
112 (maybe_wrap_malloc): Likewise.
113 (build_allocator): Likewise.
114 (gnat_save_expr): New function.
115 (gnat_protect_expr): Rename from protect_multiple_eval. Early return
116 in common cases. Propagate TREE_READONLY onto dereferences.
117 (gnat_stabilize_reference_1): Move from trans.c file.
118 (gnat_stabilize_reference): Likewise.
120 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
122 * gcc-interface/gigi.h (gnat_mark_addressable): Rename parameter.
123 * gcc-interface/decl.c (maybe_variable): Do not set TREE_STATIC on _REF
124 node. Use the type of the operand to set TREE_READONLY.
125 * gcc-interface/trans.c (Identifier_to_gnu): Do not set TREE_STATIC on
126 _REF node. Do not overwrite TREE_READONLY.
127 (call_to_gnu): Rename local variable and fix various nits. In the
128 copy-in/copy-out case, build the SAVE_EXPR manually.
129 (convert_with_check): Call protect_multiple_eval in lieu of save_expr
130 and fold the computations.
131 (protect_multiple_eval): Always save entire fat pointers.
132 (maybe_stabilize_reference): Minor tweaks.
133 (gnat_stabilize_reference_1): Likewise. Do not deal with tcc_constant,
134 tcc_type and tcc_statement.
135 * gcc-interface/utils.c (convert_to_fat_pointer): Call
136 protect_multiple_eval in lieu of save_expr.
137 (convert): Minor tweaks.
138 (maybe_unconstrained_array): Do not set TREE_STATIC on _REF node.
139 (builtin_type_for_size): Call gnat_type_for_size directly.
140 * gcc-interface/utils2.c (contains_save_expr_p): Delete.
141 (contains_null_expr): Likewise
142 (gnat_build_constructor): Do not call it.
143 (compare_arrays): Deal with all side-effects, use protect_multiple_eval
144 instead of gnat_stabilize_reference to protect the operands.
145 (nonbinary_modular_operation): Call protect_multiple_eval in lieu of
147 (maybe_wrap_malloc): Likewise.
148 (build_allocator): Likewise.
149 (build_unary_op) <INDIRECT_REF>: Do not set TREE_STATIC on _REF node.
150 (gnat_mark_addressable): Rename parameter.
152 2010-04-08 Eric Botcazou <ebotcazou@adacore.com>
154 * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
155 (TYPE_RETURN_UNCONSTRAINED_P): ...this.
156 (TYPE_RETURNS_BY_REF_P): Rename into.
157 (TYPE_RETURN_BY_DIRECT_REF_P): ...this.
158 (TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
159 * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
160 (build_return_expr): Likewise.
161 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
162 Rename local variables. If the return Mechanism is By_Reference, pass
163 return_by_invisible_ref_p to create_subprog_type instead of toggling
164 TREE_ADDRESSABLE. Test return_by_invisible_ref_p in order to annotate
165 the mechanism. Use regular return for contrained types with non-static
166 size and return by invisible reference for unconstrained return types
167 with default discriminants. Update comment.
168 * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
169 returns by invisible reference, turn the RESULT_DECL into a pointer.
170 Do not handle DECL_BY_REF_P in the CICO case here.
171 (call_to_gnu): Remove code handling return by target pointer. For a
172 function call, if the return type has non-constant size, generate the
173 assignment with an INIT_EXPR.
174 (gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
175 If the function returns by invisible reference, build the copy return
177 (add_decl_expr): Initialize the variable with an INIT_EXPR.
178 * gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
179 Adjust for renaming of macros. Copy the node only when necessary.
180 (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
181 type, only change DECL_BY_REFERENCE on the RETURN_DECL.
182 (convert_from_reference): Delete.
183 (is_byref_result): Likewise.
184 (gnat_genericize_r): Likewise.
185 (gnat_genericize): Likewise.
186 (end_subprog_body): Do not call gnat_genericize.
187 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
188 (build_return_expr): Adjust parameter names, logic and comment.
190 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
192 * exp_pakd.adb (Create_Packed_Array_Type): Always use a modular type
193 if the size is small enough. Propagate the alignment if there is an
194 alignment clause on the original array type.
195 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
196 Deal with under-aligned packed array types. Copy the size onto the
197 justified modular type and don't lay it out again. Likewise for the
198 padding type built for other under-aligned subtypes.
199 * gcc-interface/utils.c (finish_record_type): Do not set a default mode
202 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
204 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
205 alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
207 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
209 * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
210 do not set the result type if there is a specified target and do not
211 convert the result in any cases.
212 (protect_multiple_eval): Make direct SAVE_EXPR for CALL_EXPR.
213 (maybe_stabilize_reference) <COMPOUND_EXPR>: Merge with CALL_EXPR.
215 2010-03-10 Eric Botcazou <ebotcazou@adacore.com>
217 * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
219 2010-02-27 Eric Botcazou <ebotcazou@adacore.com>
222 * gcc-interface/utils2.c (build_binary_op) <EQ_EXPR>: Assert that fat
223 pointer base types are variant of each other. Apply special treatment
224 for null to fat pointer types in all cases.
226 2010-01-28 Pascal Obry <obry@adacore.com>
228 * s-win32.ads: Add some missing constants.
230 2010-01-28 Vincent Celier <celier@adacore.com>
232 * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
235 2010-01-28 Robert Dewar <dewar@adacore.com>
237 * gnat_rm.texi: Minor correction
239 2010-01-27 Pascal Obry <obry@adacore.com>
241 * g-awk.adb: ensure that an AWK session is reusable.
243 2010-01-27 Vasiliy Fofanov <fofanov@adacore.com>
245 * g-regist.adb (For_Every_Key): Fix previous change.
248 2010-01-27 Thomas Quinot <quinot@adacore.com>
250 * lib-writ.ads: Current version of spec for new N (note) ALI lines
252 2010-01-27 Yannick Moy <moy@adacore.com>
254 * a-cdlili.adb (Insert): Correct exception message when cursor
255 designates wrong list.
257 2010-01-27 Vincent Celier <celier@adacore.com>
259 * gnatcmd.adb: When there is only one main specified, the package
260 support Switches (<main>) and attribute Switches is specified for the
261 main, use these switches, instead of Default_Switches ("Ada").
263 2010-01-27 Robert Dewar <dewar@adacore.com>
265 * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
267 * exp_disp.adb: Minor reformatting
269 2010-01-27 Tristan Gingold <gingold@adacore.com>
271 * seh_init.c: Use __ImageBase instead of _ImageBase.
273 2010-01-27 Javier Miranda <miranda@adacore.com>
275 * exp_disp.ads, exp_disp.adb (Expand_Interface_Thunk): Modify the
276 profile of interface thunks. The type of the controlling formal is now
277 the covered interface type (instead of the target tagged type).
279 2010-01-27 Sergey Rybin <rybin@adacore.com>
281 * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
283 2010-01-27 Robert Dewar <dewar@adacore.com>
285 * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
286 changed from Expr to N.
288 2010-01-26 Thomas Quinot <quinot@adacore.com>
290 * gnat_ugn.texi: Adjust documentation of -gnatz switches.
291 * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
294 2010-01-26 Vincent Celier <celier@adacore.com>
296 * prj-attr.adb: Add new attribute Library_Install_Name_Option
297 Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
298 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
299 attributes Run_Path_Option and Library_Install_Name_Option.
300 * prj.ads (Project_Configuration): Replace component
301 Run_Path_Origin_Supported with component Run_Path_Origin. Add new
302 component Library_Install_Name_Option.
303 * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
304 Replace Run_Path_Origin_Supported with Run_Path_Origin
306 2010-01-26 Ed Schonberg <schonberg@adacore.com>
308 * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
309 is not hidden by a homograph declared in another actual package.
311 2010-01-26 Robert Dewar <dewar@adacore.com>
313 * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
314 decisions for pragmas Assert, Check, Precondition, Postcondition if
316 * scos.ads: Update comments.
317 * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs.
318 Also remove obsolete code for CT (exit point) SCOs.
320 2010-01-26 Thomas Quinot <quinot@adacore.com>
322 * switch-c.adb: Fix handling of -gnatz*
324 2010-01-26 Robert Dewar <dewar@adacore.com>
326 * par_sco.adb (Traverse_Declarations_Or_Statements): Separate F/W
327 qualifiers for FOR/WHILE loops
328 * scos.ads: Use separate type letters F/W for for/while loops
330 2010-01-26 Robert Dewar <dewar@adacore.com>
332 * get_scos.adb (Get_SCOs): Implement new form of CS entries (multiple
333 entries per line, one for each statement in the sequence).
334 * par_sco.adb (Traverse_Declarations_Or_Statements): Increase array
335 size from 100 to 10_000 for SC_Array to avoid any real possibility of
336 overflow. Output decisions in for loops.
337 Exclude labels from CS lines.
338 * scos.ads: Clarify that label is not included in the entry point
340 2010-01-26 Robert Dewar <dewar@adacore.com>
342 * par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
343 format of statement sequence SCO entries (one location/statement).
344 * put_scos.adb (Put_SCOs): Implement new format of CS lines
345 * scos.ads: Update comments.
346 * sem_eval.adb: Minor reformatting.
348 2010-01-26 Robert Dewar <dewar@adacore.com>
350 * par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
351 (Extend_Statement_Sequence): New procedures
352 (Traverse_Declarations_Or_Statements): New handling for exits.
354 2010-01-26 Robert Dewar <dewar@adacore.com>
356 * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
359 2010-01-26 Robert Dewar <dewar@adacore.com>
361 * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
362 * scos.ads: Clarify handling of logical operators
364 2010-01-26 Arnaud Charlet <charlet@adacore.com>
366 * s-tpoben.adb: Update comments.
368 2010-01-26 Robert Dewar <dewar@adacore.com>
370 * freeze.adb (Set_Small_Size): Don't set size if alignment clause
373 2010-01-26 Robert Dewar <dewar@adacore.com>
375 * scos.ads: Clean up documentation, remove obsolete XOR references
376 2010-01-26 Vincent Celier <celier@adacore.com>
378 * gnat_ugn.texi: Complete documentation on the restrictions for
379 combined options in -gnatxxx switches.
382 2010-01-26 Arnaud Charlet <charlet@adacore.com>
384 * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
385 a controlled operation, abort is already deferred at this point, so we
386 need to use Defer_Abort_Nestable.
388 2010-01-26 Vincent Celier <celier@adacore.com>
390 * prj-conf.adb (Get_Config_Switches): Check for a default language for
391 a project extending a project with no languages.
393 2010-01-26 Vincent Celier <celier@adacore.com>
395 * switch-c.adb (Scan_Front_End_Switches): Take into account options
397 Allow -gnateG to be followed by other options.
399 2010-01-26 Robert Dewar <dewar@adacore.com>
401 * s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
402 s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
405 2010-01-26 Vasiliy Fofanov <fofanov@adacore.com>
407 * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
408 that allows to iterate over all subkeys of a key.
410 2010-01-26 Ed Falis <falis@adacore.com>
412 * sysdep.c: enable NFS for VxWorks MILS
413 * env.c: enable __gnat_environ for VxWorks MILS
414 * gcc-interface/Makefile.in: Add VxWorks MILS target pairs.
416 2010-01-25 Bob Duff <duff@adacore.com>
418 * sem_aggr.adb (Resolve_Array_Aggregate): Check for the case where this
419 is an internally-generated positional aggregate, and the bounds are
420 already correctly set. We don't want to overwrite those bounds with
421 bounds determined by context.
423 2010-01-25 Robert Dewar <dewar@adacore.com>
425 * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
426 exp_ch9.adb, g-sechas.ads: Minor reformatting.
428 2010-01-25 Thomas Quinot <quinot@adacore.com>
430 * s-commun.adb (Last_Index): Count must be converted to SEO (a signed
431 integer type) before subtracting 1, otherwise the computation may wrap
432 (because size_t is modular) and cause the conversion to fail.
434 2010-01-25 Ed Falis <falis@adacore.com>
436 * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
438 2010-01-25 Vincent Celier <celier@adacore.com>
440 * prj-attr.adb: New attribute Run_Path_Origin_Required
441 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process new
442 attribute Run_Path_Origin_Required.
443 * prj.ads (Project_Configuration): New component
444 Run_Path_Origin_Supported.
445 * snames.ads-tmpl: New standard name Run_Path_Origin_Required
447 2010-01-25 Ed Schonberg <schonberg@adacore.com>
449 * sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
450 have errors, do not continue resolution of the aggregate.
451 * sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
452 the array type indicates an error.
454 2010-01-25 Bob Duff <duff@adacore.com>
456 * sinfo.ads: Minor comment fixes.
458 2010-01-25 Bob Duff <duff@adacore.com>
460 * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
462 2010-01-25 Arnaud Charlet <charlet@adacore.com>
464 * gnatvsn.ads (Current_Year): Update.
466 2010-01-25 Florian Villoing <villoing@adacore.com>
468 * gnat_ugn.texi: Fix typo.
470 2010-01-25 Thomas Quinot <quinot@adacore.com>
472 * scos.ads: Update specification.
474 2010-01-25 Ed Schonberg <schonberg@adacore.com>
476 * sem_ch6.adb (Process_PPCs): If a postcondition is present and the
477 enclosing subprogram has no previous spec, attach postcondition
478 procedure to the defining entity for the body.
480 2010-01-25 Ed Schonberg <schonberg@adacore.com>
482 * exp_aggr.adb (Build_Record_Aggr_Code); Do not generate call to
483 initialization procedure of the ancestor part of an extension aggregate
484 if it is an interface type.
486 2010-01-25 Vincent Celier <celier@adacore.com>
488 * gnatlink.adb (Process_Binder_File): The directory for the shared
489 version of libgcc in the run path options is found in the subdirectory
490 indicated by __gnat_default_libgcc_subdir.
491 * link.c: Declare new const char * __gnat_default_libgcc_subdir for
494 2010-01-25 Ed Schonberg <schonberg@adacore.com>
496 * sem_prag.adb: More flexible pragma Annotate.
498 2010-01-22 Eric Botcazou <ebotcazou@adacore.com>
500 * system-linux-armel.ads (Stack_Check_Probes): Set to True.
501 * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
503 2010-01-18 Eric Botcazou <ebotcazou@adacore.com>
505 * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
507 2010-01-18 Jan Hubicka <jh@suse.cz>
510 * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
511 unit local variables.
513 2010-01-17 Laurent GUERBY <laurent@guerby.net>
515 * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
517 2010-01-11 Mikael Pettersson <mikpe@it.uu.se>
519 * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
520 * system-linux-armeb.ads, system-linux-armel.ads: New files.
522 2010-01-09 Simon Wright <simon@pushface.org>
525 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
530 Copyright (C) 2010 Free Software Foundation, Inc.
532 Copying and distribution of this file, with or without modification,
533 are permitted in any medium without royalty provided the copyright
534 notice and this notice are preserved.