]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[Ada] Compiler abort on use of Invalid_Value on numeric positive subtype
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
7362896b 12019-07-01 Ed Schonberg <schonberg@adacore.com>
2
3 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
4 Resolve result of call to Get_Simple_Init_Val, which may be a
5 conversion of a literal.
6
0dae8dc2 72019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
8
9 * freeze.adb (Freeze_Expression): Remove the horrible useless
10 name hiding of N. Insert the freeze nodes generated by the
11 expression prior to the expression when the nearest enclosing
12 scope is transient.
13
487da8ff 142019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
15
16 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
17 formatting issues in the -gnatR section.
18 * gnat_ugn.texi: Regenerate.
19
1d79fa18 202019-06-30 Iain Sandoe <iain@sandoe.co.uk>
21
22 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
23 Push -shared-libgcc explicitly, when it is the target default (unless
24 overidden by the static flag).
25 When the user has put an instance of shared/static-libgcc do not push
26 a duplicate of this.
27
a850edcd 282019-06-29 Eric Botcazou <ebotcazou@adacore.com>
29
30 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
31 and tweak comment on the assertion about the scopes of Itypes. Do not
32 skip the regular processing for Itypes that are E_Record_Subtype with
33 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
34 if the type is dummy and hasn't got its own freeze node.
35 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
36 <E_Access_Subtype>: Save again the DECL of the equivalent type.
37 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
38
b1e46fb1 392019-06-29 Eric Botcazou <ebotcazou@adacore.com>
40
41 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
42 dereferences when padding to have the same size on both sides. Do it
43 for destination types with self-referential size too.
44
07e38949 452019-06-29 Eric Botcazou <ebotcazou@adacore.com>
46
47 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
48 type requires strict alignment, then set the RM size to the type size.
49 Rework handling of alignment and sizes of tagged types in ASIS mode.
50 (validate_size): Rename local variable and remove special handling for
51 strict-alignment types.
52 * gcc-interface/utils.c (finish_record_type): Constify local variables
53 and use properly typed constants.
54
f4409741 552019-06-29 Eric Botcazou <ebotcazou@adacore.com>
56
57 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
58 fields requiring strict alignment, add explicit test on Storage_Unit
59 for position and size, and mention type alignment for position.
60
5882c515 612019-06-29 Eric Botcazou <ebotcazou@adacore.com>
62
63 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
64 the main variant of a type, if any.
65
d0de0a27 662019-06-29 Eric Botcazou <ebotcazou@adacore.com>
67
68 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
69 missing guard for the presence of TYPE_CANONICAL.
70 (set_reverse_storage_order_on_array_type): Likewise.
71
2074c859 722019-06-29 Eric Botcazou <ebotcazou@adacore.com>
73
74 * gcc-interface/gigi.h (make_packable_type): Remove default value.
75 (value_factor_p): Tweak prototype.
76 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
77 (gnat_to_gnu_component_type): Likewise.
78 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
79 and simplify the condition under which the type is packed. Declare
80 local variable is_bitfield. Pass 1 as max_align to make_packable_type
81 if it is set to true.
82 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
83 * gcc-interface/utils.c (make_packable_array_type): New function.
84 (make_packable_type): Use it to rewrite the type of array field.
85 (maybe_pad_type): Pass align parameter to make_packable_type.
86 (create_field_decl): Minor tweaks.
87 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
88 modulo computation by a masking operation.
89
83c6da22 902019-06-25 Eric Botcazou <ebotcazou@adacore.com>
91
92 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
93 in previous change.
94 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
95 (maybe_character_value): Likewise.
96
aaabc7bc 972019-06-24 Jan Hubicka <jh@suse.cz>
98
99 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
100 type is array or integer prior checking string flag.
83c6da22 101 * gcc-interface/gigi.h (maybe_character_type): Likewise.
102 (maybe_character_value): Likewise.
aaabc7bc 103
5fe09a56 1042019-06-24 Martin Sebor <msebor@redhat.com>
105
106 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
107 name.
108
bd9331d6 1092019-06-18 Arnaud Charlet <charlet@adacore.com>
110
83c6da22 111 PR ada/80590
bd9331d6 112 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
113 during normal processing.
114
8a5a7d1c 1152019-06-17 Arnaud Charlet <charlet@adacore.com>
116
83c6da22 117 PR ada/80590
8a5a7d1c 118 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
119 conditions to avoid a unnecessary exception propagation in the default
120 case.
121
580934f6 1222019-05-28 Eric Botcazou <ebotcazou@adacore.com>
123
124 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
125
c8956236 1262019-05-28 Eric Botcazou <ebotcazou@adacore.com>
127
128 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
129 Document additional optional parameters.
130 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
131 more than one optional parameter.
132 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
133 the list of supported pragmas. Simplify the handling of parameters
134 and add support for more than one optional parameter.
135 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
136 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
137 used, cold, hot, target and target_clones.
138 (begin_subprog_body): Do not create the RTL for the subprogram here.
139 (handle_noicf_attribute): New static function.
140 (handle_noipa_attribute): Likewise.
141 (handle_flatten_attribute): Likewise.
142 (handle_used_attribute): Likewise.
143 (handle_cold_attribute): Likewise.
144 (handle_hot_attribute): Likewise.
145 (handle_target_attribute): Likewise.
146 (handle_target_clones_attribute): Likewise.
147
62b762c2 1482019-05-28 Eric Botcazou <ebotcazou@adacore.com>
149
150 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
151 for 'Size too.
152 (Identifier_to_gnu): Use the actual subtype for a reference to a
153 packed array in a return statement.
154 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
155 the prefix in every case.
156
336a61a3 1572019-05-28 Eric Botcazou <ebotcazou@adacore.com>
158
159 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
160 Backend_Overflow_Checks_On_Target and rework comments.
161
983c5b5e 1622019-05-28 Eric Botcazou <ebotcazou@adacore.com>
163
164 * gcc-interface/trans.c (walk_nesting_tree): New static function.
165 (finalize_nrv): Use it to walk the entire nesting tree.
166
96b4b84e 1672019-05-28 Eric Botcazou <ebotcazou@adacore.com>
168
169 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
170 obsolete test on Is_For_Access_Subtype.
171
0b74284e 1722019-05-28 Eric Botcazou <ebotcazou@adacore.com>
173
174 * gcc-interface/decl.c (components_to_record): Set a name on the type
175 created for the REP part, if any.
176 * gcc-interface/utils.c (finish_record_type): Only take the maximum
177 when merging sizes for a variant part at offset 0.
178 (merge_sizes): Rename has_rep parameter into max.
179
689dab9d 1802019-05-28 Eric Botcazou <ebotcazou@adacore.com>
181
182 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
183 for stack_protect attribute.
184 (handle_stack_protect_attribute): New static function.
185
804f7d39 1862019-05-28 Eric Botcazou <ebotcazou@adacore.com>
187
188 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
189 false if the internal builtin uses a variable list.
190
f07f94cc 1912019-05-27 Eric Botcazou <ebotcazou@adacore.com>
192
193 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
194 created out of addressability concerns if it's for the _Init parameter
195 of an initialization procedure.
196
abfd658b 1972019-05-27 Eric Botcazou <ebotcazou@adacore.com>
198
199 * gcc-interface/ada-builtin-types.def: New file.
200 * gcc-interface/ada-builtins.def: Likewise.
201 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
202 (BUILT_IN_UNLIKELY): Likewise.
203 * gcc-interface/trans.c (independent_iterations_p): Initialize the
204 auto-vector to 16 elements.
205 (Call_to_gnu): Remove local variable and change the vector of actual
206 parameters to an auto-vector. Do not convert actual parameters to
207 the argument type for front-end built-in functions. Add support for
208 front-end built-in functions.
209 (build_noreturn_cond): Use internal instead of built-in function.
210 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
211 (install_builtin_function_types): Likewise.
212 (install_builtin_functions): Include ada-builtins.def first.
213
caab73a2 2142019-05-27 Eric Botcazou <ebotcazou@adacore.com>
215
216 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
217 specific case of component types preferably.
218
f1ca2388 2192019-05-27 Eric Botcazou <ebotcazou@adacore.com>
220
221 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
222 (gnat_to_gnu): Do not convert the result if it is a reference to an
223 unconstrained array used as the prefix of an attribute reference that
224 requires an lvalue.
225
e3f3573c 2262019-05-27 Eric Botcazou <ebotcazou@adacore.com>
227
228 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
229 (Identifier_to_gnu): Use it to assert that the type of the identifier
230 and that of its entity are compatible for gigi. Rename a couple of
231 local variables and separate the processing of the result type.
232
2306cd17 2332019-05-27 Eric Botcazou <ebotcazou@adacore.com>
234
235 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
236 putting back an intermediate conversion the type of the actuals.
237
6e4e9378 2382019-05-27 Eric Botcazou <ebotcazou@adacore.com>
239
240 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
241 count to the unsigned version of its base type before proceeding.
242
85b9be9b 2432019-05-16 Martin Sebor <msebor@redhat.com>
244
3d6be0d5 245 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
246 reserved names.
85b9be9b 247
65d973ca 2482019-05-08 Arnaud Charlet <charlet@adacore.com>
249
250 * standard.ads.h: New file.
251
ff628b99 2522019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
253
254 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
255 Honor DESTDIR.
256
ebd761d4 2572019-04-29 Michael K. Darling <darlingm@gmail.com>
258
259 * gnatvsn.ads: Bump Library_Version to 10.
260
5f260823 2612019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
262 Bernd Edlinger <bernd.edlinger@hotmail.de>
263 Jakub Jelinek <jakub@redhat.com>
264
265 PR target/89093
266 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
267 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
268 TARGET_ATTRIBUTE.
269
d7ca95c0 2702019-04-07 Eric Botcazou <ebotcazou@adacore.com>
271
272 * libgnat/i-cexten.ads (CFloat_128): New type.
273
26b21081 2742019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
275
276 PR ada/89583
277 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
278 Send_Socket): Fix the computation of structure lengths passed to
279 low level routines.
280 (Is_IPv6_Address): Fix the number of expected colons.
281
2f6d557f 2822019-03-11 Martin Liska <mliska@suse.cz>
283
d325ee67 284 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
285 format message and fix GNU coding style.
2f6d557f 286
c1ad6672 2872019-02-08 Eric Botcazou <ebotcazou@adacore.com>
288
289 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
290 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
291 conversion here. Use TREE_CONSTANT throughout the function.
292 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
293 destination is a more aligned array type or a larger aggregate type,
294 but not between original and packable versions of a type.
295
62a6ebbd 2962019-02-08 Eric Botcazou <ebotcazou@adacore.com>
297
298 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
299 operand with VOID_TYPE.
300
da383d19 3012019-02-08 Eric Botcazou <ebotcazou@adacore.com>
302
303 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
304 entities of a package renaming another one.
305
09c123a0 3062019-02-08 Eric Botcazou <ebotcazou@adacore.com>
307
308 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
309 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
310 with test on global optimize switch.
311 (Raise_Error_to_gnu): Likewise.
312
a9dd7273 3132019-02-07 Eric Botcazou <ebotcazou@adacore.com>
314
315 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
316
4836c4f1 3172019-02-06 Arnaud Charlet <charlet@adacore.com>
318
319 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
320
6b56937c 3212019-01-27 Eric Botcazou <ebotcazou@adacore.com>
322
323 * repinfo.adb (List_Component_Layout): Remove superfluous space for
324 zero-sized field.
325 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
326 * gcc-interface/gigi.h (create_extra_subtype): Declare.
327 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
328 (update_n_elem): New function.
329 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
330 instead of doing it manually.
331 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
332 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
333 of the array to the maximum size.
334 <E_Array_Subtype>: Create an extra subtype using the index type of the
335 base array type for self-referential bounds. Use update_n_elem to
336 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
337 maximum size.
338 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
339 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
340 the base type for an extra subtype.
341 (gnat_type_max_size): Remove obsolete code.
342 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
343 (can_be_lower_p): Deal with pathological types.
344 * gcc-interface/utils.c (create_extra_subtype): New function.
345 (create_field_decl): Minor tweak.
346 (max_size) <tcc_reference>: Compute a better value by using the extra
347 subtypes on the self-referential bounds.
348 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
349 <tcc_expression>: Likewise.
350 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
351 of the arrays upfront. Swap only if the second length is not constant.
352 Use comparisons on the original bounds consistently for the null tests.
353 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
354 (build_allocator): Minor tweak.
355
ecb2c722 3562019-01-27 Eric Botcazou <ebotcazou@adacore.com>
357
358 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
359 the same value for every dimension of a multidimensional array type.
360
10f25579 3612019-01-26 Eric Botcazou <ebotcazou@adacore.com>
362
363 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
364 iteration scheme, if present, throughout the translation.
365
aced6683 3662019-01-26 Eric Botcazou <ebotcazou@adacore.com>
367
368 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
369 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
370 by a call to memset if the LHS is a DECL.
371
18b4b30e 3722019-01-26 Eric Botcazou <ebotcazou@adacore.com>
373
374 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
375 (Loop_Statement_to_gnu): Do not set it.
376
6dce35b7 3772019-01-26 Eric Botcazou <ebotcazou@adacore.com>
378
379 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
380 (Acc_gnat_to_gnu): Likewise.
381 (Acc_Data_to_gnu): Likewise.
382 (Acc_Var_to_gnu): Likewise.
383 (Acc_Reduc_to_gnu): Likewise.
384 (Acc_Size_List_to_gnu): Likewise.
385 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
386 <Pragma_Acc_Data>): Likewise.
387 (find_loop_for): Remove default value for parameters.
388 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
389 <N_Op_Eq>): ...this.
390
f8cd11ee 3912019-01-26 Eric Botcazou <ebotcazou@adacore.com>
392
393 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
394 the sign bit instead of on the sign of the value.
395 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
396 <MULT_EXPR>: Add test for degenerate case.
397 <BIT_AND_EXPR>: Simplify.
398
9a3c51d9 3992019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
400
401 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
402
07c11f2b 4032019-01-09 Sandra Loosemore <sandra@codesourcery.com>
404
405 PR other/16615
07c11f2b 406 * exp_ch11.adb: Change "can not" to "cannot".
407 * sem_ch4.adb: Likewise.
408
f4d3c071 4092019-01-09 Sandra Loosemore <sandra@codesourcery.com>
410
411 PR other/16615
f4d3c071 412 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
413 * libgnat/s-regpat.ads: Likewise.
414 * par-ch4.adb: Likewise.
415 * set_targ.adb: Likewise.
416 * types.ads: Likewise.
417
902071d1 4182019-01-08 Justin Squirek <squirek@adacore.com>
419
420 Revert:
902071d1 421 2018-07-31 Justin Squirek <squirek@adacore.com>
422
76fb0465 423 * lib-writ.adb (Write_With_Lines): Modfiy the generation
424 of dependencies within ali files so that source unit
425 bodies are properly listed even if said bodies are
426 missing. Perform legacy behavior in GNATprove mode.
427 * lib-writ.ads: Modify documentation to reflect current
428 behavior.
902071d1 429
430 and:
902071d1 431 2018-09-26 Justin Squirek <squirek@adacore.com>
432
76fb0465 433 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
434 documentation and an extra conditional check for RCI
435 units so that generated ali files will list the spec
436 only instead of a body when a body is not found.
902071d1 437
65a33d4a 4382019-01-04 Eric Botcazou <ebotcazou@adacore.com>
439
440 * gnatvsn.ads: Bump copyright year.
441
3d8932fd 4422019-01-01 Jakub Jelinek <jakub@redhat.com>
8e8f6434 443
fbd26352 444 Update copyright years.
445
277184bc 446 * gnat_ugn.texi: Bump @copying's copyright year.
447 * gnat_rm.texi: Likewise.
7dfbd804 448\f
3d8932fd 449Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 450
451Copying and distribution of this file, with or without modification,
452are permitted in any medium without royalty provided the copyright
453notice and this notice are preserved.