1 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/utils2.c (build_cond_expr): Take the address and
4 dereference if the result type is passed by reference.
6 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
8 * gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
9 (gnat_to_gnu) <N_Null_Statement>: When not optimizing, generate a
10 goto to the next statement.
12 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
14 * gcc-interface/gigi.h (maybe_variable): Delete.
15 (protect_multiple_eval): Likewise.
16 (maybe_stabilize_reference): Likewise.
17 (gnat_save_expr): Declare.
18 (gnat_protect_expr): Likewise.
19 (gnat_stabilize_reference): Likewise.
20 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use
21 gnat_stabilize_reference.
22 (maybe_variable): Delete.
23 (elaborate_expression_1): Use gnat_save_expr.
24 * gcc-interface/trans.c (Attribute_to_gnu): Use gnat_protect_expr.
25 (call_to_gnu): Pass NULL to gnat_stabilize_reference.
26 (gnat_to_gnu) <N_Object_Declaration>: Use gnat_save_expr.
27 <N_Slice>: Use gnat_protect_exp.
28 <N_Selected_Component>: Pass NULL to gnat_stabilize_reference.
29 <N_In>: Use gnat_protect_expr.
30 Pass NULL to gnat_stabilize_reference.
31 (build_unary_op_trapv): Use gnat_protect_expr.
32 (build_binary_op_trapv): Likewise.
33 (emit_range_check): Likewise.
34 (emit_index_check): Likewise.
35 (convert_with_check): Likewise.
36 (protect_multiple_eval): Move to utils2.c file.
37 (maybe_stabilize_reference): Merge into...
38 (gnat_stabilize_reference): ...this. Move to utils2.c file.
39 (gnat_stabilize_reference_1): Likewise.
40 * gcc-interface/utils.c (convert_to_fat_pointer): Use gnat_protect_expr
41 instead of protect_multiple_eval.
42 * gcc-interface/utils2.c (compare_arrays): Likewise.
43 (nonbinary_modular_operation): Likewise.
44 (maybe_wrap_malloc): Likewise.
45 (build_allocator): Likewise.
46 (gnat_save_expr): New function.
47 (gnat_protect_expr): Rename from protect_multiple_eval. Early return
48 in common cases. Propagate TREE_READONLY onto dereferences.
49 (gnat_stabilize_reference_1): Move from trans.c file.
50 (gnat_stabilize_reference): Likewise.
52 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
54 * gcc-interface/gigi.h (gnat_mark_addressable): Rename parameter.
55 * gcc-interface/decl.c (maybe_variable): Do not set TREE_STATIC on _REF
56 node. Use the type of the operand to set TREE_READONLY.
57 * gcc-interface/trans.c (Identifier_to_gnu): Do not set TREE_STATIC on
58 _REF node. Do not overwrite TREE_READONLY.
59 (call_to_gnu): Rename local variable and fix various nits. In the
60 copy-in/copy-out case, build the SAVE_EXPR manually.
61 (convert_with_check): Call protect_multiple_eval in lieu of save_expr
62 and fold the computations.
63 (protect_multiple_eval): Always save entire fat pointers.
64 (maybe_stabilize_reference): Minor tweaks.
65 (gnat_stabilize_reference_1): Likewise. Do not deal with tcc_constant,
66 tcc_type and tcc_statement.
67 * gcc-interface/utils.c (convert_to_fat_pointer): Call
68 protect_multiple_eval in lieu of save_expr.
69 (convert): Minor tweaks.
70 (maybe_unconstrained_array): Do not set TREE_STATIC on _REF node.
71 (builtin_type_for_size): Call gnat_type_for_size directly.
72 * gcc-interface/utils2.c (contains_save_expr_p): Delete.
73 (contains_null_expr): Likewise
74 (gnat_build_constructor): Do not call it.
75 (compare_arrays): Deal with all side-effects, use protect_multiple_eval
76 instead of gnat_stabilize_reference to protect the operands.
77 (nonbinary_modular_operation): Call protect_multiple_eval in lieu of
79 (maybe_wrap_malloc): Likewise.
80 (build_allocator): Likewise.
81 (build_unary_op) <INDIRECT_REF>: Do not set TREE_STATIC on _REF node.
82 (gnat_mark_addressable): Rename parameter.
84 2010-04-08 Eric Botcazou <ebotcazou@adacore.com>
86 * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
87 (TYPE_RETURN_UNCONSTRAINED_P): ...this.
88 (TYPE_RETURNS_BY_REF_P): Rename into.
89 (TYPE_RETURN_BY_DIRECT_REF_P): ...this.
90 (TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
91 * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
92 (build_return_expr): Likewise.
93 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
94 Rename local variables. If the return Mechanism is By_Reference, pass
95 return_by_invisible_ref_p to create_subprog_type instead of toggling
96 TREE_ADDRESSABLE. Test return_by_invisible_ref_p in order to annotate
97 the mechanism. Use regular return for contrained types with non-static
98 size and return by invisible reference for unconstrained return types
99 with default discriminants. Update comment.
100 * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
101 returns by invisible reference, turn the RESULT_DECL into a pointer.
102 Do not handle DECL_BY_REF_P in the CICO case here.
103 (call_to_gnu): Remove code handling return by target pointer. For a
104 function call, if the return type has non-constant size, generate the
105 assignment with an INIT_EXPR.
106 (gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
107 If the function returns by invisible reference, build the copy return
109 (add_decl_expr): Initialize the variable with an INIT_EXPR.
110 * gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
111 Adjust for renaming of macros. Copy the node only when necessary.
112 (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
113 type, only change DECL_BY_REFERENCE on the RETURN_DECL.
114 (convert_from_reference): Delete.
115 (is_byref_result): Likewise.
116 (gnat_genericize_r): Likewise.
117 (gnat_genericize): Likewise.
118 (end_subprog_body): Do not call gnat_genericize.
119 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
120 (build_return_expr): Adjust parameter names, logic and comment.
122 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
124 * exp_pakd.adb (Create_Packed_Array_Type): Always use a modular type
125 if the size is small enough. Propagate the alignment if there is an
126 alignment clause on the original array type.
127 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
128 Deal with under-aligned packed array types. Copy the size onto the
129 justified modular type and don't lay it out again. Likewise for the
130 padding type built for other under-aligned subtypes.
131 * gcc-interface/utils.c (finish_record_type): Do not set a default mode
134 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
136 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
137 alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
139 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
141 * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
142 do not set the result type if there is a specified target and do not
143 convert the result in any cases.
144 (protect_multiple_eval): Make direct SAVE_EXPR for CALL_EXPR.
145 (maybe_stabilize_reference) <COMPOUND_EXPR>: Merge with CALL_EXPR.
147 2010-03-10 Eric Botcazou <ebotcazou@adacore.com>
149 * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
151 2010-02-27 Eric Botcazou <ebotcazou@adacore.com>
154 * gcc-interface/utils2.c (build_binary_op) <EQ_EXPR>: Assert that fat
155 pointer base types are variant of each other. Apply special treatment
156 for null to fat pointer types in all cases.
158 2010-01-28 Pascal Obry <obry@adacore.com>
160 * s-win32.ads: Add some missing constants.
162 2010-01-28 Vincent Celier <celier@adacore.com>
164 * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
167 2010-01-28 Robert Dewar <dewar@adacore.com>
169 * gnat_rm.texi: Minor correction
171 2010-01-27 Pascal Obry <obry@adacore.com>
173 * g-awk.adb: ensure that an AWK session is reusable.
175 2010-01-27 Vasiliy Fofanov <fofanov@adacore.com>
177 * g-regist.adb (For_Every_Key): Fix previous change.
180 2010-01-27 Thomas Quinot <quinot@adacore.com>
182 * lib-writ.ads: Current version of spec for new N (note) ALI lines
184 2010-01-27 Yannick Moy <moy@adacore.com>
186 * a-cdlili.adb (Insert): Correct exception message when cursor
187 designates wrong list.
189 2010-01-27 Vincent Celier <celier@adacore.com>
191 * gnatcmd.adb: When there is only one main specified, the package
192 support Switches (<main>) and attribute Switches is specified for the
193 main, use these switches, instead of Default_Switches ("Ada").
195 2010-01-27 Robert Dewar <dewar@adacore.com>
197 * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
199 * exp_disp.adb: Minor reformatting
201 2010-01-27 Tristan Gingold <gingold@adacore.com>
203 * seh_init.c: Use __ImageBase instead of _ImageBase.
205 2010-01-27 Javier Miranda <miranda@adacore.com>
207 * exp_disp.ads, exp_disp.adb (Expand_Interface_Thunk): Modify the
208 profile of interface thunks. The type of the controlling formal is now
209 the covered interface type (instead of the target tagged type).
211 2010-01-27 Sergey Rybin <rybin@adacore.com>
213 * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
215 2010-01-27 Robert Dewar <dewar@adacore.com>
217 * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
218 changed from Expr to N.
220 2010-01-26 Thomas Quinot <quinot@adacore.com>
222 * gnat_ugn.texi: Adjust documentation of -gnatz switches.
223 * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
226 2010-01-26 Vincent Celier <celier@adacore.com>
228 * prj-attr.adb: Add new attribute Library_Install_Name_Option
229 Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
230 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
231 attributes Run_Path_Option and Library_Install_Name_Option.
232 * prj.ads (Project_Configuration): Replace component
233 Run_Path_Origin_Supported with component Run_Path_Origin. Add new
234 component Library_Install_Name_Option.
235 * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
236 Replace Run_Path_Origin_Supported with Run_Path_Origin
238 2010-01-26 Ed Schonberg <schonberg@adacore.com>
240 * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
241 is not hidden by a homograph declared in another actual package.
243 2010-01-26 Robert Dewar <dewar@adacore.com>
245 * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
246 decisions for pragmas Assert, Check, Precondition, Postcondition if
248 * scos.ads: Update comments.
249 * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs.
250 Also remove obsolete code for CT (exit point) SCOs.
252 2010-01-26 Thomas Quinot <quinot@adacore.com>
254 * switch-c.adb: Fix handling of -gnatz*
256 2010-01-26 Robert Dewar <dewar@adacore.com>
258 * par_sco.adb (Traverse_Declarations_Or_Statements): Separate F/W
259 qualifiers for FOR/WHILE loops
260 * scos.ads: Use separate type letters F/W for for/while loops
262 2010-01-26 Robert Dewar <dewar@adacore.com>
264 * get_scos.adb (Get_SCOs): Implement new form of CS entries (multiple
265 entries per line, one for each statement in the sequence).
266 * par_sco.adb (Traverse_Declarations_Or_Statements): Increase array
267 size from 100 to 10_000 for SC_Array to avoid any real possibility of
268 overflow. Output decisions in for loops.
269 Exclude labels from CS lines.
270 * scos.ads: Clarify that label is not included in the entry point
272 2010-01-26 Robert Dewar <dewar@adacore.com>
274 * par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
275 format of statement sequence SCO entries (one location/statement).
276 * put_scos.adb (Put_SCOs): Implement new format of CS lines
277 * scos.ads: Update comments.
278 * sem_eval.adb: Minor reformatting.
280 2010-01-26 Robert Dewar <dewar@adacore.com>
282 * par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
283 (Extend_Statement_Sequence): New procedures
284 (Traverse_Declarations_Or_Statements): New handling for exits.
286 2010-01-26 Robert Dewar <dewar@adacore.com>
288 * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
291 2010-01-26 Robert Dewar <dewar@adacore.com>
293 * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
294 * scos.ads: Clarify handling of logical operators
296 2010-01-26 Arnaud Charlet <charlet@adacore.com>
298 * s-tpoben.adb: Update comments.
300 2010-01-26 Robert Dewar <dewar@adacore.com>
302 * freeze.adb (Set_Small_Size): Don't set size if alignment clause
305 2010-01-26 Robert Dewar <dewar@adacore.com>
307 * scos.ads: Clean up documentation, remove obsolete XOR references
308 2010-01-26 Vincent Celier <celier@adacore.com>
310 * gnat_ugn.texi: Complete documentation on the restrictions for
311 combined options in -gnatxxx switches.
314 2010-01-26 Arnaud Charlet <charlet@adacore.com>
316 * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
317 a controlled operation, abort is already deferred at this point, so we
318 need to use Defer_Abort_Nestable.
320 2010-01-26 Vincent Celier <celier@adacore.com>
322 * prj-conf.adb (Get_Config_Switches): Check for a default language for
323 a project extending a project with no languages.
325 2010-01-26 Vincent Celier <celier@adacore.com>
327 * switch-c.adb (Scan_Front_End_Switches): Take into account options
329 Allow -gnateG to be followed by other options.
331 2010-01-26 Robert Dewar <dewar@adacore.com>
333 * s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
334 s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
337 2010-01-26 Vasiliy Fofanov <fofanov@adacore.com>
339 * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
340 that allows to iterate over all subkeys of a key.
342 2010-01-26 Ed Falis <falis@adacore.com>
344 * sysdep.c: enable NFS for VxWorks MILS
345 * env.c: enable __gnat_environ for VxWorks MILS
346 * gcc-interface/Makefile.in: Add VxWorks MILS target pairs.
348 2010-01-25 Bob Duff <duff@adacore.com>
350 * sem_aggr.adb (Resolve_Array_Aggregate): Check for the case where this
351 is an internally-generated positional aggregate, and the bounds are
352 already correctly set. We don't want to overwrite those bounds with
353 bounds determined by context.
355 2010-01-25 Robert Dewar <dewar@adacore.com>
357 * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
358 exp_ch9.adb, g-sechas.ads: Minor reformatting.
360 2010-01-25 Thomas Quinot <quinot@adacore.com>
362 * s-commun.adb (Last_Index): Count must be converted to SEO (a signed
363 integer type) before subtracting 1, otherwise the computation may wrap
364 (because size_t is modular) and cause the conversion to fail.
366 2010-01-25 Ed Falis <falis@adacore.com>
368 * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
370 2010-01-25 Vincent Celier <celier@adacore.com>
372 * prj-attr.adb: New attribute Run_Path_Origin_Required
373 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process new
374 attribute Run_Path_Origin_Required.
375 * prj.ads (Project_Configuration): New component
376 Run_Path_Origin_Supported.
377 * snames.ads-tmpl: New standard name Run_Path_Origin_Required
379 2010-01-25 Ed Schonberg <schonberg@adacore.com>
381 * sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
382 have errors, do not continue resolution of the aggregate.
383 * sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
384 the array type indicates an error.
386 2010-01-25 Bob Duff <duff@adacore.com>
388 * sinfo.ads: Minor comment fixes.
390 2010-01-25 Bob Duff <duff@adacore.com>
392 * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
394 2010-01-25 Arnaud Charlet <charlet@adacore.com>
396 * gnatvsn.ads (Current_Year): Update.
398 2010-01-25 Florian Villoing <villoing@adacore.com>
400 * gnat_ugn.texi: Fix typo.
402 2010-01-25 Thomas Quinot <quinot@adacore.com>
404 * scos.ads: Update specification.
406 2010-01-25 Ed Schonberg <schonberg@adacore.com>
408 * sem_ch6.adb (Process_PPCs): If a postcondition is present and the
409 enclosing subprogram has no previous spec, attach postcondition
410 procedure to the defining entity for the body.
412 2010-01-25 Ed Schonberg <schonberg@adacore.com>
414 * exp_aggr.adb (Build_Record_Aggr_Code); Do not generate call to
415 initialization procedure of the ancestor part of an extension aggregate
416 if it is an interface type.
418 2010-01-25 Vincent Celier <celier@adacore.com>
420 * gnatlink.adb (Process_Binder_File): The directory for the shared
421 version of libgcc in the run path options is found in the subdirectory
422 indicated by __gnat_default_libgcc_subdir.
423 * link.c: Declare new const char * __gnat_default_libgcc_subdir for
426 2010-01-25 Ed Schonberg <schonberg@adacore.com>
428 * sem_prag.adb: More flexible pragma Annotate.
430 2010-01-22 Eric Botcazou <ebotcazou@adacore.com>
432 * system-linux-armel.ads (Stack_Check_Probes): Set to True.
433 * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
435 2010-01-18 Eric Botcazou <ebotcazou@adacore.com>
437 * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
439 2010-01-18 Jan Hubicka <jh@suse.cz>
442 * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
443 unit local variables.
445 2010-01-17 Laurent GUERBY <laurent@guerby.net>
447 * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
449 2010-01-11 Mikael Pettersson <mikpe@it.uu.se>
451 * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
452 * system-linux-armeb.ads, system-linux-armel.ads: New files.
454 2010-01-09 Simon Wright <simon@pushface.org>
457 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
462 Copyright (C) 2010 Free Software Foundation, Inc.
464 Copying and distribution of this file, with or without modification,
465 are permitted in any medium without royalty provided the copyright
466 notice and this notice are preserved.