OSDN Git Service

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