OSDN Git Service

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