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