1 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
3 * back-end.adb (Call_Back_End): Pass Standard_Character to gigi.
4 * gcc-interface/gigi.h (gigi): Add standard_character parameter.
5 (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE,
6 LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
7 LONG_DOUBLE_TYPE_SIZE, SIZE_TYPE): Delete.
8 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Call
10 * gcc-interface/misc.c (gnat_init): Set signedness of char as per
11 flag_signed_char. Tag sizetype with "size_type" moniker.
12 * gcc-interface/trans.c (gigi): Add standard_character parameter.
13 Remove useless built-in types. Equate unsigned_char_type_node to
14 Standard.Character. Use it instead of char_type_node throughout.
15 (Attribute_to_gnu): Likewise.
16 (gnat_to_gnu): Likewise.
17 * gcc-interface/utils2.c (build_call_raise): Likewise.
19 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
21 * gcc-interface/gigi.h (enum standard_datatypes): Add new values
22 ADT_sbitsize_one_node and ADT_sbitsize_unit_node.
23 (sbitsize_one_node): New macro.
24 (sbitsize_unit_node): Likewise.
25 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Fix
26 latent bug in the computation of subrange_p. Fold wider_p predicate.
27 (cannot_be_superflat_p): Use an explicitly signed 64-bit type to do
29 (make_aligning_type): Build real negation and use sizetype throughout
30 the offset computation.
31 (maybe_pad_type): Do not issue the warning when the new size expression
33 (annotate_value) <INTEGER_CST>: Simplify code handling negative values.
34 * gcc-interface/misc.c (gnat_init): Initialize sbitsize_one_node and
36 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Fold
38 (gnat_to_gnu) <N_Free_Statement>: Likewise.
39 * gcc-interface/utils.c (convert): Use sbitsize_unit_node.
40 * gcc-interface/utils2.c (compare_arrays): Compute real lengths and use
41 constants in sizetype. Remove dead code and tweak comments. Generate
42 equality instead of inequality comparisons for zero length tests.
44 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
46 * gcc-interface/gigi.h (gnat_init_decl_processing): Delete.
47 * gcc-interface/decl.c (gnat_to_gnu_entity): Constify a few variables.
48 <object>: Do not create the fake PARM_DECL if no debug info is needed.
49 Do not create the corresponding VAR_DECL of a CONST_DECL for debugging
50 purposes if no debug info is needed.
51 Fix formatting. Reorder and add comments.
52 * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Reference>: Constify
53 variable and remove obsolete comment.
54 * gcc-interface/utils.c (convert_vms_descriptor64): Tweak comment.
55 (convert_vms_descriptor32): Likewise.
56 (convert): Remove dead code.
57 <UNCONSTRAINED_ARRAY_REF>: Pass the field instead of its name to build
58 the reference to the P_ARRAY pointer.
59 <POINTER_TYPE>: Likewise.
60 (maybe_unconstrained_array) <UNCONSTRAINED_ARRAY_TYPE>: Likewise.
61 (gnat_init_decl_processing): Delete, move contents to...
62 * gcc-interface/misc.c (gnat_init): ...here.
64 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
66 * gcc-interface/trans.c (unchecked_conversion_nop): Handle function
67 calls. Return true for conversion from a record subtype to its type.
69 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
71 * gcc-interface/decl.c (gnat_to_gnu_entity): Use boolean_type_node in
72 lieu of integer_type_node for boolean operations.
73 (choices_to_gnu): Likewise.
74 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
75 (Loop_Statement_to_gnu): Likewise.
76 (establish_gnat_vms_condition_handler): Likewise.
77 (Exception_Handler_to_gnu_sjlj): Likewise.
78 (gnat_to_gnu): Likewise.
79 (build_unary_op_trapv): Likewise.
80 (build_binary_op_trapv): Likewise.
81 (emit_range_check): Likewise.
82 (emit_index_check): Likewise.
83 (convert_with_check): Likewise.
84 * gcc-interface/utils.c (convert_vms_descriptor64): Likewise.
85 (convert_vms_descriptor32): Likewise.
86 (convert_vms_descriptor): Likewise.
87 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
88 (compare_arrays): Use boolean instead of integer constants.
89 (build_binary_op) <TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR,
90 TRUTH_OR_EXPR, TRUTH_XOR_EXPR>: New case. Check that the result type
92 <GE_EXPR, LE_EXPR, GT_EXPR, LT_EXPR>: Remove obsolete assertion.
93 <EQ_EXPR, NE_EXPR>: Check that the result type is a boolean type.
94 <PREINC/PREDECREMENT_EXPR, POSTINC/POSTDECREMENT_EXPR>: Delete.
95 <TRUTH_NOT_EXPR>: Check that the result type is a boolean type.
96 (build_unary_op): Use boolean_type_node in lieu of integer_type_node
97 for boolean operations.
98 (fill_vms_descriptor): Likewise. Fix formatting nits.
100 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
102 * gcc-interface/ada-tree.def (LOOP_STMT): Change to 4-operand nodes.
103 * gcc-interface/ada-tree.h (LOOP_STMT_TOP_COND, LOOP_STMT_BOT_COND):
105 (LOOP_STMT_COND): ...this.
106 (LOOP_STMT_BOTTOM_COND_P): New flag.
107 (LOOP_STMT_TOP_UPDATE_P): Likewise.
108 * gcc-interface/trans.c (can_equal_min_or_max_val_p): New function.
109 (can_equal_min_val_p): New static inline function.
110 (can_equal_max_val_p): Likewise.
111 (Loop_Statement_to_gnu): Use build4 in lieu of build5 and adjust to
112 new LOOP_STMT semantics. Use two different strategies depending on
113 whether optimization is enabled to translate the loop.
114 (gnat_gimplify_stmt) <LOOP_STMT>: Adjust to new LOOP_STMT semantics.
116 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
118 * uintp.adb (UI_From_Dint): Remove useless code.
119 (UI_From_Int): Likewise.
120 * uintp.h: Reorder declarations.
121 (UI_From_gnu): Declare.
123 (Vector_Template): Likewise.
124 (Vector_To_Uint): Likewise.
127 * gcc-interface/gigi.h: Tweak comments.
128 * gcc-interface/cuintp.c (UI_From_gnu): New global function.
129 * gcc-interface/decl.c (maybe_pad_type): Do not warn if either size
131 (annotate_value) <INTEGER_CST>: Call UI_From_gnu.
132 * gcc-interface/trans.c (post_error_ne_num): Call post_error_ne.
133 (post_error_ne_tree): Call UI_From_gnu and post_error_ne.
134 * gcc-interface/utils.c (max_size) <tcc_binary>: Do not special-case
137 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
139 * gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Just copy
141 * gcc-interface/trans.c (smaller_packable_type_p): Rename into...
142 (smaller_form_type_p): ...this. Change parameter and variable names.
143 (call_to_gnu): Use the nominal type of the parameter to create the
144 temporary if it's a smaller form of the actual type.
145 (addressable_p): Return false if the actual type is integral and its
146 size is greater than that of the expected type.
148 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
150 * gcc-interface/cuintp.c (UI_To_gnu): Fix long line.
151 * gcc-interface/gigi.h (MARK_VISITED): Skip objects of constant class.
152 (process_attributes): Delete.
153 (post_error_ne_num): Change parameter name.
154 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force debug info
155 with -g3. Remove a couple of obsolete lines. Minor tweaks.
156 If type annotating mode, operate on trees to compute the adjustment to
157 the sizes of tagged types. Fix long line.
158 (cannot_be_superflat_p): Tweak head comment.
159 (annotate_value): Fold local constant.
160 (set_rm_size): Fix long line.
161 * gcc-interface/trans.c (Identifier_to_gnu): Rework comments.
162 (Attribute_to_gnu): Fix long line.
163 <Attr_Size>: Remove useless assertion.
164 Reorder statements. Use size_binop routine.
165 (Loop_Statement_to_gnu): Use build5 in lieu of build_nt.
166 Create local variables for the label and the test. Tweak comments.
167 (Subprogram_Body_to_gnu): Reset cfun to NULL.
168 (Compilation_Unit_to_gnu): Use the Sloc of the Unit node.
169 (process_inlined_subprograms): Integrate into...
170 (Compilation_Unit_to_gnu): ...this.
171 (gnat_to_gnu): Fix long line.
172 (post_error_ne_num): Change parameter name.
173 * gcc-interface/utils.c (process_attributes): Static-ify.
174 <ATTR_MACHINE_ATTRIBUTE>: Set input_location before proceeding.
175 (create_type_decl): Add comment.
176 (create_var_decl_1): Process the attributes after adding the VAR_DECL
177 to the current binding level.
178 (create_subprog_decl): Likewise for the FUNCTION_DECL.
179 (end_subprog_body): Do not reset cfun to NULL.
180 (build_vms_descriptor32): Fix long line.
181 (build_vms_descriptor): Likewise.
182 (handle_nonnull_attribute): Likewise.
183 (convert_vms_descriptor64): Likewise.
184 * gcc-interface/utils2.c (fill_vms_descriptor): Fix long line.
185 (gnat_protect_expr): Fix thinko.
187 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
189 * gcc-interface/trans.c (gigi): Set DECL_IGNORED_P on EH functions.
190 (gnat_to_gnu) <N_Op_Eq>: Restore the value of input_location
191 before translating the top-level node.
192 (lvalue_required_p) <N_Function_Call>: Return 1 if !constant.
193 <N_Object_Declaration>: Likewise.
194 <N_Assignment_Statement>: Likewise.
195 <N_Unchecked_Type_Conversion>: Likewise.
196 (call_to_gnu): Remove kludge.
197 (gnat_to_gnu) <N_Return_Statement>: When not optimizing, force labels
198 associated with user returns to be preserved.
199 (gnat_to_gnu): Add special code to deal with boolean rvalues.
200 * gcc-interface/utils2.c (compare_arrays): Set input_location on all
202 (build_unary_op) <ADDR_EXPR>: Call build_fold_addr_expr.
203 <INDIRECT_REF>: Call build_fold_indirect_ref.
205 2010-04-15 Joel Sherrill <joel.sherrill@oarcorp.com>
207 * g-socket.adb: A target can have multiple missing errno's. This
208 will result in multiple errno's being defined as -1. Because of this
209 we can not use a case but must use a series of if's to avoid
210 a duplicate case error in GNAT.Sockets.Resolve_Error.
212 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
214 * gcc-interface/trans.c (call_to_gnu): Open a nesting level if this is
215 a statement. Otherwise, if at top-level, push the processing of the
216 elaboration routine. In the misaligned case, issue the error messages
217 again on entry and create the temporary explicitly. Do not issue them
219 For a function call, emit the range check if necessary.
220 In the copy-in copy-out case, create the temporary for the return
222 Do not unnecessarily convert by-ref parameters to the formal's type.
223 Remove obsolete guards in conditions.
224 (gnat_to_gnu) <N_Assignment_Statement>: For a function call, pass the
225 target to call_to_gnu in all cases.
226 (gnat_gimplify_expr) <ADDR_EXPR>: Remove handling of SAVE_EXPR.
227 (addressable_p) <CONSTRUCTOR>: Return false if not static.
228 <COMPOUND_EXPR>: New case.
229 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Fold a compound
230 expression if it has unconstrained array type.
231 (gnat_mark_addressable) <COMPOUND_EXPR>: New case.
232 (gnat_stabilize_reference) <COMPOUND_EXPR>: Stabilize operands on an
235 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
237 * gcc-interface/trans.c (gigi): Do not start statement group.
238 (Compilation_Unit_to_gnu): Set current_function_decl to NULL.
239 Start statement group and push binding level here...
240 (gnat_to_gnu) <N_Compilation_Unit>: ...and not here.
241 Do not push fake contexts at top level. Remove redundant code.
242 (call_to_gnu): Rename a local variable and constify another.
243 * gcc-interface/utils.c (gnat_pushlevel): Fix formatting nits.
244 (set_current_block_context): Set it as the group's block.
245 (gnat_init_decl_processing): Delete unrelated init code.
246 (end_subprog_body): Use NULL_TREE.
248 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
250 * gcc-interface/trans.c (call_to_gnu): Do not unnecessarily force
251 side-effects of actual parameters before the call.
253 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
255 * gcc-interface/decl.c (validate_size): Reorder, remove obsolete test
257 (set_rm_size): Reorder and remove obsolete test.
259 2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
261 * gcc-interface/gigi.h: Reorder declarations and tweak comments.
262 (gigi): Adjust ATTRIBUTE_UNUSED markers.
263 * gcc-interface/gadaint.h: New file.
264 * gcc-interface/trans.c: Include it in lieu of adaint.h. Reorder.
265 (__gnat_to_canonical_file_spec): Remove declaration.
266 (number_names): Delete.
267 (number_files): Likewise.
269 * gcc-interface/Make-lang.in (ada/trans.o): Adjust dependencies to
272 2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
274 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Class_Wide_Type>: Fix
276 * gcc-interface/trans.c (process_freeze_entity): Use local copy of
277 Ekind. Return early for class-wide types. Do not compute initializer
278 unless necessary. Reuse the tree for an associated class-wide type
279 only if processing its root type.
281 2010-04-13 Joel Sherrill <joel.sherrill@oarcorp.com>
283 * gsocket.h: Run-time can no longer be built without network
284 OS headers available. Changing RTEMS GNAT build procedure to
285 reflect this and letting run-time build use network .h files.
287 2010-04-13 Duncan Sands <baldrick@free.fr>
289 * gcc-interface/misc.c (gnat_eh_type_covers): Remove.
290 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Update comment.
292 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
294 * gcc-interface/gigi.h (standard_datatypes): Add ADT_parent_name_id.
295 (parent_name_id): New macro.
296 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use it.
297 * gcc-interface/trans.c (gigi): Initialize it.
298 (lvalue_required_p) <N_Type_Conversion>: New case.
299 <N_Qualified_Expression>: Likewise.
300 <N_Allocator>: Likewise.
301 * gcc-interface/utils.c (convert): Try to properly upcast tagged types.
303 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
305 * gcc-interface/ada-tree.h (TYPE_BY_REFERENCE_P): Delete.
306 (DECL_CONST_ADDRESS_P): New macro.
307 (SET_DECL_ORIGINAL_FIELD_TO_FIELD): Likewise.
308 (SAME_FIELD_P): Likewise.
309 * gcc-interface/decl.c (constructor_address_p): New static function.
310 (gnat_to_gnu_entity) <object>: Set DECL_CONST_ADDRESS_P according to
311 the return value of above function.
312 (gnat_to_gnu_entity) <E_Record_Type>: Force BLKmode for all types
314 <E_Record_Subtype>: Likewise.
315 Set TREE_ADDRESSABLE on the type if it passed by reference.
316 (make_packable_type): Use SET_DECL_ORIGINAL_FIELD_TO_FIELD.
317 (create_field_decl_from): Likewise.
318 (substitute_in_type): Likewise.
319 (purpose_member_field): Use SAME_FIELD_P.
320 * gcc-interface/misc.c (must_pass_by_ref): Test TREE_ADDRESSABLE.
321 * gcc-interface/trans.c (lvalue_required_p): Add ADDRESS_OF_CONSTANT
322 parameter and adjust recursive calls.
323 <N_Explicit_Dereference>: New case.
324 <N_Object_Declaration>: Return 1 if the object is of a class-wide type.
325 Adjust calls to lvalue_required_p. Do not return the initializer of a
326 DECL_CONST_ADDRESS_P constant if an lvalue is required for it.
327 (call_to_gnu): Delay issuing error message for a misaligned actual and
328 avoid the associated back-end assertion. Test TREE_ADDRESSABLE.
329 (gnat_gimplify_expr) <ADDR_EXPR>: Handle non-static constructors.
330 * gcc-interface/utils.c (make_dummy_type): Set TREE_ADDRESSABLE if the
331 type is passed by reference.
332 (convert) <CONSTRUCTOR>: Convert in-place in more cases.
333 * gcc-interface/utils2.c (build_cond_expr): Drop TYPE_BY_REFERENCE_P.
334 (build_simple_component_ref): Use SAME_FIELD_P.
336 2010-04-12 Eric Botcazou <ebotcazou@adacore.com>
338 * gcc-interface/trans.c (Identifier_to_gnu): Use boolean variable.
339 (call_to_gnu): Test gigi's flag TYPE_BY_REFERENCE_P instead of calling
340 front-end's predicate Is_By_Reference_Type. Use consistent order and
341 remove ??? comment. Use original conversion in all cases, if any.
342 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
343 (convert): Use local copy in more cases.
344 <INDIRECT_REF>: Remove deactivated code.
345 (unchecked_convert): Use a couple of local copies.
347 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
349 * gcc-interface/trans.c (lvalue_required_for_attribute_p): New static
351 (lvalue_required_p) <N_Attribute_Reference>: Call it.
352 (gnat_to_gnu) <N_Selected_Component>: Prevent build_component_ref from
353 folding the result only if lvalue_required_for_attribute_p is true.
354 * gcc-interface/utils.c (maybe_unconstrained_array): Pass correctly
355 typed constant to build_component_ref.
356 (unchecked_convert): Likewise.
357 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
358 (build_allocator): Likewise.
360 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
362 * gcc-interface/utils2.c (build_cond_expr): Take the address and
363 dereference if the result type is passed by reference.
365 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
367 * gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
368 (gnat_to_gnu) <N_Null_Statement>: When not optimizing, generate a
369 goto to the next statement.
371 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
373 * gcc-interface/gigi.h (maybe_variable): Delete.
374 (protect_multiple_eval): Likewise.
375 (maybe_stabilize_reference): Likewise.
376 (gnat_save_expr): Declare.
377 (gnat_protect_expr): Likewise.
378 (gnat_stabilize_reference): Likewise.
379 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use
380 gnat_stabilize_reference.
381 (maybe_variable): Delete.
382 (elaborate_expression_1): Use gnat_save_expr.
383 * gcc-interface/trans.c (Attribute_to_gnu): Use gnat_protect_expr.
384 (call_to_gnu): Pass NULL to gnat_stabilize_reference.
385 (gnat_to_gnu) <N_Object_Declaration>: Use gnat_save_expr.
386 <N_Slice>: Use gnat_protect_exp.
387 <N_Selected_Component>: Pass NULL to gnat_stabilize_reference.
388 <N_In>: Use gnat_protect_expr.
389 Pass NULL to gnat_stabilize_reference.
390 (build_unary_op_trapv): Use gnat_protect_expr.
391 (build_binary_op_trapv): Likewise.
392 (emit_range_check): Likewise.
393 (emit_index_check): Likewise.
394 (convert_with_check): Likewise.
395 (protect_multiple_eval): Move to utils2.c file.
396 (maybe_stabilize_reference): Merge into...
397 (gnat_stabilize_reference): ...this. Move to utils2.c file.
398 (gnat_stabilize_reference_1): Likewise.
399 * gcc-interface/utils.c (convert_to_fat_pointer): Use gnat_protect_expr
400 instead of protect_multiple_eval.
401 * gcc-interface/utils2.c (compare_arrays): Likewise.
402 (nonbinary_modular_operation): Likewise.
403 (maybe_wrap_malloc): Likewise.
404 (build_allocator): Likewise.
405 (gnat_save_expr): New function.
406 (gnat_protect_expr): Rename from protect_multiple_eval. Early return
407 in common cases. Propagate TREE_READONLY onto dereferences.
408 (gnat_stabilize_reference_1): Move from trans.c file.
409 (gnat_stabilize_reference): Likewise.
411 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
413 * gcc-interface/gigi.h (gnat_mark_addressable): Rename parameter.
414 * gcc-interface/decl.c (maybe_variable): Do not set TREE_STATIC on _REF
415 node. Use the type of the operand to set TREE_READONLY.
416 * gcc-interface/trans.c (Identifier_to_gnu): Do not set TREE_STATIC on
417 _REF node. Do not overwrite TREE_READONLY.
418 (call_to_gnu): Rename local variable and fix various nits. In the
419 copy-in/copy-out case, build the SAVE_EXPR manually.
420 (convert_with_check): Call protect_multiple_eval in lieu of save_expr
421 and fold the computations.
422 (protect_multiple_eval): Always save entire fat pointers.
423 (maybe_stabilize_reference): Minor tweaks.
424 (gnat_stabilize_reference_1): Likewise. Do not deal with tcc_constant,
425 tcc_type and tcc_statement.
426 * gcc-interface/utils.c (convert_to_fat_pointer): Call
427 protect_multiple_eval in lieu of save_expr.
428 (convert): Minor tweaks.
429 (maybe_unconstrained_array): Do not set TREE_STATIC on _REF node.
430 (builtin_type_for_size): Call gnat_type_for_size directly.
431 * gcc-interface/utils2.c (contains_save_expr_p): Delete.
432 (contains_null_expr): Likewise
433 (gnat_build_constructor): Do not call it.
434 (compare_arrays): Deal with all side-effects, use protect_multiple_eval
435 instead of gnat_stabilize_reference to protect the operands.
436 (nonbinary_modular_operation): Call protect_multiple_eval in lieu of
438 (maybe_wrap_malloc): Likewise.
439 (build_allocator): Likewise.
440 (build_unary_op) <INDIRECT_REF>: Do not set TREE_STATIC on _REF node.
441 (gnat_mark_addressable): Rename parameter.
443 2010-04-08 Eric Botcazou <ebotcazou@adacore.com>
445 * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
446 (TYPE_RETURN_UNCONSTRAINED_P): ...this.
447 (TYPE_RETURNS_BY_REF_P): Rename into.
448 (TYPE_RETURN_BY_DIRECT_REF_P): ...this.
449 (TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
450 * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
451 (build_return_expr): Likewise.
452 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
453 Rename local variables. If the return Mechanism is By_Reference, pass
454 return_by_invisible_ref_p to create_subprog_type instead of toggling
455 TREE_ADDRESSABLE. Test return_by_invisible_ref_p in order to annotate
456 the mechanism. Use regular return for contrained types with non-static
457 size and return by invisible reference for unconstrained return types
458 with default discriminants. Update comment.
459 * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
460 returns by invisible reference, turn the RESULT_DECL into a pointer.
461 Do not handle DECL_BY_REF_P in the CICO case here.
462 (call_to_gnu): Remove code handling return by target pointer. For a
463 function call, if the return type has non-constant size, generate the
464 assignment with an INIT_EXPR.
465 (gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
466 If the function returns by invisible reference, build the copy return
468 (add_decl_expr): Initialize the variable with an INIT_EXPR.
469 * gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
470 Adjust for renaming of macros. Copy the node only when necessary.
471 (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
472 type, only change DECL_BY_REFERENCE on the RETURN_DECL.
473 (convert_from_reference): Delete.
474 (is_byref_result): Likewise.
475 (gnat_genericize_r): Likewise.
476 (gnat_genericize): Likewise.
477 (end_subprog_body): Do not call gnat_genericize.
478 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
479 (build_return_expr): Adjust parameter names, logic and comment.
481 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
483 * exp_pakd.adb (Create_Packed_Array_Type): Always use a modular type
484 if the size is small enough. Propagate the alignment if there is an
485 alignment clause on the original array type.
486 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
487 Deal with under-aligned packed array types. Copy the size onto the
488 justified modular type and don't lay it out again. Likewise for the
489 padding type built for other under-aligned subtypes.
490 * gcc-interface/utils.c (finish_record_type): Do not set a default mode
493 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
495 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
496 alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
498 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
500 * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
501 do not set the result type if there is a specified target and do not
502 convert the result in any cases.
503 (protect_multiple_eval): Make direct SAVE_EXPR for CALL_EXPR.
504 (maybe_stabilize_reference) <COMPOUND_EXPR>: Merge with CALL_EXPR.
506 2010-03-10 Eric Botcazou <ebotcazou@adacore.com>
508 * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
510 2010-02-27 Eric Botcazou <ebotcazou@adacore.com>
513 * gcc-interface/utils2.c (build_binary_op) <EQ_EXPR>: Assert that fat
514 pointer base types are variant of each other. Apply special treatment
515 for null to fat pointer types in all cases.
517 2010-01-28 Pascal Obry <obry@adacore.com>
519 * s-win32.ads: Add some missing constants.
521 2010-01-28 Vincent Celier <celier@adacore.com>
523 * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
526 2010-01-28 Robert Dewar <dewar@adacore.com>
528 * gnat_rm.texi: Minor correction
530 2010-01-27 Pascal Obry <obry@adacore.com>
532 * g-awk.adb: ensure that an AWK session is reusable.
534 2010-01-27 Vasiliy Fofanov <fofanov@adacore.com>
536 * g-regist.adb (For_Every_Key): Fix previous change.
539 2010-01-27 Thomas Quinot <quinot@adacore.com>
541 * lib-writ.ads: Current version of spec for new N (note) ALI lines
543 2010-01-27 Yannick Moy <moy@adacore.com>
545 * a-cdlili.adb (Insert): Correct exception message when cursor
546 designates wrong list.
548 2010-01-27 Vincent Celier <celier@adacore.com>
550 * gnatcmd.adb: When there is only one main specified, the package
551 support Switches (<main>) and attribute Switches is specified for the
552 main, use these switches, instead of Default_Switches ("Ada").
554 2010-01-27 Robert Dewar <dewar@adacore.com>
556 * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
558 * exp_disp.adb: Minor reformatting
560 2010-01-27 Tristan Gingold <gingold@adacore.com>
562 * seh_init.c: Use __ImageBase instead of _ImageBase.
564 2010-01-27 Javier Miranda <miranda@adacore.com>
566 * exp_disp.ads, exp_disp.adb (Expand_Interface_Thunk): Modify the
567 profile of interface thunks. The type of the controlling formal is now
568 the covered interface type (instead of the target tagged type).
570 2010-01-27 Sergey Rybin <rybin@adacore.com>
572 * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
574 2010-01-27 Robert Dewar <dewar@adacore.com>
576 * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
577 changed from Expr to N.
579 2010-01-26 Thomas Quinot <quinot@adacore.com>
581 * gnat_ugn.texi: Adjust documentation of -gnatz switches.
582 * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
585 2010-01-26 Vincent Celier <celier@adacore.com>
587 * prj-attr.adb: Add new attribute Library_Install_Name_Option
588 Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
589 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
590 attributes Run_Path_Option and Library_Install_Name_Option.
591 * prj.ads (Project_Configuration): Replace component
592 Run_Path_Origin_Supported with component Run_Path_Origin. Add new
593 component Library_Install_Name_Option.
594 * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
595 Replace Run_Path_Origin_Supported with Run_Path_Origin
597 2010-01-26 Ed Schonberg <schonberg@adacore.com>
599 * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
600 is not hidden by a homograph declared in another actual package.
602 2010-01-26 Robert Dewar <dewar@adacore.com>
604 * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
605 decisions for pragmas Assert, Check, Precondition, Postcondition if
607 * scos.ads: Update comments.
608 * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs.
609 Also remove obsolete code for CT (exit point) SCOs.
611 2010-01-26 Thomas Quinot <quinot@adacore.com>
613 * switch-c.adb: Fix handling of -gnatz*
615 2010-01-26 Robert Dewar <dewar@adacore.com>
617 * par_sco.adb (Traverse_Declarations_Or_Statements): Separate F/W
618 qualifiers for FOR/WHILE loops
619 * scos.ads: Use separate type letters F/W for for/while loops
621 2010-01-26 Robert Dewar <dewar@adacore.com>
623 * get_scos.adb (Get_SCOs): Implement new form of CS entries (multiple
624 entries per line, one for each statement in the sequence).
625 * par_sco.adb (Traverse_Declarations_Or_Statements): Increase array
626 size from 100 to 10_000 for SC_Array to avoid any real possibility of
627 overflow. Output decisions in for loops.
628 Exclude labels from CS lines.
629 * scos.ads: Clarify that label is not included in the entry point
631 2010-01-26 Robert Dewar <dewar@adacore.com>
633 * par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
634 format of statement sequence SCO entries (one location/statement).
635 * put_scos.adb (Put_SCOs): Implement new format of CS lines
636 * scos.ads: Update comments.
637 * sem_eval.adb: Minor reformatting.
639 2010-01-26 Robert Dewar <dewar@adacore.com>
641 * par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
642 (Extend_Statement_Sequence): New procedures
643 (Traverse_Declarations_Or_Statements): New handling for exits.
645 2010-01-26 Robert Dewar <dewar@adacore.com>
647 * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
650 2010-01-26 Robert Dewar <dewar@adacore.com>
652 * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
653 * scos.ads: Clarify handling of logical operators
655 2010-01-26 Arnaud Charlet <charlet@adacore.com>
657 * s-tpoben.adb: Update comments.
659 2010-01-26 Robert Dewar <dewar@adacore.com>
661 * freeze.adb (Set_Small_Size): Don't set size if alignment clause
664 2010-01-26 Robert Dewar <dewar@adacore.com>
666 * scos.ads: Clean up documentation, remove obsolete XOR references
667 2010-01-26 Vincent Celier <celier@adacore.com>
669 * gnat_ugn.texi: Complete documentation on the restrictions for
670 combined options in -gnatxxx switches.
673 2010-01-26 Arnaud Charlet <charlet@adacore.com>
675 * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
676 a controlled operation, abort is already deferred at this point, so we
677 need to use Defer_Abort_Nestable.
679 2010-01-26 Vincent Celier <celier@adacore.com>
681 * prj-conf.adb (Get_Config_Switches): Check for a default language for
682 a project extending a project with no languages.
684 2010-01-26 Vincent Celier <celier@adacore.com>
686 * switch-c.adb (Scan_Front_End_Switches): Take into account options
688 Allow -gnateG to be followed by other options.
690 2010-01-26 Robert Dewar <dewar@adacore.com>
692 * s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
693 s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
696 2010-01-26 Vasiliy Fofanov <fofanov@adacore.com>
698 * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
699 that allows to iterate over all subkeys of a key.
701 2010-01-26 Ed Falis <falis@adacore.com>
703 * sysdep.c: enable NFS for VxWorks MILS
704 * env.c: enable __gnat_environ for VxWorks MILS
705 * gcc-interface/Makefile.in: Add VxWorks MILS target pairs.
707 2010-01-25 Bob Duff <duff@adacore.com>
709 * sem_aggr.adb (Resolve_Array_Aggregate): Check for the case where this
710 is an internally-generated positional aggregate, and the bounds are
711 already correctly set. We don't want to overwrite those bounds with
712 bounds determined by context.
714 2010-01-25 Robert Dewar <dewar@adacore.com>
716 * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
717 exp_ch9.adb, g-sechas.ads: Minor reformatting.
719 2010-01-25 Thomas Quinot <quinot@adacore.com>
721 * s-commun.adb (Last_Index): Count must be converted to SEO (a signed
722 integer type) before subtracting 1, otherwise the computation may wrap
723 (because size_t is modular) and cause the conversion to fail.
725 2010-01-25 Ed Falis <falis@adacore.com>
727 * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
729 2010-01-25 Vincent Celier <celier@adacore.com>
731 * prj-attr.adb: New attribute Run_Path_Origin_Required
732 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process new
733 attribute Run_Path_Origin_Required.
734 * prj.ads (Project_Configuration): New component
735 Run_Path_Origin_Supported.
736 * snames.ads-tmpl: New standard name Run_Path_Origin_Required
738 2010-01-25 Ed Schonberg <schonberg@adacore.com>
740 * sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
741 have errors, do not continue resolution of the aggregate.
742 * sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
743 the array type indicates an error.
745 2010-01-25 Bob Duff <duff@adacore.com>
747 * sinfo.ads: Minor comment fixes.
749 2010-01-25 Bob Duff <duff@adacore.com>
751 * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
753 2010-01-25 Arnaud Charlet <charlet@adacore.com>
755 * gnatvsn.ads (Current_Year): Update.
757 2010-01-25 Florian Villoing <villoing@adacore.com>
759 * gnat_ugn.texi: Fix typo.
761 2010-01-25 Thomas Quinot <quinot@adacore.com>
763 * scos.ads: Update specification.
765 2010-01-25 Ed Schonberg <schonberg@adacore.com>
767 * sem_ch6.adb (Process_PPCs): If a postcondition is present and the
768 enclosing subprogram has no previous spec, attach postcondition
769 procedure to the defining entity for the body.
771 2010-01-25 Ed Schonberg <schonberg@adacore.com>
773 * exp_aggr.adb (Build_Record_Aggr_Code); Do not generate call to
774 initialization procedure of the ancestor part of an extension aggregate
775 if it is an interface type.
777 2010-01-25 Vincent Celier <celier@adacore.com>
779 * gnatlink.adb (Process_Binder_File): The directory for the shared
780 version of libgcc in the run path options is found in the subdirectory
781 indicated by __gnat_default_libgcc_subdir.
782 * link.c: Declare new const char * __gnat_default_libgcc_subdir for
785 2010-01-25 Ed Schonberg <schonberg@adacore.com>
787 * sem_prag.adb: More flexible pragma Annotate.
789 2010-01-22 Eric Botcazou <ebotcazou@adacore.com>
791 * system-linux-armel.ads (Stack_Check_Probes): Set to True.
792 * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
794 2010-01-18 Eric Botcazou <ebotcazou@adacore.com>
796 * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
798 2010-01-18 Jan Hubicka <jh@suse.cz>
801 * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
802 unit local variables.
804 2010-01-17 Laurent GUERBY <laurent@guerby.net>
806 * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
808 2010-01-11 Mikael Pettersson <mikpe@it.uu.se>
810 * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
811 * system-linux-armeb.ads, system-linux-armel.ads: New files.
813 2010-01-09 Simon Wright <simon@pushface.org>
816 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
821 Copyright (C) 2010 Free Software Foundation, Inc.
823 Copying and distribution of this file, with or without modification,
824 are permitted in any medium without royalty provided the copyright
825 notice and this notice are preserved.