OSDN Git Service

don't use TYPE_ARG_TYPES in the Ada frontend
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
2
3         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
4         instead of accessing TYPE_ARG_TYPES directly.
5         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6
7 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8
9         PR ada/48844
10         * gcc-interface/gigi.h (get_variant_part): Declare.
11         * gcc-interface/decl.c (get_variant_part): Make global.
12         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13         types have the same constant size, are record types and T1 has a
14         variant part while T2 doesn't.
15
16 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17
18         * gcc-interface/utils.c (begin_subprog_body): Do not call
19         get_pending_sizes.
20         (end_subprog_body): Likewise.
21
22 2011-05-04  Richard Guenther  <rguenther@suse.de>
23
24         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
25         int_const_binop.
26         (pos_to_constructor): Likewise.
27
28 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
29             Eric Botcazou  <ebotcazou@adacore.com>
30
31         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
32         of build_function_type.  Adjust calls to...
33         (build_raise_check): ...this.  Do not take a void_tree parameter.
34         Call build_function_type_list instead of build_function_type.
35         Fix head comment and swap couple of conditional blocks.
36
37 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
38
39         * gnatvsn.ads (Library_Version): Bump to 4.7.
40         (Current_Year): Bump to 2011.
41
42 2011-04-29  Michael Matz  <matz@suse.de>
43
44         * gcc-interface/misc.c (gnat_handle_option): Set
45         warn_maybe_uninitialized.
46
47 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
48
49         * gnat_ugn.texi (Complexity Metrics Control): Update link to
50         the Watson/McCabe paper.
51
52 2011-04-23  Jim Meyering  <meyering@redhat.com>
53
54         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
55
56 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
57
58         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
59         onto the new type.
60
61 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
62
63         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
64         parameter.
65         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
66         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
67         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
68         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
69         <all>: Do not set flags on the reused DECL node coming from an alias.
70         Set DECL_IGNORED_P on the DECL node built for subprograms if they
71         don't need debug info here...
72         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
73         (gigi): Adjust calls to create_subprog_decl.
74         (build_raise_check): Likewise.
75         (establish_gnat_vms_condition_handler): Likewise.
76         (Compilation_Unit_to_gnu): Likewise.
77         (gnat_to_gnu): Likewise.
78
79 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
80
81         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
82         (NO_REORDER_ADAFLAGS): New variable.
83         (EXTRA_GNATTOOLS): Always define.
84         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
85         Clean up and adjust list of files compiled with special options.
86         * gcc-interface/Make-lang.in: Likewise.
87         (ada/decl.o): Cosmetical change.
88         (ada/misc.o): Remove dependency on $(PLUGIN_H).
89
90 2011-04-20  Jim Meyering  <meyering@redhat.com>
91
92         * initialize.c (__gnat_initialize): Remove useless if-before-free.
93
94 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
95
96         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
97         $(CFLAGS) on the link line.
98
99 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
100
101         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
102         padded type built for the return type if it is unconstrained.
103
104 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
105
106         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
107
108 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
109
110         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
111         before calling TREE_CHAIN.
112         * gcc-interface/misc.c (gnat_init_ts): New function.
113         (LANG_HOOKS_INIT_TS): Define.
114
115 2011-04-12  Martin Jambor  <mjambor@suse.cz>
116
117         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
118         instead of cgraph_node.
119
120 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
121
122         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
123         alignment on fields of the RETURN type built for the Copy-In Copy-Out
124         mechanism.
125
126 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
127
128         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
129         of aggregate types that contain a placeholder.
130
131 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
132
133         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
134         TYPE_ARG_TYPES.
135         (handle_type_generic_attribute): Likewise.
136
137 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
138
139         PR ada/47163
140         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
141
142 2011-04-04  Kai Tietz  <ktietz@redhat.com>
143
144         PR ada/47163
145         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows
146         targets to flag value.
147
148 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
149
150         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
151         type case, do not strip a padding type around the array type.
152
153 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
154
155         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
156         types.
157
158 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
159
160         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
161         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
162         code for -feliminate-unused-debug-types.
163         (gnat_post_options): Likewise.
164
165 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
166
167         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
168         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
169         distinct copy.
170
171 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
172
173         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
174         DECL_ARTIFICIAL flag on enumeration types.
175
176 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
177
178         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
179         fat pointer types artificial unconditionally.
180         <E_Array_Subtype>: Attach the base array type as a parallel type if it
181         isn't artificial.
182
183 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
184
185         * gcc-interface/gigi.h (get_dummy_type): Declare.
186         (build_dummy_unc_pointer_types): Likewise.
187         (finish_fat_pointer_type): Likewise.
188         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
189         fat pointer type has been built, complete it in place.
190         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
191         and thin pointers.  Remove useless variable.
192         (finish_fat_pointer_type): Make global and move to...
193         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
194         (get_dummy_type): New function.
195         (build_dummy_unc_pointer_types): Likewise.
196         (gnat_pushdecl): Propage the name to the anonymous variants only.
197         (update_pointer_to): Only adjust the pointer types in the unconstrained
198         array case.
199
200 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
201
202         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
203         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
204         if this is a Taft amendment type and the full declaration is available.
205         * gcc-interface/trans.c (process_type): Likewise.
206         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
207         (process_freeze_entity): Likewise.
208         * gcc-interface/utils.c (dummy_global): New static variable.
209         (gnat_write_global_declarations): If there are types declared as used
210         at the global level, insert them in the global hash table.
211
212 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
213
214         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
215         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
216         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
217         copy.
218         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
219         flag of the type accordingly.
220         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
221
222 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
223
224         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
225         finalizing types when updating the pointers to the designated type.
226         <all>: Finalize the deferred types even if we didn't defer processing
227         of incomplete types in this invocation.
228
229 2011-04-01  Olivier Hainque  <hainque@adacore.com>
230             Nicolas Setton  <setton@adacore.com>
231             Eric Botcazou  <ebotcazou@adacore.com>
232
233         * gcc-interface/misc.c (gnat_descriptive_type): New function.
234         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
235
236 2011-03-28  Kai Tietz  <ktietz@redhat.com>
237
238         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
239         Windows targets.
240         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
241         * system-mingw.ads (System): Change ZCX_By_Default default to True.
242
243         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
244
245 2011-03-28  Tristan Gingold  <gingold@adacore.com>
246
247         PR ada/44431
248         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
249         Use ada output of gnatbind.
250         (ada/b_gnatb.adb): Ditto.
251         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
252         (ada.mostlyclean, ada.stage1)
253         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
254         (ada.stagefeedback): Adjust.
255         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
256         Use ada output of gnatbind.
257         (b_gnatm.adb): Ditto.
258         (b_gnatl.o, b_gnatm.o): New rules.
259
260 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
261
262         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
263         for the padded type built to support a specified size or alignment.
264
265 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
266
267         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
268         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
269         unconditionally to the end of the unit when the designated type is
270         limited_with'ed.
271         <all>: Rename local variable.  Attempt to un-defer types only and do it
272         for limited_with'ed types as well.
273         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
274         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
275         consistently and remove redundant call to finalize_from_with_types.
276
277 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
278
279         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
280         subprograms without a previous spec declared in the same unit.
281         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
282         subprograms at the end of the unit instead of at the beginning.
283         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
284         isn't public for the special handling of non-inline functions nested
285         inside inline external functions.
286
287 2011-03-25  Jeff Law  <law@redhat.com>
288
289         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
290
291 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
292
293         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
294         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
295         to compute Set_Size_Depends_On_Discriminant.
296         (Layout_Type): Call it on array types in back-end layout mode.
297         * sem_util.adb (Requires_Transient_Scope): Return true for array
298         types only if the size depends on the value of discriminants.
299         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
300         type if the RHS is a call to a function that returns an unconstrained
301         type with default discriminant.
302
303 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
304
305         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
306         non-conversion to the nominal result type at the end.
307
308 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
309
310         * gcc-interface/trans.c (create_temporary): New function taken from...
311         (create_init_temporary): ...here.  Call it.
312         (call_to_gnu): Create the temporary for the return value early, if any.
313         Create it for a function with copy-in/copy-out parameters if there is
314         no target; in other cases of copy-in/copy-out, use another temporary.
315         Push the new binding level lazily.  Add and rename local variables.
316
317 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
318
319         * gcc-interface/decl.c (validate_size): Improve comments and tweak
320         error message.
321         (set_rm_size): Likewise.
322
323 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
324
325         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
326         for the padded type built in order to support a specified alignment.
327         Fix incorrect formatting.
328
329 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
330
331         PR bootstrap/48216
332         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
333
334 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
335
336         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
337         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
338         to the end of the list.  Adjust recursive call.  Rename local variable.
339         If REORDER is true, reorder components of the record type.
340         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
341         components_to_record and adjust the parameter list.
342
343 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
344
345         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
346         disabled, use the variable for bounds of loop iteration scheme.
347
348 2011-03-21  Kai Tietz  <ktietz@redhat.com>
349
350         PR target/12171
351         * gcc-interface/utils.c (gnat_internal_attribute_table): Add new column
352
353 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
354
355         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
356         out whether the expression is read-only.  Short-circuit placeholder
357         case and rename a couple of local variables.
358
359 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
360
361         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
362         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
363         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
364         (convert): Deal with conversions from a smaller form type specially.
365
366 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
367
368         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
369         its argument, except for the special -I- switch.
370
371 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
372
373         * gnat_ugn.texi (Compiling Different Versions of Ada): Update
374         link to "Ada Issues".
375
376 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
377
378         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
379
380 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
381
382         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
383         GNAT_FORMAL.
384         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
385         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
386         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
387         Do not generate the check directly, instead instantiate the template
388         check present in the descriptor.
389         (make_descriptor_field): Move around.
390         (build_vms_descriptor32): Build a template check in the POINTER field.
391         (build_vms_descriptor): Remove useless suffixes.
392         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
393
394 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
395
396         PR bootstrap/47467
397         * targext.c: Include target files if IN_RTS is defined.
398
399 2011-01-26  Richard Guenther  <rguenther@suse.de>
400
401         PR bootstrap/47467
402         * targext.c: Include config.h.
403         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
404         dependency.
405
406 2011-01-04  Pascal Obry  <obry@adacore.com>
407             Eric Botcazou  <ebotcazou@adacore.com>
408
409         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
410
411 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
412
413         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
414         end-of-case on the end label and its associated gotos, if any.
415
416 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
417
418         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
419         expressions of the parameter cache within the statement group of
420         the CICO mechanism.
421
422 2011-01-04  Olivier Hainque  <hainque@adacore.com>
423             Eric Botcazou  <ebotcazou@adacore.com>
424
425         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
426         (set_end_locus_from_node): New function.
427         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
428         make and the function end_locus.
429         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
430         for the elaboration subprogram.
431         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
432         set the end_locus of the expression as well.
433
434 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
435
436         PR ada/47131
437         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
438         variables that are referenced in exception handlers volatile.
439
440
441 \f
442 Copyright (C) 2011 Free Software Foundation, Inc.
443
444 Copying and distribution of this file, with or without modification,
445 are permitted in any medium without royalty provided the copyright
446 notice and this notice are preserved.