1 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
3 * libgnarl/a-intnam__rtems.ads: Update copyright date.
4 * libgnarl/s-interr__hwint.adb: Likewise.
5 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
6 * libgnarl/s-osinte__rtems.adb: Likewise.
7 * libgnarl/s-osinte__rtems.ads: Likewise.
9 2017-09-13 Nicolas Roche <roche@adacore.com>
11 * Make-lang.in: In the fallback mechanim, parse the associated .ali
12 file and try to guess the locations of dependencies.
14 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
16 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
17 the suppression status of Alignment_Check on the current scope.
18 (Alignment_Checks_Suppressed): New function to use the saved instead of
19 the current suppression status of Alignment_Check.
20 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
21 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
22 the table, call Register_Address_Clause_Check.
23 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
24 recorded address clause instead of its entity.
26 2017-09-13 Jerome Guitton <guitton@adacore.com>
28 * libgnarl/s-tpopsp__vxworks-tls.adb,
29 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
30 (Self): Register thread if task id is null.
32 2017-09-13 Arnaud Charlet <charlet@adacore.com>
34 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
36 2017-09-13 Arnaud Charlet <charlet@adacore.com>
38 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
39 from an entity to only scope index, as a mapping from an entity to the
40 same entity was useless.
41 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
43 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
45 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
46 variable, just use return statements.
48 2017-09-13 Arnaud Charlet <charlet@adacore.com>
50 * libgnarl/s-vxwext__kernel-smp.adb,
51 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
54 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
56 * einfo.adb: Flag42 is now Is_Controlled_Active.
57 (Is_Controlled): This attribute is now synthesized.
58 (Is_Controlled_Active): This attribute is now an explicit flag rather
59 than a synthesized attribute. (Set_Is_Controlled): Removed.
60 (Set_Is_Controlled_Active): New routine.
61 (Write_Entity_Flags): Update the output for Flag42.
62 * einfo.ads: Update the documentation of the following attributes:
63 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
64 and Is_Controlled_Active have swapped their functionality.
65 (Is_Controlled): Renamed to Is_Controlled_Active.
66 (Is_Controlled_Active): Renamed to Is_Controlled.
67 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
68 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
70 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
71 (Needs_Finalization): Code clean up. Remove the tests for
72 Disable_Controlled because a) they were incorrect as they would reject
73 a type which is sublect to the aspect, but may contain controlled
74 components, and b) they are no longer necessary.
75 * exp_util.ads (Needs_Finalization): Update comment on documentation.
76 * freeze.adb (Freeze_Array_Type): Restore the original use of
78 (Freeze_Record_Type): Restore the original use of Is_Controlled.
79 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
81 (Array_Type_Declaration): Restore the original use of Is_Controlled.
82 (Build_Derived_Private_Type): Restore the original use of
84 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
85 type derived from Ada.Finalization.[Limited_]Controlled.
86 (Build_Derived_Type): Restore the original use of Is_Controlled.
87 (Record_Type_Definition): Restore the original use of Is_Controlled.
88 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
90 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
91 (Analyze_Aspect_Specifications): Use routine
92 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
94 2017-09-13 Vincent Celier <celier@adacore.com>
96 * clean.adb (Gnatclean): Fix error when looking for target
99 2017-09-13 Javier Miranda <miranda@adacore.com>
100 Ed Schonberg <schonberg@adacore.com>
102 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
103 expanded name that designates the current instance of a child unit in
104 its own body and appears as the prefix of a reference to an entity
105 local to the child unit.
107 2017-09-12 Bob Duff <duff@adacore.com>
109 * sem_warn.adb: Minor comment.
111 2017-09-12 Bob Duff <duff@adacore.com>
113 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
114 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
115 be Default_Initialized_Item, and apply pragma Unmodified to it,
116 to suppress the warning.
118 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
120 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
123 2017-09-12 Yannick Moy <moy@adacore.com>
125 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
126 together with Global when ignoring one in CodePeer mode.
128 2017-09-12 Javier Miranda <miranda@adacore.com>
130 * sem_ch3.adb (Analyze_Declarations): In nested
131 package declarations that have a private part enable missing check
132 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
133 resolved at the end of the immediately enclosing declaration list.
135 2017-09-12 Bob Duff <duff@adacore.com>
137 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
140 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
142 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
143 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
145 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
146 in preparation for the evolution of the SPARK language that
147 includes a pointer analysis for checking non-aliasing of access
148 types. The Check_Safe_Pointers function is the entry point, and
149 will traverse the AST and raise compile-time errors everytime
150 it detects non-begign aliasing. Detailed comments are present
151 in the sem_spark.ads file.
152 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
153 functions to iterate over the list of globals of a subprogram.
154 * libgnat/system.ads: Add restriction No_Finalization.
155 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
156 dependency on g-dynhta.adb.
158 2017-09-12 Bob Duff <duff@adacore.com>
160 * sem_ch6.adb (Analyze_Expression_Function): Call
161 Check_Dynamically_Tagged_Expression.
162 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
163 "and then Is_Tagged_Type (Typ)" because there is an earlier
164 "Assert (Is_Tagged_Type (Typ))".
166 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
168 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
170 2017-09-11 Arnaud Charlet <charlet@adacore.com>
172 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
173 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
174 for no longer supported platforms.
175 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
176 description of the semantics for dimensionality analysis.
177 * gnat_ugn.texi: Regenerated.
179 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
181 * freeze.adb (Has_Incomplete_Compoent): Delete.
183 Do not inhibit the freezing of the profile of an expression
185 (Freeze_Subprogram): Do not re-create extra formals.
186 * sem_ch6.adb (Analyze_Expression_Function): Always
187 pre-analyze the expression if the function is not a completion.
188 (Analyze_Subprogram_Body_Helper): For the body generated
189 from an expression function that is not a completion, do
190 not freeze the profile and temporary mask the types declared
191 outside the expression that are not yet frozen.
192 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
193 during the pre-analysis of an expression function.
195 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
197 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
200 2017-09-11 Yannick Moy <moy@adacore.com>
202 * lib-xref-spark_specific.adb: Minor rewrite.
204 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
206 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
207 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
208 renaming into account.
210 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
212 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
213 * gcc-interface/Makefile.in: Take this renaming into account.
215 2017-09-11 Arnaud Charlet <charlet@adacore.com>
217 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
220 2017-09-11 Yannick Moy <moy@adacore.com>
222 * sem_util.adb (Check_Result_And_Post_State):
223 Do not issue a warning about missing reference to an outcome if
224 the subprogram is ghost and has no outputs.
225 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
228 2017-09-11 Yannick Moy <moy@adacore.com>
230 * gnat1drv.adb (Adjust_Global_Switches): Set
231 Check_Validity_Of_Parameters to False in GNATprove mode.
232 * opt.ads (Check_Validity_Of_Parameters): Document switch to
235 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
237 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
238 generate debug info for inner record types if -fgnat-encodings=minimal.
239 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
240 type as the debug type.
242 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
244 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
245 packed record types if pragma Optimize_Alignment (Space) is enabled.
247 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
249 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
250 limits for expression functions.
251 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
253 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
255 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
256 layout of the record from the parent type only if both are or are not
258 (is_stored_discriminant): Return false for an unchecked union.
260 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
262 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
265 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
267 * gcc-interface/decl.c (promote_object_alignment): New function taken
269 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
270 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
271 create a padding type on success before doing the atomic check.
273 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
275 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
276 promotion to static memory earlier in the processing.
278 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
280 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
281 and TYPE_BY_REFERENCE_P flags on types after various promotions.
282 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
283 Consider all kinds of entities.
285 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
287 * gcc-interface/utils.c (convert): When converting to a padding type,
288 reuse an existing CONSTRUCTOR if it has got the right size.
290 2017-09-08 Nicolas Roche <roche@adacore.com>
292 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
294 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
295 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
296 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
297 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
298 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
299 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
300 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
301 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
302 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
303 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
304 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
305 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
306 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
307 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
308 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
309 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
310 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
311 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
312 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
313 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
314 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
315 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
316 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
317 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
318 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
319 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
320 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
321 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
322 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
323 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
324 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
325 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
326 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
327 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
328 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
329 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
330 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
331 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
332 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
333 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
334 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
335 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
336 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
337 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
338 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
339 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
340 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
341 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
342 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
343 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
344 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
345 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
346 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
347 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
348 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
349 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
350 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
351 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
352 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
353 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
354 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
355 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
356 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
357 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
358 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
359 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
360 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
361 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
362 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
363 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
364 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
365 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
366 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
367 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
368 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
369 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
370 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
371 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
372 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
373 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
374 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
375 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
376 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
377 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
378 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
379 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
380 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
381 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
382 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
383 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
384 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
385 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
386 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
387 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
388 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
389 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
390 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
391 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
392 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
393 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
394 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
395 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
396 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
397 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
398 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
399 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
400 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
401 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
402 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
403 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
404 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
405 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
406 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
407 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
408 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
409 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
410 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
411 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
412 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
413 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
414 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
415 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
416 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
417 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
418 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
419 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
420 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
421 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
422 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
423 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
424 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
425 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
426 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
427 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
428 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
429 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
430 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
431 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
432 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
433 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
434 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
435 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
436 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
437 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
438 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
439 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
440 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
441 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
442 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
443 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
444 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
445 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
446 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
447 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
448 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
449 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
450 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
451 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
452 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
453 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
454 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
455 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
456 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
457 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
458 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
459 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
460 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
461 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
462 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
463 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
464 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
465 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
466 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
467 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
468 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
469 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
470 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
471 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
472 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
473 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
474 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
475 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
476 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
477 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
478 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
479 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
480 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
481 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
482 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
483 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
484 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
485 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
486 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
487 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
488 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
489 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
490 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
491 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
492 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
493 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
494 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
495 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
496 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
497 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
498 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
499 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
500 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
501 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
502 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
503 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
504 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
505 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
506 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
507 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
508 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
509 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
510 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
511 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
512 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
513 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
514 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
515 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
516 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
517 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
518 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
519 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
520 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
521 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
522 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
523 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
524 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
525 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
526 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
527 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
528 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
529 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
530 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
531 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
532 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
533 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
534 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
535 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
536 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
537 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
538 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
539 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
540 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
541 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
542 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
543 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
544 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
545 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
546 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
547 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
548 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
549 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
550 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
551 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
552 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
553 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
554 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
555 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
556 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
557 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
558 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
559 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
560 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
561 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
562 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
563 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
564 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
565 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
566 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
567 to libgnat subdirectory.
569 2017-09-08 Yannick Moy <moy@adacore.com>
571 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
572 return the entity associated with the call.
573 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
574 Replace the internal Get_Function_Id with the new
575 Sem_Aux.Get_Called_Entity.
576 (Iterate_Call_Parameters): New
577 procedure to iterate on formals and actuals at the same time.
578 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
579 Set SPARK_Mode from spec when set, for analysis
580 of instance. Restore after analysis of instance.
581 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
582 set, for analysis of body instance. Restored automatically at
583 the end of the subprogram.
584 * gnat1drv.adb (Adjust_Global_Switches): Set
585 Check_Validity_Of_Parameters to False in GNATprove mode.
586 * opt.ads (Check_Validity_Of_Parameters): Document switch to
589 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
591 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
592 (New_Copy_Tree): ...there. Reset the hash tables only if they
593 were used in the previous invocation.
594 * s-htable.adb: Fix typo.
596 2017-09-08 Bob Duff <duff@adacore.com>
598 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
600 2017-09-08 Arnaud Charlet <charlet@adacore.com>
602 * sem_aggr.adb: minor style fix.
604 2017-09-08 Bob Duff <duff@adacore.com>
606 * sprint.adb (Write_Corresponding_Source): Ignore if there is
607 no current source file.
608 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
609 Print something helpful in case N is invalid.
610 * sprint.ads: Minor comment fix.
612 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
614 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
617 2017-09-08 Bob Duff <duff@adacore.com>
619 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
620 Ada_2020, along the same lines as the other Ada version pragmas.
622 2017-09-08 Gary Dismukes <dismukes@adacore.com>
624 * sem_ch12.adb: Minor typo fixes and reformatting.
626 2017-09-08 Yannick Moy <moy@adacore.com>
628 * sem_aggr.adb (Resolve_Record_Aggregate):
629 Rewrite bounds of aggregate subexpressions which may depend on
630 discriminants of the enclosing aggregate.
632 2017-09-08 Yannick Moy <moy@adacore.com>
634 * sem_ch5.adb: Prevent assertion failure on illegal code.
636 2017-09-08 Yannick Moy <moy@adacore.com>
638 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
639 calling Renamed_Entity on an entity which cannot be a renaming.
641 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
643 * exp_aggr.adb: Add with & use clause for Urealp.
644 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
645 elementary types instead of just discrete types.
646 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
647 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
648 Be prepared for the FP zero value in the memset case. Add small
651 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
653 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
656 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
658 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
659 of New_Copy because the latter leaves the syntactic structure of
660 the tree inconsistent (a child is accessible through two parents)
661 and prevents proper replication of itypes by subsequent calls
663 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
664 New_Copy because the latter leaves the syntactic structure of the
665 tree inconsistent (a child is accessible through two parents)
666 and prevents proper replication of itypes by subsequent calls
668 * sem_util.adb (In_Subtree): New routine.
669 (New_Copy_Tree): Reimplemented.
670 * sem_util.ads (In_Subtree): New routine.
671 (New_Copy_Tree): Reimplemented.
673 2017-09-08 Ed Schonberg <schonberg@adacore.com>
675 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
676 for aspect Default_Value is a static scalar value, but it does
677 not freeze the type. Yhis allows for subsequent representation
678 clauses for the type.
680 2017-09-08 Javier Miranda <miranda@adacore.com>
682 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
683 not add entries into the undefined reference table when we are
684 compiling with errors ignored.
686 2017-09-08 Ed Schonberg <schonberg@adacore.com>
688 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
689 check if the instance is within an enclosing instance body. The
690 formal package was legal in the enclosing generic, and is
691 legal in the enclosing instantiation. This optimisation may be
692 applicable elsewhere, and it also removes spurious errors that
693 may arise with on-the-fly processing of instantiations that
694 contain Inline_Always subprograms.
696 2017-09-08 Vincent Celier <celier@adacore.com>
698 * gnatcmd.adb: Disregard empty argument of GNAT driver.
700 2017-09-08 Justin Squirek <squirek@adacore.com>
702 * checks.adb (Insert_Valid_Check): Manually decorate
703 the generated temporary for range valdity checks.
705 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
707 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
709 2017-09-08 Justin Squirek <squirek@adacore.com>
711 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
712 case to handle underscore flags.
713 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
714 new procedure to handle underscores.
716 2017-09-08 Javier Miranda <miranda@adacore.com>
718 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
719 divisions with fixed point results to avoid generating twice
720 the runtime check on divide by zero.
721 * checks.adb (Apply_Divide_Checks): Ensure that operands are
722 not evaluated twice (once for their runtime checks and once for
723 their regular computation).
725 2017-09-08 Yannick Moy <moy@adacore.com>
727 * sem_prag.adb (Analyze_Part_Of): Add missing
728 return statements after issuing errors. Add detection of
729 out-of-order item and single concurrent type.
731 2017-09-08 Nicolas Roche <roche@adacore.com>
733 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
734 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
735 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
736 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
737 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
738 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
739 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
740 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
741 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
742 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
743 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
744 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
745 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
746 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
747 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
748 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
749 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
750 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
751 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
752 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
753 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
754 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
755 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
756 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
757 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
758 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
759 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
760 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
761 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
762 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
763 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
764 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
765 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
766 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
767 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
768 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
769 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
770 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
771 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
772 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
773 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
774 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
775 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
776 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
777 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
778 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
779 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
780 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
781 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
782 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
783 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
784 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
785 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
786 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
788 2017-09-08 Arnaud Charlet <charlet@adacore.com>
790 * doc/share/conf.py, doc/share/latex_elements.py,
791 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
794 2017-09-08 Arnaud Charlet <charlet@adacore.com>
796 * gnat_rm.texi, gnat_ugn.texi,
797 doc/gnat_ugn/the_gnat_compilation_model.rst,
798 doc/gnat_ugn/getting_started_with_gnat.rst,
799 doc/gnat_ugn/inline_assembler.rst,
800 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
801 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
802 doc/gnat_ugn/about_this_guide.rst,
803 doc/gnat_ugn/platform_specific_information.rst,
804 doc/gnat_ugn/example_of_binder_output.rst,
805 doc/gnat_ugn/gnat_and_program_execution.rst,
806 doc/gnat_ugn/gnat_utility_programs.rst,
807 doc/gnat_rm/implementation_of_specific_ada_features.rst,
808 doc/gnat_rm/interfacing_to_other_languages.rst,
809 doc/gnat_rm/implementation_defined_aspects.rst,
810 doc/gnat_rm/intrinsic_subprograms.rst,
811 doc/gnat_rm/implementation_defined_characteristics.rst,
812 doc/gnat_rm/implementation_advice.rst,
813 doc/gnat_rm/implementation_defined_attributes.rst,
814 doc/gnat_rm/compatibility_and_porting_guide.rst,
815 doc/gnat_rm/standard_library_routines.rst,
816 doc/gnat_rm/the_gnat_library.rst,
817 doc/gnat_rm/implementation_defined_pragmas.rst,
818 doc/gnat_rm/representation_clauses_and_pragmas.rst,
819 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
820 doc/gnat_rm/obsolescent_features.rst,
821 doc/gnat_rm/about_this_guide.rst,
822 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
823 doc/gnat_rm/implementation_of_ada_2012_features.rst,
825 doc/gnat_rm.rst: Update documentation.
827 2017-09-08 Arnaud Charlet <charlet@adacore.com>
829 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
830 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
831 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
833 2017-09-08 Bob Duff <duff@adacore.com>
835 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
836 New routine to read the Tag robustly.
837 * exp_attr.adb (Input): Change the expansion of 'Input,
838 in the class-wide case, to call String_Input_Tag instead of
841 2017-09-08 Arnaud Charlet <charlet@adacore.com>
843 * s-rident.ads (Restriction_Id): reorder enum
844 literals, so that Pure_Barriers is no longer in range of the
845 Cunit_Boolean_Restrictions subtype.
847 2017-09-08 Nicolas Roche <roche@adacore.com>
849 * a-taster.ads, a-taster.adb: Move to libgnarl
850 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
851 Add support for files in libgnarl.
853 2017-09-08 Ed Schonberg <schonberg@adacore.com>
855 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
856 accessibility check to an interface conversion, whose purpose
857 is to perform a pointer adjustment in a dispatching call.
858 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
859 when the actual is a construct that involves a dereference of an
860 expression that includes a formal of the enclosing subprogram,
861 In such cases, the accessibility level of the actual is that of
862 the corresponding formal, which is passed in as an additional
863 actual in the outer call.
865 2017-09-08 Bob Duff <duff@adacore.com>
867 * exp_intr.adb (Add_Source_Info): Do not decode
868 file names; they were not encoded in the first place.
870 2017-09-08 Bob Duff <duff@adacore.com>
872 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
873 exceptions instead of crashes. Check for absurdly long strings
874 and empty strings. Empty strings cause trouble because they can
875 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
876 be empty, which causes an array index out of bounds.
877 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
880 2017-09-08 Arnaud Charlet <charlet@adacore.com>
882 * sem_util.adb (Is_CCT_Instance): allow use in
883 the context of protected types.
885 2017-09-08 Arnaud Charlet <charlet@adacore.com>
887 * a-tigeli.adb: minor remove extra whitespace.
889 2017-09-08 Gary Dismukes <dismukes@adacore.com>
891 * par-ch4.adb: Reformatting of an error message.
893 2017-09-08 Javier Miranda <miranda@adacore.com>
895 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
896 identifiers to ensure their correct decoration of names on
899 2017-09-08 Yannick Moy <moy@adacore.com>
901 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
902 not skip a loop coming from source which is rewritten into a loop.
904 2017-09-08 Ed Schonberg <schonberg@adacore.com>
906 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
907 wrapper has convention Ada, to prevent spurious warnings on
908 unconstrained array parameters.
910 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
912 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
913 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
915 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
917 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
919 2017-09-08 Arnaud Charlet <charlet@adacore.com>
921 * exp_intr.adb (Append_Entity_Name): Move to ...
922 * sem_util.ads, sem_util.adb: ... here to share it.
923 (Subprogram_Name): New subprogram, to compute the name of the enclosing
925 * errutil.adb (Error_Msg): Fill new field Node.
926 * erroutc.ads (Subprogram_Name_Ptr): New.
927 (Error_Msg_Object): New field Node.
928 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
929 * errout.adb (Error_Msg): New variant with node id parameter.
930 Fill new parameter Node when emitting messages. Revert previous
931 changes for Include_Subprogram_In_Messages.
932 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
933 generating warning message.
935 2017-09-08 Ed Schonberg <schonberg@adacore.com>
937 * par-ch4.adb (P_Iterated_Component_Association): Place construct
938 under -gnat2020 flag, given that it is a future feature of
940 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
941 defining identifier as referenced to prevent spurious warnings:
942 corresponding loop is expanded into one or more loops whose
943 variable has the same name, and the expression uses those names
944 and not the original one.
946 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
948 * sem_elab.adb (Check_A_Call): Do not consider
949 references to internal variables for SPARK semantics.
951 2017-09-08 Arnaud Charlet <charlet@adacore.com>
953 * inline.adb (In_Package_Spec): refine type of
954 the parameter from Node_Id to Entity_Id.
956 2017-09-08 Justin Squirek <squirek@adacore.com>
958 * exp_ch5.adb (Expand_Formal_Container_Loop):
959 Reset the scope of the loop parameter after it is reanalyzed.
961 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
963 * sem_util.ads (Set_Rep_Info): New inline procedure.
964 * sem_util.adb (Set_Rep_Info): Implement it.
965 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
966 always copy the representation aspects onto the subtype.
968 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
970 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
971 Correction of the return type from access type to option type.
972 (Simple_HTable): Moving the Instance_Data to ads file.
974 2017-09-08 Yannick Moy <moy@adacore.com>
976 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
978 2017-09-08 Arnaud Charlet <charlet@adacore.com>
980 * opt.ads (Include_Subprogram_In_Messages): New variable.
981 * errout.ads (Current_Subprogram_Ptr): New variable.
982 * errout.adb (Error_Msg): Prepend current subprogram info
983 in messages if Include_Subprogram_In_Messages is set.
984 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
986 * gnat1drv.adb (Adjust_Global_Switches): Set
987 Include_Subprogram_In_Messages when -gnatdJ is set.
988 * debug.adb: Document and reserve -gnatdJ.
990 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
992 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
993 functions to iterate over simple hastables.
994 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
996 2017-09-08 Javier Miranda <miranda@adacore.com>
998 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
999 missing checks on the presence of Entity() before checking the
1002 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1004 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
1005 statements, use local variable and remove unnecessary processing.
1007 2017-09-08 Javier Miranda <miranda@adacore.com>
1009 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
1011 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
1012 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
1014 (Unqual_BIP_Iface_Function_Call): New subprogram.
1015 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
1016 subprogram containing code that was previously inside
1017 Make_Build_In_Place_Call_In_Object_Declaration since it is also
1018 required for one of the new subprograms.
1020 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
1021 (Expand_N_Extended_Return_Statement): Extend the
1022 cases covered by an assertion on expected BIP object
1024 (Make_Build_In_Place_Call_In_Assignment):
1025 Removing unused code; found working on this ticket.
1026 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
1027 that replaces the internal name of the renaming declaration
1028 into the new subprogram Replace_Renaming_Declaration_Id.
1029 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
1030 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
1032 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
1034 (Unqual_BIP_Iface_Function_Call): New subprogram.
1035 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
1036 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
1037 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
1038 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1039 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
1040 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
1041 (Expand_N_Indexed_Component): Invoke the new subprogram
1042 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1043 (Expand_N_Selected_Component): Invoke the new subprogram
1044 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1045 (Expand_N_Slice): Invoke the new subprogram
1046 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1047 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
1048 Invoke the new subprogram
1049 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1051 2017-09-08 Javier Miranda <miranda@adacore.com>
1053 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
1054 access to interface types. Remove also the accessibility check.
1056 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1058 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
1059 all the types that are referenced by the expression.
1060 (Analyze_Expression_Function): Call Freeze_Expr_Types for
1061 a completion instead of manually freezing the type of the
1063 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
1065 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1067 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
1068 New procedure, auxiliary to Expand_Pragma_Check, to handle
1069 references to the discriminants of a protected type within a
1070 precondition of a protected operation. This is needed because
1071 the original precondition has been analyzed in the context of
1072 the protected declaration, but in the body of the operation
1073 references to the discriminants have been replaved by references
1074 to the discriminants of the target object, and these references
1075 are only created when expanding the protected body.
1077 2017-09-08 Yannick Moy <moy@adacore.com>
1079 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
1082 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1084 * exp_attr.adb (Build_Record_VS_Func): If the record is an
1085 unchecked union, do not emit checks for its (non-existent)
1086 discriminants, or for variant parts that depend on them.
1088 2017-09-08 Justin Squirek <squirek@adacore.com>
1090 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
1091 Find_Comparison_Type.Try_One_Interp): Add check for generic
1094 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1096 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
1097 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
1098 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
1099 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
1100 remaining references to AAMP_On_Target.
1102 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1104 * style.adb: Fix typo.
1106 2017-09-08 Javier Miranda <miranda@adacore.com>
1108 * einfo.adb (Underlying_Type): Add missing support for class-wide
1109 types that come from the limited view.
1110 * exp_attr.adb (Attribute_Address): Check class-wide type
1111 interfaces using the underlying type to handle limited-withed
1113 (Attribute_Tag): Check class-wide type interfaces using
1114 the underlying type to handle limited-withed types.
1116 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1118 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
1119 over a subtype of a type with a static predicate, taking into
1120 account the predicate function of the parent type and the bounds
1121 given in the loop specification.
1122 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
1123 a loop specification that is a subtype indication whose type mark
1124 is a type with a static predicate, inherit predicate function,
1125 used to build case statement for rewritten loop.
1127 2017-09-08 Justin Squirek <squirek@adacore.com>
1129 * lib-load.adb: Modify printing of error message to exclude file
1132 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1134 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
1135 don't inline subprograms declared in both visible and private
1137 (In_Package_Spec): previously In_Package_Visible_Spec; now
1138 detects subprograms declared both in visible and private parts
1141 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1143 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
1144 the type is an anonymous array in an object declaration, whose
1145 component type has an invariant, use the object declaration
1146 as the insertion point for the invariant procedure, given that
1147 there is no explicit type declaration for an anonymous array type.
1149 2017-09-08 Bob Duff <duff@adacore.com>
1151 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
1153 2017-09-08 Bob Duff <duff@adacore.com>
1155 * a-strfix.adb (Trim): Compute Low and High only if needed.
1157 2017-09-08 Justin Squirek <squirek@adacore.com>
1159 * lib-load.adb (Load_Main_Source): Add error output in the case a
1160 source file is missing.
1162 2017-09-08 Bob Duff <duff@adacore.com>
1165 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
1166 Default_WCEM by default (i.e. if the encoding is not specified
1167 by the Form string).
1169 2017-09-08 Bob Duff <duff@adacore.com>
1171 * s-trasym.ads (Hexa_Traceback): If
1172 Suppress_Hex is True, print "..." instead of a hexadecimal
1174 * s-trasym.adb: Ignore No_Hex in this version.
1177 2017-09-08 Bob Duff <duff@adacore.com>
1179 * debug.adb: Minor reformatting.
1181 2017-09-08 Bob Duff <duff@adacore.com>
1183 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
1184 code so it doesn't trigger an "uninit var" warning.
1186 2017-09-08 Nicolas Roche <roche@adacore.com>
1188 * s-hibaen.ads: Remove obsolete file.
1190 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1192 * a-locale.ads: Add comment explaining the state of this package.
1194 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1196 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
1198 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
1199 allow calls in the context of package spec (for pragma
1200 Initializes) and bodies (for pragma Refined_State).
1202 2017-09-08 Bob Duff <duff@adacore.com>
1204 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
1207 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1209 * debug.adb (dA): Adjust comment.
1210 * gnat1drv.adb (Gnat1drv): Likewise.
1211 * opt.ads (List_Representation_Info_Extended): New variable.
1212 * repinfo.adb (List_Record_Info): Split implementation into...
1213 (Compute_Max_Length): ...this. Recurse on records if requested.
1214 (List_Record_Layout): Likewise.
1215 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
1216 statement, accept '0' and set List_Representation_Info_Extended
1218 * usage.adb (Usage): Document new -gnatRe variant.
1220 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1222 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1223 Do not save the given entity in the global variable Default_Pool
1224 if the pragma appears within a generic unit.
1226 2017-09-08 Bob Duff <duff@adacore.com>
1228 * errout.adb (Delete_Warning): Do not
1229 decrement Warnings_Treated_As_Errors. This is called before
1230 Warnings_Treated_As_Errors has been incremented to account for
1231 this warning. Decrementing it here can lead to negative values
1232 of Warnings_Treated_As_Errors, raising Constraint_Error in
1233 checks-on builds, and causing the compiler to return an error
1234 code in checks-off builds.
1236 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1238 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
1239 entities of named concurrent types as Ref_Id and not of anonymous
1240 concurrent objects (because callers already know when a conversion
1241 is necessary and can easily do it); also, do not expect protected
1242 types or protected objects as Context_Id (because no flow-related
1243 SPARK pragmas are attached there); reflect these changes in a
1244 more precise comment.
1246 2017-09-08 Olivier Hainque <hainque@adacore.com>
1248 * g-altive.ads: Add documentation.
1250 2017-09-08 Bob Duff <duff@adacore.com>
1252 * sem_util.ads, debug.adb: Minor comment fix.
1253 * erroutc.ads: Comment fix.
1255 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1257 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
1258 for compatibility of component types of formal and actual in an
1259 instantiation of a child unit, when the component type of the
1260 formal is itself a formal of an enclosing generic.
1262 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1264 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
1265 sem_prag.adb to make it available for GNATprove; for concurrent
1266 types replace custom scope climbing with Scope_Same_Or_Within; for
1267 single concurrent objects add scope climbing (with Scope_Within),
1268 which was not there (that's the primary semantic change of this
1269 commit); also, when comparing a single concurrent object with
1270 its corresponding concurrent type rely on equality of types,
1271 not of objects (because that's simpler to code).
1272 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
1273 (Analyze_Global_Item): adjust special-casing of references to the
1274 current instance of a concurrent unit in the Global contracts
1275 of task types and single tasks objects; similar for references
1276 in the protected operations and entries of protected types and
1277 single protected objects (in all these cases the current instance
1278 behaves as an implicit parameter and must not be mentioned in
1279 the Global contract).
1281 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1283 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
1284 function calls returning a record within a subprogram call,
1287 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1289 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
1290 name that designates the current instance of a child unit in its
1291 own body and appears as the prefix of a reference to an entity
1292 local to the child unit.
1293 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
1296 2017-09-08 Yannick Moy <moy@adacore.com>
1298 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
1301 2017-09-08 Tristan Gingold <gingold@adacore.com>
1303 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
1304 warnings on internal units in configurable run time mode.
1306 2017-09-08 Bob Duff <duff@adacore.com>
1308 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
1309 representation items from interfaces that the derived type
1310 implements, not just from the parent type.
1311 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
1312 this to return an empty list when there are no interfaces.
1313 * einfo.ads, sem_ch13.adb: Minor comment fixes.
1314 * sem_attr.adb: Minor comment fix.
1316 2017-09-08 Doug Rupp <rupp@adacore.com>
1318 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
1321 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1323 * exp_ch4.adb (Expand_N_Allocator): Generate a
1324 call to Allocate_Any_Controlled when the allocation does not
1325 require any initialization.
1327 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1329 * sem_util.adb (Copy_Node_With_Replacement):
1330 Update the Renamed_Object field of a replicated object renaming
1333 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
1335 * exp_ch9.adb (Is_Pure_Barrier): Allow type
1336 conversions and components of objects. Simplified the detection
1337 of the Count attribute by identifying the corresponding run-time
1340 2017-09-08 Yannick Moy <moy@adacore.com>
1342 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
1343 sem_type.adb, sinfo.ads: Minor reformatting.
1345 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1347 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
1348 of Freeze_Profile, used to inhibit the freezing of the profile
1349 of an expression function declared within a nested package, when
1350 some type in the profile depends on a private type declared in
1351 an enclosing package.
1353 2017-09-08 Bob Duff <duff@adacore.com>
1355 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
1356 the subunit case. It's still OK to set it in the "missing subunits"
1357 case, because that won't cause the obsolete .ali files that cause
1360 2017-09-08 Bob Duff <duff@adacore.com>
1362 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
1363 unclear why this didn't cause a warning.
1364 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
1365 pragmas. It's unclear why this didn't cause an error.
1367 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1369 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
1371 (Expand_SPARK_Potential_Renaming): Code clean up.
1372 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
1373 the item does not have a proper entity.
1374 (Analyze_Input_Item): Add a guard in case the item does not have a
1376 (Collect_States_And_Objects): Include object renamings in the
1377 items being collected.
1378 (Resolve_State): Update the documentation of this routine.
1379 * sem_util.adb (Entity_Of): Add circuitry to handle
1380 renamings of function results.
1381 (Remove_Entity): New routine.
1382 (Remove_Overloaded_Entity): Take advantage of factorization.
1383 * sem_util.ads (Entity_Of): Update the documentation
1385 (Remove_Entity): New routine.
1386 (Remove_Overloaded_Entity): Update the documentation of this
1389 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1391 * repinfo.adb (List_Record_Info): During first loop,
1392 do not override the normalized position and first bit
1393 if they have already been set. Move fallback code
1394 for the packed case to the case where it belongs.
1395 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
1396 Also adjust the normalized position of components.
1397 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
1399 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1401 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
1402 the placement of a primitive operation O that renames an operation
1403 R declared in an inner package, and which is thus not a primitive
1404 of the dispatching type of O. In this case O is a new primitive
1405 and does not inherit its dispatch table position from R (which
1408 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1410 * sem_dim.adb (Analyze_Dimension_If_Expression,
1411 Analyze_Dimension_Case_Expression): new subprograms to verify
1412 the dimensional correctness of Ada2012 conditional expressions,
1413 and set properly the dimensions of the construct.
1414 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
1415 call Analyze_Dimension.
1417 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1419 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
1420 loop on an interface declared as a private extension of another
1421 synchronized interface.
1423 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1425 * sem_ch12.adb (Check_Generic_Parent): New procedure within
1426 Analyze_Associations, to handle actual packages that depend on
1427 previous instances. If a package IAP that is an instantiation is
1428 used as an actual in a subsequent instantiation SI in the same
1429 scope, and IAP has a body, IAP must be frozen before SI. If
1430 the generic parent of IAP is itself declared in a previous
1431 instantiation in the same scope, that instantiation must also
1432 be frozen before SI.
1433 (Install_Body): Prevent double insertion of freeze node for
1436 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1438 * sem_prag.adb (Resolve_State): Update the
1439 comment on documentation. Generate a reference to the state once
1440 resolution takes place.
1442 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1444 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1445 Linker_Section): If the aspect applies to an object declaration
1446 with explicit initialization, do not delay the freezing of the
1447 object, to prevent access-before-elaboration in the generated
1448 initialization code.
1450 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1452 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
1453 (Integer_Value (Item)) when the size of the fixed decimal type
1454 is larger than Integer.
1456 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1459 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
1460 in order of increasing position in more cases.
1462 2017-09-07 Yannick Moy <moy@adacore.com>
1464 * a-exetim-mingw.ads: Add contract Global=>null
1465 on all operations that are modeled as having no read or write
1466 of global variables in SPARK.
1468 2017-09-07 Raphael Amiard <amiard@adacore.com>
1470 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
1471 to Hmaps.Generic_Ops.
1472 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
1474 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
1476 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
1477 position in cursors.
1479 2017-09-07 Javier Miranda <miranda@adacore.com>
1481 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
1482 allow disabling the generation of implicit pragma Elaborate_All
1485 2017-09-07 Javier Miranda <miranda@adacore.com>
1487 * exp_disp.adb (Make_Tags): Avoid suffix counter
1488 in the external name of the elaboration flag. Required to fix
1489 the regressions introduced by the initial version of this patch.
1491 2017-09-07 Bob Duff <duff@adacore.com>
1493 * sem_ch6.adb (Analyze_Function_Return): Do not
1494 insert an explicit conversion to force the displacement of the
1495 "this" pointer to reference the secondary dispatch table in the
1496 case where the return statement is returning a raise expression,
1497 as in "return raise ...".
1499 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1501 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
1502 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
1503 procedure from sem_disp.adb.
1504 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
1506 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
1507 return the instantiation node for subprograms. Update references
1508 to Get_Unit_Instantiation_Node.
1509 * sem_ch7.adb (Install_Parent_Private_Declarations): update
1510 reference to Get_Unit_Instantiation_Node.
1511 * exp_dist.adb (Build_Package_Stubs): update reference to
1512 Get_Unit_Instantiation_Node.
1513 * sem_ch9.adb: minor typo in comment.
1514 * lib-xref-spark_specific.adb
1515 (Traverse_Declaration_Or_Statement): traverse into task type
1518 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1520 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
1521 to handle properly various cases of type conversions where the
1522 target type and/or the expression carry dimension information.
1523 (Dimension_System_Root); If a subtype carries dimension
1524 information, obtain the source parent type that carries the
1527 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
1529 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
1531 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1533 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
1534 If the prefix is a reference to an object, rewrite it as an
1535 explicit dereference, as required by 3.7.2 (2) and as is done
1536 with most other attributes whose prefix is an access value.
1538 2017-09-07 Bob Duff <duff@adacore.com>
1540 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
1541 Refined_Depends aspect.
1542 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
1543 Refined_Depends pragma.
1544 * scans.ads: Fix documentation of Inside_Depends flag.
1545 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
1547 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
1549 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
1550 Account for the case where the are no lists to insert, but the
1551 secondary stack still requires management.
1552 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
1553 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
1554 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
1555 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
1558 2017-09-07 Vincent Celier <celier@adacore.com>
1560 * clean.adb: Do not get the target parameters before calling
1563 2017-09-07 Nicolas Roche <roche@adacore.com>
1565 * s-osinte-solaris-posix.ads: Removed.
1567 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1569 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
1570 single concurrent objects.
1572 2017-09-07 Javier Miranda <miranda@adacore.com>
1574 * s-regexp.ads: Fix documentation of the globbing grammar.
1576 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1578 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
1580 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1582 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
1583 in CodePeer mode, to support more legacy code automatically.
1585 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1587 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
1588 and thus not a controlling argument, preserve its type after
1589 rewriting because it may appear in an nested call with a classwide
1592 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1594 * comperr.adb (Delete_SCIL_Files): Handle case of
1595 N_Package_Instantiation.
1597 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1599 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
1600 clause for a unit U appears in a context that includes a regular
1601 with_clause on U, rewrite the redundant private clause into a null
1602 statement, rather than removing it altogether from the context,
1603 so that ASIS tools can reconstruct the original source.
1605 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1607 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
1608 for aspect Small can be of any real type (not only a universal
1609 real literal) as long as it is a static constant.
1611 2017-09-07 Thomas Quinot <quinot@adacore.com>
1613 * par_sco.adb: Minor reformatting.
1615 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1617 * s-parame-ae653.ads: Removed.
1619 2017-09-07 Nicolas Roche <roche@adacore.com>
1621 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
1622 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
1623 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
1624 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
1625 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
1626 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
1628 2017-09-07 Yannick Moy <moy@adacore.com>
1630 * a-ngelfu.ads Add preconditions to all functions
1631 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
1633 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1635 * lib-xref.adb (Generate_Reference): ignore
1636 references to entities which are Part_Of single concurrent
1639 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1641 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
1644 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1646 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
1647 Null_Task_Id is passed.
1649 2017-09-07 Javier Miranda <miranda@adacore.com>
1651 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
1652 attribute. Defined for record types and subtypes.
1653 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
1654 (Init_Tags_List) to facilitate generating separate code in the
1655 IP routine to initialize the object components and for completing
1656 the elaboration of dispatch tables.
1657 * exp_ch3.adb (Build_Init_Procedure): Improve the code
1658 generated in the IP routines by means of keeping separate
1659 the initialization of the object components from the
1660 initialization of its dispatch tables. (Init_Secondary_Tags):
1661 Adding new formal (Init_Tags_List) and adjusting calls to
1662 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
1663 adjusting also calls to Ada.Tags.Register_Interface_Offset
1664 because the type of one of its formals has been changed.
1665 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
1666 modified. Instead of receiving a pointer to an object this
1667 routine receives now a primary tag.
1668 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
1669 additional formal: the tag of the primary dispatch table.
1670 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
1671 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
1672 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
1673 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
1674 formal in calls to Init_Secondary_Tags.
1676 2017-09-07 Javier Miranda <miranda@adacore.com>
1678 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
1680 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
1681 applied to generic subprograms.
1683 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1685 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
1686 (because it refers to the anonymous concurrent object, not its type);
1687 fix condition for emitting error message about task/protected type,
1689 2017-09-07 Bob Duff <duff@adacore.com>
1691 * binde.adb (Debug_Flag_Old): If both -do and -dp
1692 are specified, behave as if just -do was specified, rather than
1695 2017-09-07 Nicolas Roche <roche@adacore.com>
1697 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
1698 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
1700 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1702 * sem_prag.adb (Find_Role): The Global_Seen flag
1703 is now consulted not only for abstract states and variables,
1704 but for all kinds of items.
1705 (Collect_Subprogram_Inputs_Outputs): Do not process formal
1706 generic parameters, because unlike ordinary formal parameters,
1707 generic formals only act as input/ outputs if they are explicitly
1708 mentioned in a Global contract.
1710 2017-09-07 Yannick Moy <moy@adacore.com>
1712 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
1713 predicate procedure. Check predicate pragma/aspect with Ghost entity.
1714 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
1717 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1719 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
1721 * sem_ch3.adb (Build_Derived_Record_Type):i Call
1722 Copy_Dimensions_Of_Components after creating the copy of the
1724 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
1725 derived recor type, copy the dikensions if any of each component
1726 of the parent record to the corresponding component declarations
1727 of the derived record. These expressions are used among other
1728 things as default values in aggregates with box associations.
1729 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
1730 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
1733 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1735 * sem_util.adb: Remove extra space after THEN.
1737 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1739 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
1740 also mark the renamed subprogram as referenced.
1742 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1744 * par-ch6.adb (P_Subprogram): Improve error message on null
1745 procedure with misplaced aspect specification, which the parser
1746 first attempts to interpret as a malformed expression function.
1748 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1750 * sem_attr.adb (Analyze_Attribute_Old_Result):
1751 Allow attributes Result and Old in the case of an expression
1754 2017-09-07 Justin Squirek <squirek@adacore.com>
1756 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
1757 Volatile to subcomponents.
1759 2017-09-07 Bob Duff <duff@adacore.com>
1761 * exp_ch7.adb (Find_Last_Init): Check for the
1762 case where a build-in-place function call has been replaced by a
1763 'Reference attribute reference.
1765 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1767 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
1770 2017-09-07 Bob Duff <duff@adacore.com>
1772 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
1773 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
1774 secondary stack for all functions that return limited tagged
1775 types -- just do it for dispatching calls. Misc cleanup.
1776 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
1777 remove qualifications and type conversions. Fix various bugs
1778 where only a single level of qualification or conversion was
1779 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
1781 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
1784 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1786 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
1787 do not create actual subtypes that may generate further predicate
1789 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
1790 of body is a predicate function as well.
1791 (Resolve_Aspect_Expressions, Resolve_Name): For a component
1792 association, only the expression needs resolution, not the name.
1793 (Resolve_Aspect_Expressions, case Predicates): Construct and
1794 analyze the predicate function declaration in the scope of the
1795 type, before making the type and its discriminants visible.
1797 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1799 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
1800 only if the record type itself comes from source.
1802 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1804 * sem_ch5.adb: Minor reformatting and a typo fix
1806 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1808 * sinput-l.ads: minor remove extra period at the end of comment
1810 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1812 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
1814 (Find_Role): remove support for E_Discriminant.
1816 2017-09-06 Javier Miranda <miranda@adacore.com>
1818 * exp_ch6.adb (Expand_Simple_Function_Return):
1819 Add missing implicit type conversion to force displacement of the
1822 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1824 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
1826 2017-09-06 Yannick Moy <moy@adacore.com>
1828 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
1829 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
1831 2017-09-06 Bob Duff <duff@adacore.com>
1833 * sem_ch8.adb: Change Assert to be consistent with
1836 2017-09-06 Bob Duff <duff@adacore.com>
1838 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
1839 requested. Previously, the -do switch meant "run Elab_New and
1840 Elab_Old and use the order chosen by Elab_Old, possibly with
1841 debugging printouts comparing the two orders." Now it means
1842 "do not run Elab_New." This is of use if there are bugs that
1843 cause Elab_New to crash.
1844 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
1846 * ali.ads (Elab_Position): Change type to Nat, to avoid various
1849 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1851 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
1852 reference to SPARK RM.
1854 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1856 * layout.adb: Use SSU short hand consistently throughout the file.
1858 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1860 * freeze.adb (Freeze_Record_Type)
1861 <Sized_Component_Total_Round_RM_Size>: New local variable to
1862 accumulate the rounded RM_Size of components. Update it for
1863 every component whose RM_Size is statically known. Add missing
1864 guard to check that bit packing is really required before issuing
1865 the error about packing. Swap condition for clarity's sake.
1866 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
1868 2017-09-06 Fedor Rybin <frybin@adacore.com>
1870 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
1871 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
1872 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
1873 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
1874 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
1875 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
1876 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
1877 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
1878 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
1879 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
1880 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
1881 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
1882 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
1883 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
1884 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
1885 project manager sources.
1887 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1889 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
1890 entity of a mutable type and the right-hand side is a conditional
1891 expression, resolve the alternatives of the conditional using
1892 the base type of the target entity, because the alternatives
1893 may have distinct subtypes. This is particularly relevant if
1894 the alternatives are aggregates.
1896 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1898 * checks.adb (Apply_Predicate_Check): If the expression is an
1899 aggregate that is the RHS of an assignment, apply the check to
1900 the LHS after the assignment, rather than to the aggregate. This
1901 is more efficient than creating a temporary for the aggregate,
1902 and prevents back-end crashes when the aggregate includes a
1903 dynamic "others' association.
1905 2017-09-06 Yannick Moy <moy@adacore.com>
1907 * sem_ch12.adb (Analyze_Instance_And_Renamings):
1908 Set variable to ignore SPARK_Mode in instance before the analysis
1909 of the generated package declaration.
1911 2017-09-06 Yannick Moy <moy@adacore.com>
1913 * sem_res.adb (Resolve_Call): Do not issue a
1914 message for calls inside expression function, unless body was
1915 seen and is candidate for inlining.
1917 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1919 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
1920 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
1921 body. do not freeze the formals of the generic unit.
1923 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1925 * errout.adb (Error_Msg): Separate the
1926 treatment for warning vs. style messages in inlinings and
1927 instantiations. Prevents blowups on calls to Warn_Insertion for
1928 style messages, which should not be called in that case because
1929 Warning_Msg_Char is not set.
1931 2017-09-06 Justin Squirek <squirek@adacore.com>
1933 * sem_prag.adb (Check_VFA_Conflicts): Created
1934 to group all Volatile_Full_Access checks relating to other
1935 representation pragmas (Mark_Component_Or_Object): Created
1936 to centeralize the flagging of attributes for the record type
1937 component case, a pragma applied individually to a component, and
1939 (Process_Atomic_Independent_Shared_Volatile):
1940 Add propagation of certain pragmas to record components and move
1941 evaluation of VFA checks
1943 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1945 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
1946 Do not warn on conditions that are not obeyed for Inline_Always
1947 subprograms, when assertions are not enabled.
1949 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1951 * sem_util.adb (Unique_Entity): For abstract states return their
1954 2017-09-06 Bob Duff <duff@adacore.com>
1956 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
1957 that is a proper body corresponding to a stub, we defer the
1958 adjustment of the sloc until after the correct adjustment has
1959 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
1960 the adjustment, because it will be outside the range in (the old,
1961 incorrect) S_Adjustment.
1962 * inline.adb: Use named notation for readability and uniformity.
1963 * sinput-l.adb: Minor improvements to debugging output printed
1965 * sinput-l.ads (Create_Instantiation_Source): Minor comment
1968 2017-09-06 Vincent Celier <celier@adacore.com>
1970 * make.adb: Do not invoke gprbuild for -bargs -P.
1972 2017-09-06 Sylvain Dailler <dailler@adacore.com>
1974 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
1975 case when Op is of kind N_Qualified_Expression. In this case,
1976 the function is called recursively on the subexpression like in
1978 * make.adb: Minor reformatting
1980 2017-09-06 Justin Squirek <squirek@adacore.com>
1982 * einfo.adb (Set_Linker_Section_Pragma): Modify
1983 Set_Linker_Section_Pragma to be consistant with the "getter"
1984 Linker_Section_Pragma.
1985 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
1986 checking for container loops so that the index cursor is not
1987 directly changable by the user with the use of E_Loop_Parameter.
1988 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
1989 * sem_warn.adb (Check_References): Revert previous change.
1991 2017-09-06 Bob Duff <duff@adacore.com>
1993 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
1996 2017-09-06 Yannick Moy <moy@adacore.com>
1998 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
1999 declarations to only consider valid uses of Global/Depends those on
2000 single concurrent objects.
2002 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2004 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
2005 error as soon as one of the specified components overlaps the
2008 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2010 * sem_prag.ads: minor fix typo in comment.
2012 2017-09-06 Justin Squirek <squirek@adacore.com>
2014 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
2015 from source before checking source references.
2016 * sem_warn.adb (Check_References): Add check for internal block
2019 2017-09-06 Vincent Celier <celier@adacore.com>
2021 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
2022 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
2023 gnatname.adb: Remove the Project Manager from the GNAT tools.
2024 * gcc-interface/Makefile.in: ditto.
2026 2017-09-06 Bob Duff <duff@adacore.com>
2028 * sem_util.ads: Minor comment fix.
2030 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2032 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
2033 Generate a freeze node for the actual of a formal package, if
2034 the actual is declared in the same unit and has a corresponding
2035 body, to prevent the current instance from being frozen before
2038 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2040 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
2042 2017-09-06 Yannick Moy <moy@adacore.com>
2044 * sem_warn.adb: Minor refactoring.
2046 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2048 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
2049 to retrieve the inherited classwide precondition/postcondition
2051 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
2052 freezing a subprogram, to complete the generation of the
2053 corresponding checking code.
2055 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2057 * exp_util.adb (Is_Controlled_Indexing): New routine.
2058 (Is_Displace_Call): Use routine Strip to remove indirections.
2059 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
2060 missing case of controlled generalized indexing.
2061 (Is_Source_Object): Use routine Strip to remove indirections.
2062 (Strip): New routine.
2064 2017-09-06 Bob Duff <duff@adacore.com>
2066 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
2067 we include the proper header. Otherwise, we just declare the necessary
2068 things from the capabilities library. This is so we can build on
2069 machines without that library, while still enabling that library.
2070 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
2071 simply return 0 if the library is not present, or not included
2074 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
2076 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
2077 for renamings that involve function calls in prefix form.
2079 2017-09-06 Bob Duff <duff@adacore.com>
2081 * sem_ch3.adb (Analyze_Subtype_Declaration):
2082 Set Has_Delayed_Freeze on a subtype of an incomplete type.
2084 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
2086 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
2087 has no parameter specification and no entry index, use the entry name
2088 as the end of the generated SCO statement.
2090 2017-09-06 Steve Baird <baird@adacore.com>
2092 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
2093 uses of 'Image and related attributes as having side effects in
2094 order to avoid replicating such uses.
2095 * pprint.ads (Expression_Image) Add new generic formal flag
2096 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
2097 (eventually) override the default.
2098 * pprint.adb (Expression_Image) If the new flag is set, then
2099 suppress the ".all" suffix when displaying a dereference whose
2100 prefix is a use of a value-capturing compiler temp of the sort
2101 generated by Expr_Util.Remove_Side_Effects .
2102 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
2103 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
2105 * inline.adb: Minor wording change.
2107 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2109 * sem_ch7.adb: Update comment.
2111 2017-09-06 Yannick Moy <moy@adacore.com>
2113 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
2114 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
2115 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
2116 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
2117 so that applies to any entity.
2119 2017-09-06 Yannick Moy <moy@adacore.com>
2121 * sem_ch3.adb (Derived_Type_Declaration): Use
2122 Incomplete_Or_Partial_View rather than local Find_Partial_View.
2124 2017-09-06 Javier Miranda <miranda@adacore.com>
2126 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
2129 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2131 * sem_dim.adb (Analyze_Dimension): In an instance, a type
2132 conversion takes its dimensions from the expression, not from
2134 (Dimensions_Of_Operand): Ditto.
2136 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2138 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
2139 null procedures when GNAT coverage is used, so that their (empty)
2140 bodies are properly covered.
2142 2017-09-06 Bob Duff <duff@adacore.com>
2144 * sem_ch13.adb (Resolve_Aspect_Expressions): If
2145 the entity is a type with discriminants, make the discriminants
2146 directly visible in aspect clauses.
2148 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2150 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
2151 Universal_Real and the context is a floating-point type, resolve
2152 both operands to the target type.
2154 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2156 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
2157 sem_ch3.adb, sem_util.adb: Minor reformatting.
2159 2017-09-06 Yannick Moy <moy@adacore.com>
2161 * freeze.adb (Check_Inherited_Conditions): Rewriting
2162 of inherited preconditions and postconditions should only occur
2163 in GNATprove mode, that is, when GNATprove_Mode is True, not to
2164 be confused with SPARK_Mode being On.
2166 2017-09-06 Yannick Moy <moy@adacore.com>
2168 * sem_warn.adb (Check_References): Take into
2169 account possibility of attribute reference as original node.
2171 2017-09-06 Yannick Moy <moy@adacore.com>
2173 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
2176 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2178 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
2179 on the procedure created to encapsulate the body.
2180 * sem_ch7.adb: Add with clause for GNAT.HTable.
2181 (Entity_Table_Size): New constant.
2182 (Entity_Hash): New function.
2183 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
2184 (Is_Subprogram_Ref): Rename into...
2185 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
2186 the table instead of bailing out on them. Scan the value of constants
2187 if it is not known at compile time.
2188 (Contains_Subprograms_Refs): Rename into...
2189 (Scan_Subprogram_Refs): ...this.
2190 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
2191 Is_Public flag on subprograms if they are not actually referenced.
2192 (Hide_Public_Entities): Beef up comment on the algorithm.
2193 Reset the table of subprograms on entry.
2195 2017-09-06 Yannick Moy <moy@adacore.com>
2197 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
2199 2017-09-06 Javier Miranda <miranda@adacore.com>
2201 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
2202 cannot handle a type conversion of an array as an aggregate
2205 2017-09-06 Bob Duff <duff@adacore.com>
2207 * g-comlin.adb (Try_Help): Remove ".exe" so we
2208 get the same results on windows and unix.
2210 2017-09-06 Justin Squirek <squirek@adacore.com>
2212 * exp_imgv.adb (Expand_Image_Attribute),
2213 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
2214 Added case to handle new-style 'Image expansion
2215 (Rewrite_Object_Image): Moved from exp_attr.adb
2216 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2217 attribute cases so that the relevant subprograms in exp_imgv.adb
2218 handle all expansion.
2219 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
2220 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
2221 cases to call common function Analyze_Image_Attribute.
2222 (Analyze_Image_Attribute): Created as a common path for all
2223 image attributes (Check_Object_Reference_Image): Removed
2224 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2225 Removed and refactored into Is_Object_Image (Is_Object_Image):
2226 Created as a replacement for Is_Image_Applied_To_Object
2228 2017-09-06 Yannick Moy <moy@adacore.com>
2230 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
2231 message for missing input.
2233 2017-09-06 Yannick Moy <moy@adacore.com>
2235 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
2236 of protected subprograms and entries.
2237 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
2238 New function to detect when a subprogram of entry is defined
2239 inside a protected object.
2241 2017-09-06 Bob Duff <duff@adacore.com>
2243 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
2244 whether the current process has the CAP_SYS_NICE capability.
2245 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
2246 ceiling priorities if the current process has the CAP_SYS_NICE
2249 2017-09-06 Bob Duff <duff@adacore.com>
2251 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
2252 check back to the body, because SPARK is not yet ready for
2253 "or else raise Constraint_Error".
2255 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2257 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
2258 procedure by a single null statement, after evaluating the
2259 actuals that require it.
2261 2017-09-06 Javier Miranda <miranda@adacore.com>
2263 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
2264 Generating C code improve the code that checks the use of nested
2265 aggregates to initialize object declarations.
2267 2017-09-06 Yannick Moy <moy@adacore.com>
2269 * sem_ch3.adb (Derived_Type_Declaration): Detect
2270 violations of new rule SPARK RM 3.4(1). Also refactor existing
2271 check to use the new function Find_Partial_View.
2273 2017-09-06 Vincent Celier <celier@adacore.com>
2275 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
2276 from the Prj hierarchy has been removed from the GNAT driver.
2278 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2280 * sem_type.adb (Interface_Present_In_Ancestor): Within an
2281 expression function, or within a spec expression (default value,
2282 etc) a reference to an incomplete type is legal: legality of
2283 the operation will be checked when some related entity (type,
2284 object or subprogram) is frozen.
2286 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2288 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
2289 adjustments and a typo fix.
2291 2017-09-06 Yannick Moy <moy@adacore.com>
2293 * sem_res.adb (Resolve_Call): Do not issue info
2294 message about inlining of calls to functions in assertions,
2295 for functions whose body has not been seen yet.
2297 2017-09-06 Bob Duff <duff@adacore.com>
2299 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
2300 we can use modern Ada in this package.
2301 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
2302 Move Ada.Command_Line.Response_File to System.Response_File,
2303 and make Ada.Command_Line.Response_File into a rename of
2304 System.Response_File. This is to avoid having gnatbind depend
2305 Ada.Command_Line, which would damage the bootstrap process now
2306 that Ada.Command_Line contains modern Ada (the raise expression).
2307 * gnatbind.adb: Avoid dependence on
2308 Ada.Command_Line. Depend on System.Response_File instead
2309 of Ada.Command_Line.Response_File. Change one call to
2310 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
2311 to Ada.Command_Line.Argument_Count to use Arg_Count.
2312 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
2314 2017-09-06 Bob Duff <duff@adacore.com>
2316 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
2317 switch, because we've already read gnat.adc by default.
2319 2017-09-06 Bob Duff <duff@adacore.com>
2321 * exp_ch5.adb (Get_Default_Iterator): Replace
2322 "Assert(False)" with "return Iter", because if an iterable
2323 type is derived from a noniterable one, then we won't find an
2324 overriding or inherited default iterator.
2326 2017-09-06 Yannick Moy <moy@adacore.com>
2328 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
2329 literal index used to access a string is null or negative.
2331 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2333 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
2334 allowed on loop parameters.
2335 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
2337 (Write_Field15_Name): Update the output for
2338 Status_Flag_Or_Transient_Decl.
2339 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
2340 to loop parameters. Update the documentation of the attribute
2341 and the E_Loop_Parameter entity.
2342 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
2343 which assumes that cursors can never be controlled.
2344 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
2345 guard which assumes that cursors can never be controlled.
2347 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2349 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
2350 sem_warn.adb: Minor reformatting.
2352 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2354 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
2355 fix and preserve older GNAT warning on overlapping actuals that
2356 are not elementary types.
2358 2017-09-06 Justin Squirek <squirek@adacore.com>
2360 * sem_attr.adb: Comment correction.
2362 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2364 * sem_util.adb: Minor reformatting.
2366 2017-09-06 Yannick Moy <moy@adacore.com>
2368 * a-comlin.ads (Argument): Add precondition for analysis.
2370 2017-09-06 Yannick Moy <moy@adacore.com>
2372 * sem_res.adb (Resolve): Update message for function call as statement.
2374 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2376 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
2377 generated bodies for renamings that are completions, when renamed
2378 procedure is No_Return.
2379 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
2380 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
2381 with No_Return, the renamed entity must be No_Return as well.
2383 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2385 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
2388 2017-09-06 Justin Squirek <squirek@adacore.com>
2390 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2391 attribute cases (Rewrite_Object_Reference_Image): Created to
2392 aid the rewriting of new-style 'Image attributes.
2393 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
2394 (Check_Object_Reference_Image): Created to handle verification of
2395 'Image with object-references as prefixes.
2396 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2397 Create predicate to identify cases where an 'Image attribute's
2398 prefix applies to an object reference.
2400 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2402 * freeze.adb (Freeze_Entity): Do not generate a freeze
2403 node for a generic unit, even if it includes delayed aspect
2404 specifications. Freeze nodes for generic entities must never
2405 appear in the tree that reaches the back-end of the compiler.
2407 2017-09-06 Yannick Moy <moy@adacore.com>
2409 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
2411 2017-09-06 Yannick Moy <moy@adacore.com>
2413 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
2414 to subprograms in other units as possibly inlined.
2416 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2418 * freeze.adb (Freeze_Entity): For a derived type that has no
2419 explicit delayed aspects but may inherit delayed aspects from its
2420 parent type, analyze aspect at freeze point for proper capture
2421 of an inherited aspect.
2423 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2425 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
2426 renamings; also, avoid repeated calls to Renamed_Object when getting
2427 through object renamings.
2429 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2431 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
2432 array type declaration in a private part, when an index is a
2433 subtype indication of a discrete type with a private partial view.
2435 2017-09-06 Javier Miranda <miranda@adacore.com>
2437 * exp_ch4.adb (Expand_Modular_Op): Force generating
2438 temporary to improve the generated code.
2440 2017-09-06 Tristan Gingold <gingold@adacore.com>
2442 * s-fatgen.adb: Minor typo fix in comment.
2444 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2446 * exp_ch5.adb (Make_Field_Assign): If the type
2447 of the right-hand side has stored constraint, use its values
2448 (except for those that are renamings of parent discriminants)
2449 to produce additional assignments for the discriminants of the
2450 left-hand side, which are invisible in the righ-hand side and
2451 not retrievable as selected components.
2453 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2455 * sem_util.adb (Needs_One_Formal): The first formal of such a
2456 function must be a controlling formal, so that Obj.F (X, Y)
2457 can have the interpretation F(Obj)(X, Y).
2458 * sem_util.ads: Clarify documentation.
2460 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2462 * table.ads, table.adb: Restore original implementation.
2463 * namet.h (Names_Ptr): Adjust back.
2464 (Name_Chars_Ptr): Likewise.
2465 * uintp.h (Uints_Ptr): Likewise.
2466 (Udigits_Ptr): Likewise.
2467 * g-table.ads: Remove pragma Compiler_Unit_Warning.
2468 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
2469 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
2470 * spark_xrefs.ads: Likewise.
2471 * scos.h: Undo latest changes.
2473 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2475 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
2476 No_Return flag to instance if pragma applies to generic unit. This
2477 must be done explicitly because the pragma does not appear
2478 directly in the generic declaration (unlike the corresponding
2479 aspect specification).
2481 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2483 * sem_ch7.adb (Has_Referencer): Move up and expand comment
2484 explaining the test used to detect inlining. Use same test
2485 in second occurrence.
2486 (Analyze_Package_Body_Helper): Minor formatting fixes.
2488 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2490 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
2491 derived type with a mixture of renamed and constrained parent
2492 discriminants, the constraint for the target must obtain the
2493 discriminant values from both the operand and from the stored
2494 constraint for it, given that the constrained discriminants are
2495 not visible in the object.
2496 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
2497 side may be derived from that of the left-hand side (as in the
2498 case of an assignment with a change of representation) so the
2499 discriminant to be used in the retrieval of the value of the
2500 component must be the entity in the type of the right-hand side.
2502 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2504 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
2505 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2506 * exp_util.adb (Is_Source_Object): Account for
2507 the cases where the source object may appear as a dereference
2508 or within a type conversion.
2509 * exp_ch6.adb: Fix missing space in error message.
2511 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2513 * sem_prag.adb: Update description of Eliminate.
2515 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2517 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
2518 properly an attribute reference 'Loop_Entry that appears in the
2519 list of indices of an indexed expression, to prevent an infinite
2520 loop in the compiler.
2522 2017-09-06 Bob Duff <duff@adacore.com>
2524 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
2526 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2528 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
2529 in a set membership is an overloaded enumeration literal, and
2530 the type of the alternative is resolved from a previous one,
2531 replace the entity of the alternative as well as the type,
2532 to prevent inconsistencies between the entity and the type.
2534 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2536 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
2537 (No_Component_Reordering_Specified): New switch.
2538 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
2539 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
2540 * bcheck.adb (Check_Consistent_No_Component_Reordering):
2542 (Check_Configuration_Consistency): Invoke it.
2543 * debug.adb (d.r): Toggle the effect of the switch.
2544 (d.v): Change to no-op.
2545 * einfo.ads (Has_Complex_Representation):
2546 Restrict to record types.
2547 (No_Reordering): New alias for Flag239.
2548 (OK_To_Reorder_Components): Delete.
2549 (No_Reordering): Declare.
2550 (Set_No_Reordering): Likewise.
2551 (OK_To_Reorder_Components): Delete.
2552 (Set_OK_To_Reorder_Components): Likewise.
2553 * einfo.adb (Has_Complex_Representation): Expect record types.
2554 (No_Reordering): New function.
2555 (OK_To_Reorder_Components): Delete.
2556 (Set_Has_Complex_Representation): Expect base record types.
2557 (Set_No_Reordering): New procedure.
2558 (Set_OK_To_Reorder_Components): Delete.
2559 (Write_Entity_Flags): Adjust to above change.
2560 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
2561 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
2562 OK_To_Reorder_Components on record types with convention Ada.
2563 * lib-writ.adb (Write_ALI): Deal with NC marker.
2564 * opt.ads (No_Component_Reordering): New flag.
2565 (No_Component_Reordering_Config): Likewise.
2566 (Config_Switches_Type): Add No_Component_Reordering component.
2567 * opt.adb (Register_Opt_Config_Switches): Copy
2568 No_Component_Reordering onto No_Component_Reordering_Config.
2569 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
2570 (Save_Opt_Config_Switches): Save No_Component_Reordering.
2571 (Set_Opt_Config_Switches): Set No_Component_Reordering.
2572 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
2573 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
2574 No_Reordering flag from the default.
2575 (Build_Derived_Private_Type): Likewise.
2576 (Build_Derived_Record_Type): Likewise. Then inherit it
2577 for untagged types and clean up handling of similar flags.
2578 (Record_Type_Declaration): Likewise.
2579 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
2580 remove redundant test on Is_Tagged_Type.
2581 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
2582 (Sig_Flags): Likewise.
2583 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
2584 (Pragma_Id): Add Pragma_No_Component_Reordering value.
2585 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
2586 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
2587 Copy the layout of the parent type only if the No_Reordering
2589 (components_to_record): Reorder record types with
2590 convention Ada by default unless No_Reordering is set or -gnatd.r
2591 is specified and do not warn if No_Reordering is set in GNAT mode.
2593 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2595 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
2596 new predicate to reject declarations that can be completions,
2597 when there is a visible prior homograph that is a null procedure.
2598 * sem_ch6.adb (Analyze_Null_Procedure): use it.
2599 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
2601 2017-09-06 Thomas Quinot <quinot@adacore.com>
2603 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
2604 run of 253 characters or more.
2606 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2608 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
2609 properly incomplete subtypes that may be created by explicit or
2610 implicit declarations.
2611 (Is_Base_Type): Take E_Incomplete_Subtype into account.
2612 (Subtype_Kind): Ditto.
2613 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
2614 Ekind of a subtype of a discriminated incomplete type.
2615 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
2616 incomplete types, to preserve error reporting.
2617 (Process_Incomplete_Dependents): Do not create a subtype
2618 declaration for an incomplete subtype that is created internally.
2619 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
2620 incomplete subtypes that do not require a completion, either
2621 because they are limited views, of they are generic actuals.
2623 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2625 * checks.adb (Insert_Valid_Check): Remove the
2626 suspicious manipulation of the Do_Range_Check flag as ths is
2627 no linger needed. Suppress validity check when analysing the
2628 validation variable.
2630 2017-09-06 Philippe Gil <gil@adacore.com>
2632 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
2635 2017-09-06 Bob Duff <duff@adacore.com>
2637 * sem_elim.adb: Minor comment fix.
2639 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2641 * sem_util.adb (Is_Object_Reference): A function call is an
2642 object reference, and thus attribute references for attributes
2643 that are functions (such as Pred and Succ) as well as predefined
2644 operators are legal in contexts that require an object, such as
2645 the prefix of attribute Img and the Ada2020 version of 'Image.
2647 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2649 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
2650 exp_ch3.adb, xoscons.adb: Minor reformatting.
2652 2017-09-06 Raphael Amiard <amiard@adacore.com>
2654 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
2655 Position parameter. If supplied, use it to provide efficient iteration.
2656 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
2657 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
2660 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2662 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
2663 designated type is class-wide and the expression is an unchecked
2664 conversion, preserve the conversion when checking the tag of the
2665 designated object, to prevent spurious semantic errors when the
2666 expression in the conversion has an untagged type (for example
2667 an address attribute).
2669 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2671 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
2672 operation is subject to a pragma Eliminate.
2674 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2676 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
2678 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2680 * fe.h (Eliminate_Error_Msg): Remove.
2682 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
2684 * gcc-interface/utils.c (make_packable_type): Update call to
2687 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
2689 * gcc-interface/utils2.c (build_load_modify_store):
2690 Use int_mode_for_size.
2692 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2695 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2696 for Itypes that are E_Record_Subtype with a cloned subtype.
2697 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
2699 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2701 * gcc-interface/trans.c (convert_with_check): Use a custom base type
2702 if the base type of the expression has a different machine mode.
2703 Rename a couple of parameters and local variable.
2705 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2707 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
2708 conversions around prefixes that are not references.
2710 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2712 * gcc-interface/utils.c (unchecked_convert): When the result type is a
2713 non-biased integral type with size 0, set the result to 0 directly.
2715 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2717 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
2718 (renaming_from_instantiation_p): ...this.
2719 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
2720 instead of explicit tests on kind of entities. Adjust for renaming.
2721 (gnat_to_gnu_profile_type): Likewise.
2722 (gnat_to_gnu_subprog_type): Likewise.
2723 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
2724 (Case_Statement_to_gnu): Likewise.
2725 (gnat_to_gnu): Likewise.
2726 (process_freeze_entity): Likewise.
2727 (process_type): Likewise.
2728 (add_stmt_with_node): Adjust for renaming.
2729 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
2730 (renaming_from_generic_instantiation_p): Rename to...
2731 (renaming_from_instantiation_p): ...this. Use inline predicate.
2732 (pad_type_hasher::keep_cache_entry): Fold.
2734 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2736 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
2737 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
2738 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
2739 (N_Slice): Likewise.
2740 (N_Selected_Component): Likewise. Do not try again to translate it.
2741 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
2743 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2745 * repinfo.ads: Document new treatment of dynamic values.
2746 (TCode): Bump upper bound to 29.
2747 (Dynamic_Val): New constant set to 29.
2748 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
2749 (Rep_Value) <Dynamic_Val>: Likewise.
2750 * repinfo.h (Dynamic_Val): New macro.
2751 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
2753 <INTEGER_CST>: Set TCODE instead of recursing.
2754 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
2755 <VAR_DECL>: New case.
2756 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
2757 <BIT_AND_EXPR>: Adjust.
2758 <CALL_EXPR>: Do not fall through.
2760 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2762 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
2763 there is no target, do not create a temporary for the return value for
2764 an allocator either.
2766 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2768 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
2769 unconstrained array type.
2771 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2772 Alan Hayward <alan.hayward@arm.com>
2773 David Sherwood <david.sherwood@arm.com>
2775 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
2776 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
2778 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2779 Alan Hayward <alan.hayward@arm.com>
2780 David Sherwood <david.sherwood@arm.com>
2782 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
2783 is_a <scalar_int_mode>.
2784 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
2785 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
2787 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2788 Alan Hayward <alan.hayward@arm.com>
2789 David Sherwood <david.sherwood@arm.com>
2791 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
2792 instead of mode_for_size.
2793 (gnat_to_gnu_subprog_type): Likewise.
2794 * gcc-interface/utils.c (make_type_from_size): Likewise.
2796 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2797 Alan Hayward <alan.hayward@arm.com>
2798 David Sherwood <david.sherwood@arm.com>
2800 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
2801 (fp_size_to_prec): Likewise.
2803 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2804 Alan Hayward <alan.hayward@arm.com>
2805 David Sherwood <david.sherwood@arm.com>
2807 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
2808 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
2810 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2811 Alan Hayward <alan.hayward@arm.com>
2812 David Sherwood <david.sherwood@arm.com>
2814 * gcc-interface/decl.c (validate_size): Update use of
2815 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
2817 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2818 Alan Hayward <alan.hayward@arm.com>
2819 David Sherwood <david.sherwood@arm.com>
2821 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
2822 (fp_size_to_prec): Likewise.
2824 2017-08-29 Martin Liska <mliska@suse.cz>
2827 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
2829 2017-08-08 Martin Liska <mliska@suse.cz>
2831 * gcc-interface/trans.c: Include header files.
2833 2017-07-29 Jakub Jelinek <jakub@redhat.com>
2835 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
2836 as new argument to the imported_module_or_decl debug hook.
2838 2017-07-25 Javier Miranda <miranda@adacore.com>
2840 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
2843 2017-07-19 Jakub Jelinek <jakub@redhat.com>
2845 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
2846 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
2847 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
2849 2017-07-18 Mike Frysinger <vapier@chromium.org>
2851 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
2852 (../../gnatlink$(exeext)): Likewise.
2854 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
2857 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
2858 (Backend_Overflow_Checks): Set to True.
2860 2017-06-23 Jakub Jelinek <jakub@redhat.com>
2862 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
2864 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
2866 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
2868 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
2870 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
2872 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
2873 imported subprograms for the current compilation unit as
2874 definitions. Disable debug info for references to variables.
2875 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
2876 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
2877 not built-in functions to their binding scope.
2878 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
2879 the function as a definition. Update all callers.
2880 (gnat_write_global_declarations): Emit debug info for imported
2881 functions. Filter out external variables for which debug info
2884 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
2887 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
2888 (i[3456]86-pc-gnu): Likewise.
2889 (x86_64 kfreebsd): Likewise.
2891 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2894 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
2896 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2899 * s-interr-hwint.adb: Reinstate.
2900 * gcc-interface/Makefile.in (RTEMS): Use it again.
2902 2017-06-08 Olivier Hainque <hainque@adacore.com>
2904 * vx_crtbegin_auto.c: Update year in copyright notice.
2905 * vx_crtbegin.c: Likewise.
2906 * vx_crtbegin.inc: Likewise.
2907 * vx_crtend.c: Likewise.
2909 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
2911 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
2912 * s-tpopsp-rtems.adb: Delete.
2914 2017-06-02 Olivier Hainque <hainque@adacore.com>
2916 * vx_crtbegin_auto.c: New file.
2917 * vx_crtbegin.c: New file.
2918 * vx_crtbegin.inc: New file.
2919 * vx_crtend.c: New file.
2921 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
2923 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
2924 const qualifiers that cause -Wignored-qualifiers warnings.
2926 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2928 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2929 for Itypes that are E_Access_Subtype.
2930 <E_Access_Subtype>: Use the DECL of the base type directly.
2932 2017-05-22 Ed Schonberg <schonberg@adacore.com>
2933 Eric Botcazou <ebotcazou@adacore.com>
2935 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
2936 limited view may appear in the profile of a function, and a call to
2937 that function in another unit in which the full view is available must
2938 use this full view to spurious type errors at the point of call.
2939 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
2940 of parent body with a with clause for the main unit.
2941 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
2942 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
2943 types declared in external units like types from limited with clauses.
2944 Adjust final processing of defer_limited_with_list accordingly.
2945 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
2946 again to translate the prefix after the field if it is incomplete.
2948 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2950 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
2951 alignment for simple volatile fields and remove associated errors.
2953 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2955 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
2956 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
2958 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
2960 * gcc-interface/utils.c (can_materialize_object_renaming_p):
2961 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
2962 process Original_Node instead of expanded names.
2964 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2966 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
2967 addressability check in the constrained case.
2969 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2971 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
2972 types not coming from a limited context.
2974 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2976 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
2977 the inlined list that are not public.
2978 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
2979 there is a pragma Inline_Always on the subprogram.
2981 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2983 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
2984 <N_Allocator>: Use properly typed constants.
2985 (extract_values): Move around.
2986 (pos_to_constructor): Minor tweaks.
2987 (Sloc_to_locus): Fix formatting.
2988 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
2989 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
2990 (Gigi_Equivalent_Type): Adjust head comment.
2991 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
2993 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2995 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
2996 is a representation clause on an extension, propagate the alignment of
2997 the parent type only if the platform requires strict alignment.
2999 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
3001 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
3002 instead of Word_Size.
3005 2017-03-28 Andreas Schwab <schwab@suse.de>
3008 * system-linux-aarch64-ilp32.ads: New file.
3009 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
3010 from LIBGNAT_TARGET_PAIRS.
3011 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
3012 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
3013 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
3014 or -mabi=ilp32, resp.
3016 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3019 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
3020 instead of Word_Size.
3022 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
3024 * raise-gcc.c (exception_class_eq): Make ec parameter const.
3026 2017-05-02 Richard Biener <rguenther@suse.de>
3028 * gcc-interface/misc.c (gnat_post_options): Do not set
3031 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3033 * gcc-interface/trans.c (assoc_to_constructor): Make sure
3034 Corresponding_Discriminant is only called on discriminants.
3035 Skip the saving of the result only for them.
3036 (gnat_to_gnu) <N_Selected_Component>: Likewise.
3037 <N_Unchecked_Type_Conversion>: Translate the result type first.
3038 (gigi): Set TREE_NOTHROW on Begin_Handler.
3039 (stmt_list_cannot_raise_p): New predicate.
3040 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
3041 a cleanup if the statements of the handler cannot raise.
3042 (process_freeze_entity): Use Is_Record_Type.
3043 (process_type): Likewise.
3045 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3047 * einfo.ads (Corresponding_Record_Component): New alias
3048 for Node21 used for E_Component and E_Discriminant.
3049 * einfo.adb (Corresponding_Record_Component): New function.
3050 (Set_Corresponding_Record_Component): New procedure.
3051 (Write_Field21_Name): Handle Corresponding_Record_Component.
3052 * sem_ch3.adb (Inherit_Component): Set
3053 Corresponding_Record_Component for every component in
3054 the untagged case. Clear it afterwards for non-girder
3056 * gcc-interface/decl.c (gnat_to_gnu_entity)
3057 <E_Record_Type>: For a derived untagged type with discriminants
3058 and constraints, apply the constraints to the layout of the
3059 parent type to deduce the layout.
3060 (field_is_aliased): Delete.
3061 (components_to_record): Test DECL_ALIASED_P directly.
3062 (annotate_rep): Check that fields are present except for
3064 (create_field_decl_from): Add DEBUG_INFO_P
3065 parameter and pass it in recursive and other calls. Add guard
3066 for the manual CSE on the size.
3067 (is_stored_discriminant): New predicate.
3068 (copy_and_substitute_in_layout): Consider only
3069 stored discriminants and check that original fields are present
3070 in the old type. Deal with derived types. Adjust call to
3071 create_variant_part_from.
3073 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3075 * exp_ch6.adb (Expand_Call_Helper): When locating the
3076 accessibility entity created for an access parameter, handle
3077 properly a reference to a formal of an enclosing subprogram. if
3078 the reference appears in an inherited class-wide condition, it
3079 is the rewriting of the reference in the ancestor expression,
3080 but the accessibility entity must be that of the current formal.
3082 2017-05-02 Javier Miranda <miranda@adacore.com>
3084 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
3085 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
3086 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
3087 Call Expand_Non_Binary_Modular_Op.
3089 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3091 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
3092 has discriminants, do not override the Stored_Constraint list of
3093 the full view of the derived type with that of the derived type.
3095 2017-05-02 Bob Duff <duff@adacore.com>
3097 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
3099 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3101 * s-os_lib.ads: Minor typo fix.
3103 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3105 * gnatls.adb: Merge and refactor code from Prj.Env and remove
3106 this deprecated dependency.
3108 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3110 * exp_util.ads: minor comment addition.
3112 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3114 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
3115 pastos in part #3 of the head comment.
3117 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3119 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
3120 procedure body for a local (sub)type declaration within a
3121 predicate function. Invariant checks do not apply to these, and
3122 the expansion of the procedure will happen in the wrong scope,
3123 leading to misplaced freeze nodes.
3125 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3127 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
3128 to analyze generated actions. If the main unit is a body,
3129 the required scope is that of the corresponding unit declaration.
3131 2017-05-02 Arnaud Charlet <charlet@adacore.com>
3133 * einfo.adb (Declaration_Node): flip branches of
3134 an IF statement to avoid repeated negations in its condition;
3135 no change in semantics, only to improve readability.
3137 2017-05-02 Arnaud Charlet <charlet@adacore.com>
3139 * sem_case.adb: Remove extra spaces in parameter declarations.
3141 2017-05-02 Justin Squirek <squirek@adacore.com>
3143 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
3144 in usage line for new -gnatwE switch.
3146 2017-05-02 Claire Dross <dross@adacore.com>
3148 * a-cofuve.ads (Remove): Remove unnecessary
3149 conditions in precondition.
3151 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3153 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
3154 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
3156 2017-05-02 Justin Squirek <squirek@adacore.com>
3158 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3159 alternative expression.
3160 * sem_res.adb (Resolve_Case_Expression): Ditto.
3162 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3164 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
3165 Refine predicate for the case where the primitive operation
3166 is a renaming of equality. An overriding operation that is
3167 a user-defined renaming of predefined equality inherits its
3168 slot from the overridden operation. Otherwise it is treated
3169 as a predefined op and occupies the same predefined slot as
3170 equality. A call to it is transformed into a call to its alias,
3171 which is the predefined equality. A dispatching call thus uses
3172 the proper slot if operation is further inherited and called
3173 with class-wide arguments.
3175 2017-05-02 Justin Squirek <squirek@adacore.com>
3177 * errout.adb (Set_Msg_Text): Add a case to switch the message
3178 type when the character '[' is detected signifying a warning
3179 about a run-time exception.
3180 * opt.ads Add a new Warning_Mode value for new switch
3181 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
3182 to handle new warning mode
3183 * usage.adb (Usage): Add usage entry for -gnatwE
3184 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
3186 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3188 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
3189 declaration that operates on some fixed point type.
3191 2017-05-02 Justin Squirek <squirek@adacore.com>
3193 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
3195 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3197 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
3199 2017-05-02 Justin Squirek <squirek@adacore.com>
3201 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3202 expression (Analyze_If_Expression): Add check for valid condition
3203 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
3205 * sem_res.adb (Resolve_If_Expression): Add check for valid
3206 condition and then-expression.
3208 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3210 * exp_ch3.adb (Build_Initialization_Call): Generate a null
3211 statement if the initialization call is a null procedure, as
3212 can happen with a controlled type with no explicit Initialize
3213 procedure, or an array of such.
3214 * exp_ch7.adb (Process_Object_Declaration): For a type with
3215 controlled components that has a trivial Initialize procedure,
3216 insert declaration for finalization counter after object
3218 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
3219 finalization block and attendant declarations if component has
3220 a trivial Initialize procedure.
3221 (Make_Init_Call): Do not generate a call if controlled type has
3222 a trivial Initialize procedure.
3224 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3226 * g-forstr.ads (Data): Move Format component last.
3227 * g-forstr.adb ("+"): Adjust for above change.
3228 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
3229 * g-sechas.ads (Context): Move Key last.
3230 * g-socket.ads (Service_Entry_Type): Move Aliases last.
3231 * s-fileio.adb (Temp_File_Record): Move Name last.
3232 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
3233 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
3235 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
3237 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
3238 switch introduced recently. finally not needed.
3240 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3242 * sem_ch6.adb (Analyze_Null_Procedure): Set the
3243 Corresponding_Body link for a null procedure declaration.
3245 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3247 * atree.h (Flag290): Add missing terminating parenthesis.
3248 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
3249 (Set_Is_Class_Wide_Clone): Likewise.
3250 * einfo.ads (Is_Class_Wide_Clone): Likewise.
3252 2017-05-02 Gary Dismukes <dismukes@adacore.com>
3254 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
3255 parameter Array_Comp to indicate the case of an array object
3256 with null-excluding components.
3257 * checks.adb (Null_Exclusion_Static_Checks):
3258 Call Compile_Time_Constraint_Error instead of
3259 Apply_Compile_Time_Constraint_Error in the component case. Also
3260 call that when Array_Comp is True, with an appropriate warning for
3261 the array component case. Only create an explicit initialization
3262 by null in the case of an object of a null-excluding access type
3263 (and no longer do that in the component case).
3264 * sem_ch3.adb (Check_Component): Add a Boolean parameter
3265 Array_Comp defaulted to False. Pass Empty for the Comp
3266 actual when calling Null_Exclusion_Static_Checks in the case
3267 where Comp_Decl matches Object_Decl, because we don't have a
3268 component in that case. In the case of an object or component
3269 of an array type, pass True for Array_Comp on the recursive call
3272 2017-05-02 Bob Duff <duff@adacore.com>
3274 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
3275 compute the linux priority from the Ada priority. Call this everywhere
3276 required. In particular, the previous version was not doing this
3277 computation when setting the ceiling priority in various places. It
3278 was just converting to C.int, which results in a ceiling that is off
3281 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3283 * sem_ch3.adb: Comment predicate inheritance.
3285 2017-05-02 Tristan Gingold <gingold@adacore.com>
3287 * s-trasym.ads: Add comment.
3289 2017-05-02 Bob Duff <duff@adacore.com>
3291 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
3292 * sem_ch4.adb: Minor reformatting.
3293 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
3294 * s-taspri-posix-noaltstack.ads: Minor refactoring.
3295 * sinput.ads: Minor typo fix.
3297 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3299 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
3300 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
3301 here from exp_ch9, to recognize objects whose creation requires
3302 dynamic allocation, so that the proper warning can be emitted
3303 when restriction No_Implicit_Heap_Allocation is in effect.
3304 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
3305 to emit proper warning when an object that requires dynamic
3306 allocation is declared.
3308 2017-05-02 Tristan Gingold <gingold@adacore.com>
3310 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
3312 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3314 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
3315 visibility rules for equality operators that apply within an
3316 instantiation apply within an inlined body.
3317 * sem_type.adb (Add_One_Interp): ditto.
3319 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3321 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
3324 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3327 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
3328 Name_No_Tagged_Streams): Move to regular pragmas. Add
3329 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
3330 and Secondary_Stack_Size.
3331 (Pragma_Id): Move Pragma_Assume,
3332 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
3333 Pragma_No_Tagged_Streams to second part.
3335 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3337 * exp_attr.adb: Minor reformatting.
3339 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3341 * sem_ch4.adb (Analyze_Selected_Component): Improve error
3342 detection for illegal references to private components or
3343 operations of a protected type in the body of the type.
3345 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3347 * opt.ads: Add missing GNAT markers in comments.
3348 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
3349 settings of Optimize_Alignment at the end.
3351 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3353 * checks.adb (Apply_Constraint_Check): Do not apply
3354 a discriminant check when the associated type is a constrained
3355 subtype created for an unconstrained nominal type.
3356 * exp_attr.adb: Minor reformatting.
3358 2017-05-02 Bob Duff <duff@adacore.com>
3360 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
3361 the N_Raise_Expression case.
3362 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
3365 2017-05-02 Yannick Moy <moy@adacore.com>
3367 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
3368 optimize length comparison in GNATprove mode.
3369 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
3370 operator /= into negation of operator = when needed.
3371 (Expand_SPARK): Call new
3372 function to expand operator /=.
3374 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3376 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
3377 Simplify the expression for a fixed-fixed division to remove
3378 divisions by constants whenever possible, as an optimization
3379 for restricted targets.
3381 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3383 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
3385 2017-05-02 Bob Duff <duff@adacore.com>
3387 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
3388 to find primitive ops, instead of using an Identifier that will
3389 later be looked up. This is necessary because these ops are not
3390 necessarily visible at all places where we need to call them.
3391 * exp_util.ads: Minor comment fix.
3393 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3395 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
3396 references are fully conformant if they are both expansions
3397 of the discriminant of a protected type, within one of the
3398 protected operations. One occurrence may be expanded into a
3399 constant declaration while the other is an input parameter to
3400 the corresponding generated subprogram.
3402 2017-05-02 Justin Squirek <squirek@adacore.com>
3404 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
3405 recursivly searching composite-types for null-excluding access
3406 types and verifying them.
3407 (Analyze_Object_Declaration): Add a
3408 call to Check_Null_Excluding_Components for static verification
3409 of non-initialized objects.
3410 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
3411 a parameter for a composite-type's component and an extra case
3412 for printing component information.
3414 2017-05-02 Yannick Moy <moy@adacore.com>
3416 * sem_ch10.adb (Analyze_Subunit): Take
3417 configuration pragma into account when restoring appropriate
3418 pragma for analysis of subunit.
3420 2017-05-02 Justin Squirek <squirek@adacore.com>
3422 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
3423 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
3424 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
3425 clauses from the runtime.
3427 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3429 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
3430 array components specially.
3432 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3434 * sem_ch8.adb (Premature_Usage): If the premature usage of
3435 an entity is as the expression in its own object decaration,
3436 rewrite the reference as Any_Id to prevent cascaded errors or
3437 compiler loops when such an entity is used in an address clause.
3439 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3441 * gcc-interface/decl.c (components_to_record): Add missing guard.
3443 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3445 * gcc-interface/decl.c (components_to_record): Add more comments.
3446 Put back pending fields onto the regular list if the misalignment
3447 happens to cancel itself.
3449 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3451 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
3452 controlling actual in a prefixed call, preserve the original node
3453 information if the prefix itself has been rewritten, for ASIS use.
3455 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3457 * exp_ch6.adb (Insert_Post_Call_Actions):
3458 Code clean up. Insert the post-call actions after an enclosing
3459 procedure call when N denotes a function call and appears as an
3460 actual parameter in the procedure call.
3462 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3464 * freeze.adb (Check_Component_Storage_Order): If there is a clause
3465 for the component, also reject the attribute if the component
3466 doesn't end on a byte boundary and its scalar storage order is
3467 different from that of the enclosing record type.
3469 2017-04-28 Javier Miranda <miranda@adacore.com>
3471 * atree.ads (Info_Messages): Removed.
3472 (Warning_Info_Messages): New counter.
3473 (Report_Info_Messages): New counter.
3474 * err_vars.ads Update documentation.
3475 * errout.adb (Delete_Warning_And_Continuations): Update
3476 Info_Message occurrences.
3477 (Error_Msg_Internal): Update Info_Message occurrences.
3478 (Delete_Warning): Update Info_Message occurrences.
3479 (Write_Error_Summary): Update Info_Message occurrences.
3480 (Output_Messages): Update Info_Message occurrences.
3481 (To_Be_Removed): Update Info_Message occurrences.
3482 (Reset_Warnings): Update Info_Message occurrences.
3483 * errutil.adb (Error_Msg): Update Info_Message occurrences.
3484 (Finalize): Update Info_Message occurrences.
3485 (Initialize): Update Info_Message occurrences.
3486 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
3487 (Compilation_Errors): Update Info_Message_Occurences.
3489 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3491 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
3492 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
3493 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
3494 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
3495 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
3496 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
3498 * sem_eval.adb (Why_Not_Static): Initialize Typ.
3499 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
3501 2017-04-28 Bob Duff <duff@adacore.com>
3503 * sem_util.ads, sem_util.adb (Might_Raise): New function
3504 that replaces Is_Exception_Safe, but has the opposite
3505 sense. Is_Exception_Safe was missing various cases -- calls inside
3506 a pragma Debug, calls inside an 'if' or assignment statement,
3507 etc. Might_Raise now walks the entire subtree looking for things
3509 * exp_ch9.adb (Is_Exception_Safe): Remove.
3510 (Build_Protected_Subprogram_Body): Replace call to
3511 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
3512 constants where possible).
3513 * exp_ch7.adb: Rename Is_Protected_Body -->
3514 Is_Protected_Subp_Body. A protected_body is something different
3517 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3519 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
3520 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
3521 (P_Discrete_Choice_List): Initialize Expr_Node variable.
3522 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
3523 (P_Protected): Likewise.
3524 * sem_case.adb (Check_Duplicates):
3525 Add pragma Warnings on variable.
3526 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
3527 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
3528 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
3529 (Analyze_Exit_Statement): Initialize Scope_Id variable.
3530 (Analyze_Iterator_Specification): Initialize Bas variable.
3531 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
3532 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
3533 (Analyze_Accept_Statement): Initialize Task_Nam.
3535 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3537 * checks.adb (Install_Primitive_Elaboration_Check):
3538 Do not generate an elaboration check if all checks have been
3541 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3543 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3544 Interrupt_Handler and Attach_Handler): Generate reference
3545 to protected operation to prevent spurious warnings about
3546 unreferenced entities. Previous scheme failed with style checks
3549 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3551 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
3552 that follows an expression function must not be relocated to
3553 the generated body, because it applies to the code that follows.
3555 2017-04-28 Gary Dismukes <dismukes@adacore.com>
3557 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
3558 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
3559 code that might violate the more stringent checking for 'Access
3560 introduced in Ada 2005.
3562 2017-04-28 Arnaud Charlet <charlet@adacore.com>
3564 * a-cforse.adb: minor style fix in comment.
3566 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3568 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
3569 initialize Block_Decls variable.
3570 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
3571 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
3572 * exp_disp.adb (Expand_Interface_Actuals): Initialize
3573 Formal_DDT and Actual_DDT variables.
3574 (Expand_Interface_Thunk): Initialize Iface_Formal.
3575 (Make_DT): Initialize Size_Comp.
3576 (Make_Select_Specific_Data_Table): Initialize Decls.
3577 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
3578 Also initialize more RPC_Receiver_* variables.
3579 (Build_To_Any_Function): Initialize Cstr_Formal.
3580 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
3582 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3584 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
3585 node between access types, freeze the designated type as well,
3586 so that dispatch table pointers are created in the proper scope,
3587 and not in the constructed body of the expression function.
3589 2017-04-28 Bob Duff <duff@adacore.com>
3591 * alloc.ads (Nodes_Initial): Go back to previous value. The large
3592 value makes large compilations faster, but small compilations slower.
3594 2017-04-28 Arnaud Charlet <charlet@adacore.com>
3596 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
3598 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3600 * erroutc.adb (Compilation_Errors): Do not consider info messages
3601 as suitable warnings when warnings must be treated as errors.
3602 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
3603 internally-generated packages when outputting completion
3605 * errout.adb (Output_Messages): Do not consider info messages as
3606 suitable warnings when warnings must be treated as errors.
3607 * errutil.adb (Finalize): Do not consider info messages as
3608 suitable warnings when warnings must be treated as errors.
3610 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3612 * warnsw.ads: Minor fix for incorrect wording in comment.
3614 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3616 * sem_res.adb (In_Instance_Code): New predicate in
3617 Valid_Conversion, to determine whether a type conversion appears
3618 as (or within) an actual for a formal object. Type conversions
3619 in instances are not rechecked in Valid_Conversion because
3620 visibility changes between generic location andi instance may
3621 lead to spurious errors, but conversions within an actual must be
3622 fully checked, and they are not fully resolved when pre-analyzing
3625 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3627 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
3628 New_Copy_Tree instead of Relocate_Node as any subsequent copies
3629 of the relocated node will have mangled Parent pointers.
3630 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
3631 tables used in conjunction with entity and itype replication.
3632 (Visit_Entity): Rewrite the restriction on which entities
3633 require duplication. The restriction now includes all types.
3635 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3637 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
3638 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
3639 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
3642 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3644 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
3645 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
3647 2017-04-28 Gary Dismukes <dismukes@adacore.com>
3649 * exp_util.adb: Minor reformatting.
3651 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3653 * sem_ch4.adb: Fix copy/pasto.
3655 2017-04-27 Tristan Gingold <gingold@adacore.com>
3657 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
3658 raise-gcc.c. Fix include search path for raise-gcc.c
3660 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3662 * fe.h (Warn_On_Questionable_Layout): Declare.
3663 * warnsw.ads (Warn_On_Record_Holes): Move down.
3664 (Warn_On_Questionable_Layout): New boolean variable.
3665 (Warning_Record): Add Warn_On_Questionable_Layout field.
3666 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
3667 (Restore_Warnings): Likewise.
3668 (Save_Warnings): Likewise.
3669 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
3670 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
3671 components_to_record.
3672 (gnu_field_to_gnat): New function.
3673 (warn_on_field_placement): Likewise.
3674 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
3675 parameters. Rename local variables and adjust recursive call.
3676 Rework final scan of the field list and implement warnings on the
3677 problematic placement of specific sorts of fields.
3679 2017-04-27 Bob Duff <duff@adacore.com>
3681 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
3682 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
3683 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
3684 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
3685 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
3686 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
3687 For efficiency, cache results of Is_Internal_File_Name and
3688 Is_Predefined_File_Name in the Units table. This avoids a lot
3689 of repeated text processing.
3691 2017-04-27 Emmanuel Briot <briot@adacore.com>
3693 * g-comlin.adb (Sort_Sections): remove useless test.
3695 2017-04-27 Claire Dross <dross@adacore.com>
3697 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
3698 allow the use of regular equality over elements in contracts.
3699 (Formal_Model): Ghost package containing model functions that are
3700 used in subprogram contracts.
3701 (Current_To_Last): Removed, model functions should be used instead.
3702 (First_To_Previous): Removed, model functions should be used instead.
3703 (Strict_Equal): Removed, model functions should be used instead.
3704 (No_Overlap): Removed, model functions should be used instead.
3705 (Equivalent_Keys): Functions over cursors are removed. They were
3706 awkward with explicit container parameters.
3707 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
3708 allow the use of regular equality over elements in contracts.
3709 (Formal_Model): Ghost package containing model functions that
3710 are used in subprogram contracts.
3711 (Current_To_Last): Removed, model functions should be used instead.
3712 (First_To_Previous): Removed, model functions should be used instead.
3713 (Strict_Equal): Removed, model functions should be used instead.
3714 (No_Overlap): Removed, model functions should be used instead.
3716 2017-04-27 Yannick Moy <moy@adacore.com>
3718 * gnat1drv.adb: Code cleanup.
3720 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3722 * exp_util.adb (Replace_Entity): The prefix of a 'Result
3723 attribute reference in a post- condition is the subprogram to
3724 which the condition applies. If the condition is inherited
3725 by a type extension, the prefix becomes a reference to the
3726 inherited operation, but there is no need to create a wrapper
3727 for this operation, because 'Result is expanded independently
3728 when elaborating the postconditions.
3730 2017-04-27 Bob Duff <duff@adacore.com>
3732 * sinput.adb: Minor code cleanup.
3733 * namet.adb (Append): Create faster versions of
3734 Append(String) and Append(Name_Id) by using slice assignment
3736 * sem_util.adb (In_Instance): Speed this up by removing
3737 unnecessary tests; Is_Generic_Instance is defined for all
3739 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
3740 Remove unused function.
3741 * alloc.ads (Nodes_Initial): Use a much larger value, because
3742 the compiler was spending a lot of time copying the nodes table
3743 when it grows. This number was chosen in 1996, so is rather out
3744 of date with current memory sizes. Anyway, it's virtual memory.
3745 Get rid of Orig_Nodes_...; use Node_... instead.
3746 * atree.adb (Lock): Do not release the Nodes tables; it's a
3748 Orig_Nodes_ ==> Nodes_
3749 * nlists.adb: Orig_Nodes_ ==> Nodes_
3750 * g-table.adb: Remove unused "with" clause.
3751 * g-table.ads, table.ads: Remove Big_Table_Type, which should
3752 not be used by clients.
3753 * g-dyntab.adb (Last_Allocated): New function
3754 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
3756 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3758 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
3760 (Subtypes_Statically_Match): Remove duplicate check.
3761 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
3763 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3765 * exp_aggr.adb (Replace_Type): Remove the special processing
3766 for selected components.
3767 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
3768 processing for attributes Fixed_Value and Integer_Value.
3769 * exp_util.adb (Side_Effect_Free): Merge the processing for
3770 qualified expressions, type conversions, and unchecked type
3772 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
3774 * par-ch3.adb (P_Declarative_Items): Merge the processing for
3775 tokens function, not, overriding, and procedure.
3776 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
3777 for qualified expressions, type conversions, and unchecked
3779 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
3780 processing for Ada 83 and instances.
3781 (Object_Access_Level): Merge the processing for indexed components
3782 and selected components.
3783 * uname.adb (Add_Node_Name): Merge the processing for stubs.
3785 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3787 * checks.adb (Install_Primitive_Elaboration_Check):
3788 Do not generate the check when restriction No_Elaboration_Code
3791 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3793 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
3794 of Expand_Dispatching_Call. If the denoted subprogram has a
3795 class-wide precondition, this is the only precondition that
3796 applies to the call, rather that the class-wide preconditions
3797 that may apply to the body that is executed. (This is specified
3800 2017-04-27 Yannick Moy <moy@adacore.com>
3802 * gnat1drv.adb (Adjust_Global_Switches): Issue
3803 a warning in GNATprove mode if the runtime library does not
3804 support IEEE-754 floats.
3806 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3808 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
3809 is itself inherited it does not carry any contract information,
3810 so examine its parent operation which is its Alias.
3812 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3814 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
3815 prefix can be an object reference in which case Obj'Image (X)
3816 can only be interpreted as an indexing of the parameterless
3817 version of the attribute.
3818 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
3819 an indexing or a slice operation if the attribute does not require
3820 parameters. In Ada2012 'Image also belongs in this category,
3821 and A'Image (lo .. hi) is legal and must be parsed as a slice.
3823 2017-04-27 Yannick Moy <moy@adacore.com>
3825 * exp_ch4.adb: Minor reformatting.
3826 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
3827 disable the CodePeer and C generation modes. Similar to the
3828 opposite actions done in CodePeer mode.
3830 2017-04-27 Yannick Moy <moy@adacore.com>
3832 * sem_res.adb: Remove duplicate code.
3833 * sem_attr.adb: Delete duplicate code.
3835 2017-04-27 Bob Duff <duff@adacore.com>
3837 * g-dyntab.adb: Reduce the amount of copying in
3838 Release. No need to copy items past Last.
3840 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3842 * checks.adb Add with and use clauses for Sem_Disp.
3843 (Install_Primitive_Elaboration_Check): New routine.
3844 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
3845 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
3846 processing of 'Elaborated.
3847 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
3850 2017-04-27 Bob Duff <duff@adacore.com>
3852 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
3853 If the table grows and then shrinks back to empty, we won't necessarily
3854 point back to the empty array. Code cleanups.
3855 * sinput.ads: Add 'Base to Size clause to match the declared
3858 2017-04-27 Claire Dross <dross@adacore.com>
3860 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
3861 allow the use of regular equality over elements in contracts.
3862 (Formal_Model): Ghost package containing model functions that
3863 are used in subprogram contracts.
3864 (Current_To_Last): Removed, model functions should be used instead.
3865 (First_To_Previous): Removed, model functions should be used instead.
3866 (Strict_Equal): Removed, model functions should be used instead.
3867 (No_Overlap): Removed, model functions should be used instead.
3868 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
3869 Boolean generic parameter to disable contracts for equivalence
3871 (Witness): Create a witness of a key that is used for handling of
3872 equivalence between keys.
3873 (Has_Witness): Check whether a witness is contained in a map.
3874 (W_Get): Get the element associated to a witness.
3875 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
3877 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
3878 Boolean generic parameter to disable contracts for equivalence
3880 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
3881 of equivalence on functional maps.
3882 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
3883 of equivalence on functional maps.
3885 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3887 * exp_ch9.adb (Expand_Entry_Barrier): Code
3888 cleanup. Do not perform the optimization which removes the
3889 declarations of the discriminant and component renamings when
3890 validity checks on operands and attributes are in effect.
3892 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3894 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
3895 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
3896 a-cfhama.ads, a-cofove.ads: Minor reformatting.
3898 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3900 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
3901 pointer dereference.
3902 * g-spipat.adb (Dump): Code clean up. Protect against a possible
3903 null pointer dereference.
3905 2017-04-27 Bob Duff <duff@adacore.com>
3907 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
3908 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
3909 Free renames Init, since they do the same thing.
3910 * g-table.ads: Default for Table_Low_Bound.
3911 * table.ads: Default for Table_Low_Bound, Table_Initial, and
3914 2017-04-27 Bob Duff <duff@adacore.com>
3916 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
3918 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
3919 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
3920 Reorder code so that above assertions do not fail.
3921 * table.ads: Remove obsolete comment on Locked.
3923 2017-04-27 Claire Dross <dross@adacore.com>
3925 * a-cfdlli.ads: Code cleanup.
3927 2017-04-27 Yannick Moy <moy@adacore.com>
3929 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
3930 when needed for proof. (Expand_SPARK): Call the new procedure.
3931 * exp_util.ads Fix typo.
3933 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3935 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
3938 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3940 * sem_elab.adb Add new type Visited_Element
3941 and update the contents of table Elab_Visited. Various code clean up.
3942 (Check_Elab_Call): Determine whether a prior call to
3943 the same subprogram was already examined within the same context.
3944 (Check_Internal_Call_Continue): Register the subprogram being
3945 called as examined within a particular context. Do not suppress
3946 elaboration warnings.
3948 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3950 * xoscons.adb, osint.ads: Minor reformatting.
3952 2017-04-27 Bob Duff <duff@adacore.com>
3954 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
3955 Table_Count_Type --> Table_Last_Type, because the name
3956 was confusing (a "count" usually starts at zero). Add
3957 functionality supported or needed by other tables packages
3958 (Move, Release_Threshold).
3959 * g-table.ads, g-table.adb: This is now just a thin wrapper
3960 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
3961 or needed by other tables packages (Save, Restore).
3962 * table.ads, table.adb: This is now just a thin wrapper around
3963 * g-table.ads/g-table.adb.
3964 * namet.h, scos.h, uintp.h: These files are reaching into the
3965 private data of some instances of g-table, whose names changed,
3966 so the above change requires some adjustment here. It now uses
3969 2017-04-27 Bob Duff <duff@adacore.com>
3971 * namet.adb, namet.ads: Minor: remove unused procedures.
3973 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3975 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
3976 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
3977 Add pragma Warnings on Rtype variable in nested block. *
3978 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
3979 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
3980 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
3981 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
3982 (Process_Component_List_For_Finalize): Initialize Counter_Id.
3983 (Build_Finalize_Statements): Initialize Bod_Stmts.
3984 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
3986 2017-04-27 Claire Dross <dross@adacore.com>
3988 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
3989 allow the use of regular equality over elements in contracts.
3990 (Formal_Model): Ghost package containing model functions that are
3991 used in subprogram contracts.
3992 (Current_To_Last): Removed, model
3993 functions should be used instead.
3994 (First_To_Previous): Removed, model functions should be used instead.
3995 (Strict_Equal): Removed, model functions should be used instead.
3996 (No_Overlap): Removed, model functions should be used instead.
3997 (Equivalent_Keys): Functions over cursors are removed. They were
3998 awkward with explicit container parameters.
3999 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
4000 (proof only) procedure to help GNATprove when equivalence over
4001 keys is not equality.
4003 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4005 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
4006 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
4007 Minor reformatting and code cleanups.
4009 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4011 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
4012 subsidiary of Check_Inherited_Conditions, to build pragmas for an
4013 operation whose ancestor has classwide pre/postconditions. This
4014 is used both to check the legality of the inheritance in Ada
4015 and in SPARK, and to determine whether a wrapper is needed for
4016 an inherited operation.
4017 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
4018 Improve placement of error message for inherited classwide
4019 conditions that become illegal on type derivation.
4021 2017-04-27 Yannick Moy <moy@adacore.com>
4023 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
4024 SPARK_Mode from context on generic package.
4025 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
4028 2017-04-27 Claire Dross <dross@adacore.com>
4030 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
4031 overflows in computations.
4032 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
4033 overflows in computations.
4034 (Insert): Rewrite precondition to avoid overflows in computations.
4035 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
4036 overflows in computations.
4037 (Insert): Rewrite precondition to avoid overflows in computations.
4039 2017-04-27 Steve Baird <baird@adacore.com>
4041 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
4042 flag when it is declared in order to avoid confusing CodePeer about
4043 the possibility of an uninitialized variable read.
4045 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4047 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
4048 no dimensionality error if the subtype of the expression is
4049 identical to the nominal subtype in the declaration, even though
4050 the expression itself may have been constant-folded and lack a
4052 * sem_dim.ads: Add comments on setting of dimension vectors and
4053 its interaction with node rewritings and side-effect removal.
4055 2017-04-27 Bob Duff <duff@adacore.com>
4057 * debug.adb: Minor comment correction.
4058 * sem_dim.ads: Minor reformatting and typo fixes.
4060 2017-04-27 Bob Duff <duff@adacore.com>
4062 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
4063 Last of the tables via function calls, rather than relying on layout
4066 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4068 * exp_util.adb: No wrapper in GNATprove mode.
4070 2017-04-27 Yannick Moy <moy@adacore.com>
4072 * sem_res.adb (Resolve_Comparison_Op): Always
4073 evaluate comparisons between values of universal types.
4075 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4077 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
4078 an elaboration counter nor a check when in GNATprove mode.
4079 * sem_util.adb (Build_Elaboration_Entity): Do not create an
4080 elaboration counter when in GNATprove mode.
4082 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4084 * freeze.adb: copy-paste typo.
4086 2017-04-27 Yannick Moy <moy@adacore.com>
4088 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
4089 Use correct test to detect call in GNATprove mode instead of
4092 2017-04-27 Claire Dross <dross@adacore.com>
4094 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
4095 New property function expressing that the element of a
4096 sequence are contained in the union of two sequences.
4097 (Formal_Model.M_Elements_Included): New property function
4098 expressing that the element of a sequence are another sequence.
4099 (Generic_Sorting): Use new property functions to state that
4100 elements are preserved by Sort and Merge.
4101 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
4102 allow the use of regular equality over elements in contracts.
4103 (Formal_Model): Ghost package containing model functions
4104 that are used in subprogram contracts. (Capacity):
4105 On unbounded containers, return the maximal capacity.
4106 (Current_To_Last): Removed, model functions should be used instead.
4107 (First_To_Previous): Removed, model functions should be used instead.
4108 (Append): Default parameter value replaced
4109 by new wrapper to allow more precise contracts.
4110 (Insert): Subprogram restored, it seems it was useful to users even if
4112 (Delete): Subprogram restored, it seems it was useful to users even if
4114 (Prepend): Subprogram restored, it seems it was useful to users even
4115 if it is inefficient.
4116 (Delete_First): Subprogram restored, it seems it
4117 was useful to users even if it is inefficient. (Delete_Last):
4118 Default parameter value replaced by new wrapper to allow more
4120 (Generic_Sorting.Merge): Subprogram restored.
4121 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
4122 allow the use of regular equality over elements in contracts.
4123 (Formal_Model): Ghost package containing model functions
4124 that are used in subprogram contracts. (Capacity):
4125 On unbounded containers, return the maximal capacity.
4126 (Current_To_Last): Removed, model functions should be used
4128 (First_To_Previous): Removed, model functions should be used instead.
4129 (Append): Default parameter value replaced
4130 by new wrapper to allow more precise contracts.
4131 (Insert): Subprogram restored, it seems it was useful to users even if
4133 (Delete): Subprogram restored, it seems it was useful to users even if
4135 (Prepend): Subprogram restored, it seems it was useful to users even
4136 if it is inefficient.
4137 (Delete_First): Subprogram restored, it seems it
4138 was useful to users even if it is inefficient. (Delete_Last):
4139 Default parameter value replaced by new wrapper to allow more
4141 (Generic_Sorting.Merge): Subprogram restored.
4142 (Vector): Do not reuse formal vectors, as it is no longer possible
4143 to supply them with an equality function over elements.
4145 2017-04-27 Bob Duff <duff@adacore.com>
4147 * g-dyntab.adb (Release): When allocating the new
4148 table, use the correct slice of the old table to initialize it.
4150 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
4152 * einfo.ads: Minor fixes in comments.
4154 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4156 * sem_prag.adb: disable clones in SPARK_Mode.
4158 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4160 * sem_util.ads, contracts.adb: Minor reformatting.
4162 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4164 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
4165 Build body of subprogram that has a class-wide condition that
4166 contains calls to other primitives.
4167 (Build_Class_Wide_Clone_Call); Build a call to the common
4168 class-wide clone of a subprogram with classwide conditions. The
4169 body of the subprogram becomes a wrapper for a call to the
4170 clone. The inherited operation becomes a similar wrapper to which
4171 modified conditions apply, and the call to the clone includes
4172 the proper conversion in a call the parent operation.
4173 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
4174 subprogram that has a classwide condition that contains calls to
4175 other primitives, build an internal subprogram that is invoked
4176 through a type-specific wrapper for all inherited subprograms
4177 that may have a modified condition.
4178 * sem_prag.adb (Check_References): If subprogram has a classwide
4179 condition, create entity for corresponding clone, to be invoked
4180 through wrapper subprograns.
4181 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
4182 message about placement if pragma isi internally generated.
4183 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
4184 a classwide clone, build body of clone as copy of original body,
4185 and rewrite original body as a wrapper as a wrapper for a call to
4186 the clone, so that it incorporates the original pre/postconditions
4188 * freeze.adb (Check_Inherited_Conditions): For an inherited
4189 subprogram that inherits a classwide condition, build spec and
4190 body of corresponding wrapper so that call to inherited operation
4191 gets the modified conditions.
4192 * contracts.adb (Analyze_Contracts): If analysis of classwide
4193 condition has created a clone for a primitive operation, analyze
4194 declaration of clone.
4196 2017-04-27 Steve Baird <baird@adacore.com>
4198 * exp_util.adb (Build_Allocate_Deallocate_Proc):
4199 Add "Suppress => All_Checks" to avoid generating unnecessary
4202 2017-04-27 Yannick Moy <moy@adacore.com>
4204 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
4205 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
4206 inlining body in GNATprove mode when switch -gnatdm used.
4207 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
4208 in GNATprove mode when switch -gnatdm used.
4210 2017-04-27 Arnaud Charlet <charlet@adacore.com>
4212 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
4213 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
4214 clauses, so that we keep an indication of the address clause
4215 before removing it from the tree.
4217 2017-04-27 Yannick Moy <moy@adacore.com>
4219 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
4220 of expression being qualified, when not an object name, or else
4221 evaluate the underlying name.
4223 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
4225 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
4227 2017-04-27 Justin Squirek <squirek@adacore.com>
4229 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
4230 Process_Component_List_For_Finalization as a local variable.
4231 (Process_Component_For_Finalize): Add an extra parameter to avoid
4233 (Process_Component_List_For_Finalization): Correct calls to
4234 Process_Component_For_Finalize to take Num_Comps as a parameter.
4236 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4238 * sem_ch8.adb (Find_Direct_Name): Account for the case where
4239 a use-visible entity is defined within a nested scope of an
4240 instance when giving priority to entities which were visible in
4241 the original generic.
4242 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
4244 2017-04-27 Tristan Gingold <gingold@adacore.com>
4246 * raise-gcc.c: Don't use unwind.h while compiling
4247 for the frontend, but mimic host behavior.
4249 2017-04-27 Javier Miranda <miranda@adacore.com>
4251 * sem_ch3.adb (Build_Discriminated_Subtype):
4252 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
4254 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4256 * sem_prag.adb (Analyze_Global_Item):
4257 Do not consider discriminants because they are not "entire
4258 objects". Remove the discriminant-related checks because they are
4260 (Analyze_Input_Output): Do not consider discriminants
4261 because they are not "entire objects".
4263 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4265 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
4266 perform check if the current scope does not come from source,
4267 as is the case for a rewritten task body, because check has
4268 been performed already, and may not be doable because of changed
4271 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4273 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
4274 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
4277 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4279 * sem_ch4.adb (Analyze_Call): If the return type of a function
4280 is incomplete in an context in which the full view is available,
4281 replace the type of the call by the full view, to prevent spurious
4283 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
4284 abstract subprogram so that compiler does not reject a parameter
4285 of a primitive operation of a tagged type being frozen, when
4286 the untagged type of that parameter cannot be frozen.
4288 2017-04-27 Bob Duff <duff@adacore.com>
4290 * sem_attr.adb (Compute_Type_Key): Don't walk
4291 representation items for irrelevant types, which could be in a
4292 different source file.
4294 2017-04-27 Steve Baird <baird@adacore.com>
4296 * exp_attr.adb (Expand_N_Attribute_Reference):
4297 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
4300 2017-04-27 Yannick Moy <moy@adacore.com>
4302 * exp_unst.ads: Fix typos in comments.
4304 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4306 * sem_eval.adb (Choice_Matches): Handle properly a real literal
4307 whose type has a defined static predicate.
4309 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4311 * exp_ch4.adb (Insert_Dereference_Action):
4312 Do not adjust the address of a controlled object when the
4313 associated access type is subject to pragma No_Heap_Finalization.
4316 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
4318 * gcc-interface/utils.c (gnat_type_for_size): Set
4319 TYPE_ARTIFICIAL on created types.
4321 2017-04-27 Claire Dross <dross@adacore.com>
4323 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4324 modifications in functional containers.
4325 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4326 to improve readablity. Subprograms are separated between basic
4327 operations, constructors and properties. Universally quantified
4328 formulas in contracts are factorized in independant functions
4329 with a name and a comment. Names of parameters are improved.
4331 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4333 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4335 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4337 * sem_res.adb (Resolve_Type_Conversion): Do not
4338 install a predicate check here since this is already done during
4339 the expansion phase. Verify whether the operand satisfies the
4340 static predicate (if any) of the target type.
4341 * sem_ch3.adb (Analyze_Object_Declaration): Do
4342 not install a predicate check if the object is initialized by
4343 means of a type conversion because the conversion is subjected
4346 2017-04-27 Tristan Gingold <gingold@adacore.com>
4348 * raise.c (__gnat_builtin_longjmp): Remove.
4349 (__gnat_bracktrace):
4350 Add a dummy definition for the compiler (__gnat_eh_personality,
4351 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
4352 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
4353 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
4354 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
4355 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
4356 and a-except-2005.adb.
4357 * raise-gcc.c: Allow build in compiler, compiled as a C++
4359 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
4360 (db): Constify msg_format.
4361 (get_call_site_action_for): Don't use void arithmetic.
4362 * system.ads (Frontend_Exceptions): Set to False.
4363 (ZCX_By_Default): Set to True.
4364 (GCC_ZC_Support): Set to True.
4365 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
4367 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
4368 in gnat1 and gnatbind.
4369 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
4370 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
4371 * s-excmac.ads, s-excmac.adb: Copy of variants.
4372 * a-except.o: Adjust preequisites.
4373 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
4375 2017-04-27 Claire Dross <dross@adacore.com>
4377 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4378 modifications in functional containers.
4379 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4380 to improve readablity. Subprograms are separated between basic
4381 operations, constructors and properties. Universally quantified
4382 formulas in contracts are factorized in independant functions
4383 with a name and a comment. Names of parameters are improved.
4385 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4387 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4389 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4391 * sem_res.adb (Resolve_Type_Conversion): Do not
4392 install a predicate check here since this is already done during
4393 the expansion phase. Verify whether the operand satisfies the
4394 static predicate (if any) of the target type.
4395 * sem_ch3.adb (Analyze_Object_Declaration): Do
4396 not install a predicate check if the object is initialized by
4397 means of a type conversion because the conversion is subjected
4400 2017-04-27 Tristan Gingold <gingold@adacore.com>
4402 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
4403 replaced by their variants).
4405 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4407 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
4408 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
4409 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
4411 2017-04-27 Tristan Gingold <gingold@adacore.com>
4413 * s-excmac-gcc.ads, s-excmac-gcc.adb,
4414 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
4417 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4419 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
4420 the loop which detects potential enclosing transient scopes. The
4421 loop now terminates much earlier as transient scopes are bounded
4422 by packages and subprograms.
4424 2017-04-27 Claire Dross <dross@adacore.com>
4426 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
4427 allow the use of regular equality over elements in contracts.
4428 (Cursor): Type is now public so that it can be used in
4430 (Formal_Model): Ghost package containing
4431 model functions that are used in subprogram contracts.
4432 (Current_To_Last): Removed, model functions should be used
4434 (First_To_Previous): Removed, model functions should
4436 (Strict_Equal): Removed, model functions
4437 should be used instead.
4438 (Append): Default parameter value
4439 replaced by new wrapper to allow more precise contracts.
4440 (Insert): Default parameter value replaced by new wrapper to
4441 allow more precise contracts.
4442 (Delete): Default parameter
4443 value replaced by new wrapper to allow more precise contracts.
4444 (Prepend): Default parameter value replaced by new wrapper to
4445 allow more precise contracts.
4446 (Delete_First): Default parameter
4447 value replaced by new wrapper to allow more precise contracts.
4448 (Delete_Last): Default parameter value replaced by new wrapper
4449 to allow more precise contracts.
4451 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4453 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
4454 for object declarations.
4455 (Expand_SPARK_N_Object_Declaration): New routine.
4456 * sem_elab.adb (Check_A_Call): Include calls to the
4457 Default_Initial_Condition procedure of a type under the SPARK
4458 elaboration checks umbrella.
4460 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4462 * sem.adb (Analyze): Diagnose an illegal iterated component
4464 * sem_util.ads, sem_util.adb
4465 (Diagnose_Iterated_Component_Association): New routine.
4467 2017-04-27 Bob Duff <duff@adacore.com>
4469 * adaint.c (__gnat_get_current_dir): Return 0 in length if
4471 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
4472 exception if getcwd failed.
4474 2017-04-27 Yannick Moy <moy@adacore.com>
4476 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
4477 entities with special prefix.
4479 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4481 * debug.adb Change the documentation of switch -gnatd.s.
4482 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
4483 to manage the secondary stack when an enclosing scope already
4484 performs this functionality (aka relaxed management). Switch
4485 -gnatd.s may be used to force strict management in which case
4486 the block will manage the secondary stack unconditionally. Add
4487 a guard to stop the traversal when encountering a package or a
4490 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4492 * sem_res.adb (Resolve_Call): Refine further the handling of
4493 limited views of return types in function calls. If the function
4494 that returns a limited view appears in the current unit,
4495 we do not replace its type by the non-limited view because
4496 this transformation is performed int the back-end. However,
4497 the type of the call itself must be the non-limited view, to
4498 prevent spurious resolution errors.
4500 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4502 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
4503 Removed, proposed implementation using generics for class-wide
4504 preconditions proved impractical.
4505 (Class_Wide_Clone): New attribute of subprogram. Designates
4506 subprogram created for primitive operations with class-wide
4507 pre/postconditions that contain calls to other primitives. The
4508 clone holds the body of the original primitive, but the
4509 pre/postonditions do not apply to it. The original body is
4510 rewritten as a wrapper for a call to the clone.
4511 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
4512 the flag is set, no code for the corresponding pre/postconditions
4513 is inserted into its body.
4515 2017-04-27 Bob Duff <duff@adacore.com>
4517 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
4518 Scalar_Storage_Order if -gnatI is given.
4519 * sem_prag.adb (Analyze_Pragma): Ignore
4520 Default_Scalar_Storage_Order if -gnatI is given.
4522 2017-04-27 Claire Dross <dross@adacore.com>
4524 * a-cofuba.ads (Add): Take as an additional input parameter
4525 the position where the element should be inserted.
4526 (Remove): New function that removes an element from the container.
4527 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
4528 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
4529 (Remove): New function that removes an element from a set.
4530 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
4531 (Remove): New function that removes an element from a sequence.
4532 (Insert): New function that adds anywhere in a sequence.
4534 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4536 * checks.adb (Generate_Range_Check): Revert previous change.
4538 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4540 * sem_util.adb: Minor reformatting/rewording.
4542 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4544 * lib-xref.adb (Generate_Reference): The use
4545 of attribute 'Result is not considered a violation of pragma
4548 2017-04-27 Justin Squirek <squirek@adacore.com>
4550 * cstand.adb (Create_Standard): Correctly set
4551 Directly_Designated_Type for Any_Access.
4552 * sem_type.adb (Covers): Minor grammar fixes.
4554 2017-04-27 Bob Duff <duff@adacore.com>
4556 * sem_attr.adb: Minor cleanup.
4558 2017-04-27 Claire Dross <dross@adacore.com>
4560 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
4561 private child of Ada.Containers used to implement all functional
4563 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
4564 child of Ada.Containers. It provides functional indefinite unbounded
4565 maps which can be used as high level models for specification
4567 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
4568 child of Ada.Containers. It provides functional indefinite unbounded
4569 sets which can be used as high level models for specification
4571 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
4572 child of Ada.Containers. It provides functional indefinite unbounded
4573 vectors which can be used as high level models for specification
4575 * Makefile.rtl: Add new packages.
4576 * impunit.adb: Add new packages.
4578 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4580 * sem_ch4.adb: Minor reformatting.
4582 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4584 * sem_ch12.adb (Analyze_Associations): minor reformatting.
4585 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
4586 point type actual that has user-defined arithmetic primitives,
4587 when there is a previous actual for a formal package that defines
4588 a fixed-point type with the parent user-defined operator.
4590 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4592 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
4593 * sem_attr.adb (Resolve_Attribute): Generate a range check when
4594 the component type allows range checks.
4596 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4598 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
4599 corresponding declaration, because formal derived types are
4600 rewritten as private extensions.
4602 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4604 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
4605 dimensions of operands if node has been analyzed already, because
4606 previous analysis and dimension checking will have removed the
4607 dimension information from the operands.
4609 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4611 * debug.adb: Document the use of switch -gnatd.s.
4612 * einfo.ads Update the documentation on attribute
4613 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
4614 the uses of these attributes from certain entities.
4615 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
4616 which determines whether the block should continue to manage
4617 the secondary stack.
4618 (Manages_Sec_Stack): New routine.
4620 2017-04-27 Bob Duff <duff@adacore.com>
4622 * atree.ads: Minor edit.
4624 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4626 * sinfo.ads: Update the section on Ghost mode. Add
4627 a section on SPARK mode. Update the placement of section on
4628 expression functions.
4630 2017-04-27 Bob Duff <duff@adacore.com>
4632 * sinput.adb (Get_Source_File_Index): Don't
4633 assert that S is in the right range in the case where this is
4634 a .dg file under construction.
4636 2017-04-27 Yannick Moy <moy@adacore.com>
4638 * sem_util.adb (Check_Result_And_Post_State):
4639 Handle more precisely each conjunct in expressions formed by
4640 and'ing sub-expressions.
4642 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4644 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
4646 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4648 * gnat_rm.texi, gnat_ugn.texi,
4649 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4650 doc/gnat_ugn/platform_specific_information.rst,
4651 doc/gnat_ugn/gnat_and_program_execution.rst,
4652 doc/gnat_ugn/gnat_utility_programs.rst,
4653 doc/gnat_ugn/the_gnat_compilation_model.rst,
4654 doc/gnat_rm/implementation_defined_attributes.rst,
4655 doc/gnat_rm/the_gnat_library.rst,
4656 doc/gnat_rm/implementation_defined_pragmas.rst,
4657 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4658 doc/gnat_rm/implementation_of_specific_ada_features.rst,
4659 doc/gnat_rm/implementation_defined_aspects.rst,
4660 doc/gnat_rm/implementation_defined_characteristics.rst: Update
4663 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4665 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
4666 generating C code on complex case expressions.
4668 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4670 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
4671 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
4672 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
4673 Ada_2012 instead of Ada_2005 to be compatible with the above
4675 * bindgen.adb: Silence new warning on pragma Ada_95.
4677 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4679 * checks.adb (Generate_Range_Check): Revert part of previous change.
4681 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4683 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
4684 container indexing operation that appears as a an actual in a
4685 parameter association in a procedure call.
4687 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
4689 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
4690 Fix spelling mistakes.
4692 2017-04-25 Bob Duff <duff@adacore.com>
4694 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
4695 * sinput-p.adb: Use regular fat pointers, with bounds checking,
4696 for source buffers. Fix misc obscure bugs.
4697 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
4698 checking, for source buffers. Modify representation clause for
4699 Source_File_Record as appropriate. Move Source_File_Index_Table
4700 from spec to body, because it is not used outside the body.
4701 Move Set_Source_File_Index_Table into the private part, because
4702 it is used only in the body and in children. Use trickery to
4703 modify the dope in the generic instantiation case. It's ugly,
4704 but not as ugly as the previous method. Fix documentation.
4705 Remove obsolete code.
4706 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
4707 indexing in source buffers.
4708 * fmap.adb: Avoid conversions from one string type to another.
4709 Remove a use of global name buffer.
4710 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
4713 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4715 * exp_util.adb, exp_ch4.adb: Minor reformatting.
4717 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4719 * checks.adb: Code clean up in various routines.
4720 (Generate_Range_Check): Do not generate a range check when the
4721 expander is not active or when index/range checks are suppressed
4723 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
4724 Remove variants that include a Supress parameter. These routines
4725 are never used, and were introduced before the current scope-based
4726 check suppression method.
4728 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
4730 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
4731 code and some subprogram calls that are now noop.
4733 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4735 * exp_ch4.adb (Expand_N_Case_Expression): Take
4736 Minimize_Expression_With_Actions into account when possible.
4738 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4740 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
4741 (Known_Null): Moved to Sem_Util.
4742 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
4743 (Known_Null): Moved to Sem_Util.
4744 * sem_util.adb Add new enumeration type Null_Status_Kind.
4745 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
4746 this routine is now carried out by Null_Status.
4747 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
4748 is now carried out by Null_Status.
4749 (Null_Status): New routine.
4750 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
4751 (Known_Null): Moved from Exp_Util.
4753 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4755 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
4756 error on the return type of an expression function that is a
4757 completion, if the type is derived from a generic formal type.
4759 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4761 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
4762 conversion are those of the target type.
4764 2017-04-25 Bob Duff <duff@adacore.com>
4766 * a-clrefi.adb: Minor cleanup.
4768 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4770 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
4772 2017-04-25 Bob Duff <duff@adacore.com>
4774 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
4775 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
4776 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
4777 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
4778 the Internal_Source buffer. This removes the incorrect call to "="
4779 the customer noticed.
4780 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
4781 eventually need to eliminate them altogether. Or else get rid
4782 of zero-origin addressing.
4784 2017-04-25 Claire Dross <dross@adacore.com>
4786 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
4787 function used in GNATprove to know if an expression contains
4788 non-dispatching calls on primitives of a tagged type.
4790 2017-04-25 Bob Duff <duff@adacore.com>
4792 * rtsfind.adb (Initialize): Initialize
4793 First_Implicit_With. Building the compiler with Normalize_Scalars
4794 and validity checking finds this being used as an uninitialized
4797 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4799 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
4800 Add a warning about SPARK mode management. The routine now
4801 saves and restores both the mode and associated pragma.
4802 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
4803 SPARK mode management. The routine now saves and restores both
4804 the mode and associated pragma.
4805 (Analyze_Object_Contract):
4806 Add a warning about SPARK mode management. The routine
4807 now saves and restores both the mode and associated pragma.
4808 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
4809 management. The routine now saves and restores both the mode
4810 and associated pragma. (Analyze_Package_Contract): Add a warning
4811 about SPARK mode management. The routine now saves and restores
4812 both the mode and associated pragma.
4813 (Analyze_Task_Contract):
4814 Add a warning about SPARK mode management. The routine now saves
4815 and restores both the mode and associated pragma.
4816 * expander.adb (Expand): Change the way the Ghost mode is saved
4818 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
4820 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
4822 * exp_util.adb (Build_DIC_Procedure_Body):
4823 Change the way the Ghost mode is saved and restored.
4824 (Build_DIC_Procedure_Declaration): Change the way the Ghost
4825 mode is saved and restored.
4826 (Build_Invariant_Procedure_Body):
4827 Change the way the Ghost mode is saved and restored.
4828 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
4829 mode is saved and restored.
4830 (Make_Predicate_Call): Change the
4831 way the Ghost mode is saved and restored.
4832 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
4834 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4836 (Mark_And_Set_Ghost_Body): Remove parameter
4837 Mode and its assignment.
4838 (Mark_And_Set_Ghost_Completion):
4839 Remove parameter Mode and its assignment.
4840 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
4842 (Mark_And_Set_Ghost_Instantiation): Remove parameter
4843 Mode and its assignment.
4844 (Mark_And_Set_Ghost_Procedure_Call):
4845 Remove parameter Mode and its assignment.
4847 Remove parameter Mode and its assignment.
4848 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4849 and update the comment on usage.
4850 (Mark_And_Set_Ghost_Body):
4851 Remove parameter Mode and update the comment on usage.
4852 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
4853 update the comment on usage.
4854 (Mark_And_Set_Ghost_Declaration):
4855 Remove parameter Mode and update the comment on usage.
4856 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
4857 update the comment on usage.
4858 (Mark_And_Set_Ghost_Procedure_Call):
4859 Remove parameter Mode and update the comment on usage.
4860 (Set_Ghost_Mode): Remove parameter Mode and update the comment
4862 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
4864 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
4865 of obsolete field SPARK_Mode_Pragma.
4866 (Load_Main_Source): Remove
4867 the assignment of obsolete field SPARK_Mode_Pragma.
4868 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
4869 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
4870 the assignment of obsolete field SPARK_Mode_Pragma.
4871 (Ensure_System_Dependency): Remove the assignment of obsolete
4872 field SPARK_Mode_Pragma.
4873 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
4874 mode management. Change the way Ghost and SPARK modes are saved
4876 * sem.adb (Analyze): Change the way the Ghost mode is saved
4878 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
4879 Ghost mode is saved and restored.
4880 (Process_Full_View): Change
4881 the way the Ghost mode is saved and restored.
4882 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
4883 mode is saved and restored.
4884 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
4885 mode is saved and restored.
4886 (Analyze_Subprogram_Body_Helper):
4887 Change the way the Ghost mode is saved and restored.
4888 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
4889 Ghost mode is saved and restored.
4890 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
4891 management. Save the SPARK mode-related data prior to any changes
4892 to the scope stack and contexts. The mode is then reinstalled
4893 before the subunit is analyzed in order to restore the original
4894 view of the subunit.
4895 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
4896 warning on region management. Change the way the Ghost and
4897 SPARK modes are saved and restored.
4898 (Inline_Instance_Body):
4899 Add a warning about SPARK mode management. Code clean up.
4900 (Analyze_Subprogram_Instantiation): Update the warning on region
4901 management. Change the way the Ghost and SPARK modes are saved
4903 (Instantiate_Package_Body): Update the warning
4904 on region management. Change the way the Ghost and SPARK modes
4905 are saved and restored.
4906 (Instantiate_Subprogram_Body): Update
4907 the warning on region management. Change the way the Ghost and
4908 SPARK modes are saved and restored.
4909 (Set_Instance_Env): Add a
4910 warning about SPARK mode management. Change the way SPARK mode
4911 is saved and restored.
4912 * sem_ch13.adb (Build_Predicate_Functions):
4913 Change the way the Ghost mode is saved and restored.
4914 (Build_Predicate_Function_Declaration): Change the way the Ghost
4915 mode is saved and restored.
4916 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
4917 mode management. Change the way SPARK mode is saved and restored.
4918 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4919 Change the way the Ghost mode is saved and restored.
4920 (Analyze_Initial_Condition_In_Decl_Part): Change the way
4921 the Ghost mode is saved and restored.
4923 Change the way the Ghost mode is saved and restored.
4924 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
4925 Ghost mode is saved and restored.
4926 * sem_util.adb (Install_SPARK_Mode): New routine.
4927 (Restore_SPARK_Mode): New routine.
4928 (Save_SPARK_Mode_And_Set): Removed.
4929 (Set_SPARK_Mode): New routine.
4930 * sem_util.ads (Install_SPARK_Mode): New routine.
4931 (Restore_SPARK_Mode): New routine.
4932 (Save_SPARK_Mode_And_Set): Removed.
4933 (Set_SPARK_Mode): New routine.
4935 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4937 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
4938 to determine whether a type is declared in a local package that
4939 has not yet been frozen.
4940 * freeze.adb (Freeze_Before): Use new predicate to determine
4941 whether a local package must be installed on the scope stack
4942 in order to evaluate in the proper scope actions generated by
4943 aspect specifications, such as Predicate
4944 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
4945 using new predicate.
4947 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4949 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
4950 comparisons between non- scalar expressions expressions because
4951 their values cannot be invalidated.
4952 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
4955 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4957 * par_sco.adb: Minor reformatting.
4959 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4961 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
4962 is a type from an unfrozen local package, install package to
4963 complete the analysis of delayed aspects of the type.
4965 2017-04-25 Tristan Gingold <gingold@adacore.com>
4967 * bingen.adb (System_Version_Control_Used): New variable.
4968 (Resolve_Binder_Options): Set the above variable.
4969 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
4970 (Gen_Elab_Order): Emit blank line before.
4972 2017-04-25 Justin Squirek <squirek@adacore.com>
4974 * sem_cat.adb (Validate_RT_RAT_Component): Added
4975 an extra check to ignore incomplete types.
4977 2017-04-25 Thomas Quinot <quinot@adacore.com>
4979 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
4980 bogus circuitry for the case where Name is Predicate.
4982 2017-04-25 Thomas Quinot <quinot@adacore.com>
4984 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
4985 Create SCOs for Predicate aspects in disabled
4986 state initially, to be enabled later on by...
4987 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
4988 SCO for predicate as enabled.
4990 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4992 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
4993 pragmas Warnings Off / On.
4994 * namet.adb (Finalize): Remove now obsolete pair of pragmas
4996 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
4997 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
4998 consider comparisons between static expressions because their
4999 values cannot be invalidated.
5000 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
5002 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
5003 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
5005 2017-04-25 Bob Duff <duff@adacore.com>
5007 * sem_elab.adb (In_Task_Activation): Trace internal calls in
5010 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5012 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
5015 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5017 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
5018 On/Off to defend against a spurious warning in conditional
5020 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
5021 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
5022 defend against a spurious warning in conditional compilation.
5023 * output.adb Add a pair of pragma Warnings On/Off to defend
5024 against a spurious warning in conditional compilation.
5025 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
5026 (Fold_General_Op): New routine.
5027 (Fold_Static_Real_Op): New routine.
5028 (Test_Comparison): New routine.
5029 * sem_eval.ads (Test_Comparison): New routine.
5030 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
5031 (Warn_On_Constant_Valid_Condition): New routine.
5032 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
5033 to detect a specific case.
5034 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
5035 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
5036 to defend against a spurious warning in conditional compilation.
5037 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
5038 against a spurious warning in conditional compilation.
5039 * usage.adb Add a pair of pragma Warnings On/Off to defend
5040 against a spurious warning in conditional compilation.
5042 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5044 * sinfo.ads, sem_ch13.adb: Update comment.
5046 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5048 * sem_util.adb (Is_Post_State): A reference to a
5049 generic in out parameter is considered a change in the post-state
5052 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5054 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
5055 declaration of a subprogram instance within its wrapper package,
5056 skip over null statements that may result from the rewriting of
5059 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5061 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
5062 If the type is an unchecked_union, replace the attribute with
5063 a Raise_Program_Error (rather than inserting such before the
5064 attribute reference) to handle properly the case where we are
5065 processing a component of a larger record, and we need to prevent
5066 further expansion for the unchecked union.
5067 (Expand_Attribute_Reference, case 'Write): If the type is
5068 an unchecked_union, check whether enclosing scope is a Write
5069 subprogram. Replace attribute with a Raise_Program_Error if the
5070 discriminants of the unchecked_union type have not default values
5071 because such a use is erroneous..
5073 2017-04-25 Tristan Gingold <gingold@adacore.com>
5075 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
5076 Add relative_deadline to task record on edf profile.
5077 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
5078 (Make_Task_Create_Call): Pass relative_deadline value.
5079 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
5080 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
5081 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
5082 * sem_prag.adb (Set_Ravenscar_Profile): Handle
5083 GNAT_Ravenscar_EDF (set scheduling policy).
5084 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
5086 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
5087 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
5089 (Pragma_Deadline_Floor): New pragma.
5090 * targparm.adb (Get_Target_Parameters): Recognize
5091 GNAT_Ravenscar_EDF profile.
5093 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5095 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
5097 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5099 * sem_aux.adb (Nearest_Ancestor): Use original node of type
5100 declaration to locate nearest ancestor, because derived
5101 type declarations for record types are rewritten as record
5103 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
5104 properly derivations that are completions of private types.
5105 (Add_Predicates): If type is private, examine rep. items of full
5106 view, which may include inherited predicates.
5107 (Build_Predicate_Functions): Ditto.
5109 2017-04-25 Javier Miranda <miranda@adacore.com>
5111 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
5112 to generate new entities for subtype declarations located in
5113 Expression_With_Action nodes.
5115 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5117 * sem_elab.adb (Check_A_Call): Remove
5118 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
5119 need for Elaborate_All when SPARK elaboration checks are
5120 required. Update the checks for instances, variables, and calls
5121 to Default_Initial_Condition procedures.
5123 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5125 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
5126 into a boolean aspect, in analogy with the Ada aspect No_Return.
5128 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5130 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
5132 2017-04-25 Bob Duff <duff@adacore.com>
5134 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
5135 Is_True_Constant for an array variable that is passed to a
5136 foreign function as an 'in' parameter.
5137 * debug.adb: Document -gnatd.q.
5139 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5141 * sem_ch6.adb (Analyze_Expression_Function): If expression function
5142 is completion and return type is an access type do not freeze
5143 designated type: this will be done in the process of freezing
5144 the expression if needed.
5145 (Freeze_Expr_Types): Check whether type is complete before
5146 creating freeze node, to provide a better error message if
5147 reference is premature.
5148 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
5149 functions created by type derivations.
5151 2017-04-25 Pascal Obry <obry@adacore.com>
5153 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
5155 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5157 * sem_res.adb (Resolve_Type_Conversion):
5158 When resolving against any fixed type, set the type of the
5159 operand as universal real when the operand is a multiplication
5160 or a division where both operands are of any fixed type.
5161 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
5162 placement of an error message by pointing to the operand of a
5163 type conversion rather than the conversion itself.
5165 2017-04-25 Thomas Quinot <quinot@adacore.com>
5167 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
5168 Needs_Debug_Info when producing SCOs.
5170 2017-04-25 Thomas Quinot <quinot@adacore.com>
5172 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
5173 Always pass a null finalization master for a library level named access
5174 type to which a pragme No_Heap_Finalization applies.
5176 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5180 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
5181 set to A'First(2) and vice versa.
5183 2017-04-25 Yannick Moy <moy@adacore.com>
5185 * freeze.adb (Freeze_Record_Type): Remove obsolete
5186 rule on volatile tagged record restriction on SPARK code.
5188 2017-04-25 Yannick Moy <moy@adacore.com>
5190 * sem_prag.adb (minor) Fix SPARK RM reference.
5192 2017-04-25 Yannick Moy <moy@adacore.com>
5194 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
5195 comment to reflect which entity is chosen as unique entity.
5196 (Unique_Entity): Return full view instead of private spec for
5197 protected type or task type. Fix possible incorrect access when
5200 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5202 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
5203 array types only instead of all packed array types.
5205 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5207 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
5208 dimension system, verify that dimensions of both match.
5209 (Check_Conformance): Add error message in case of dimension
5211 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
5214 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5216 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
5219 2017-04-25 Yannick Moy <moy@adacore.com>
5221 * sem_util.adb: Minor refactoring.
5222 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
5224 2017-04-25 Claire Dross <dross@adacore.com>
5226 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
5227 ultimate alias when accessing overridden operation. Indeed, if the
5228 overridden operation is itself inherited, it won't have any explicit
5231 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5233 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
5234 overlap if the two formals have different types, because formally
5235 the corresponding actuals cannot designate the same objects.
5237 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5239 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
5240 dimensions are present from context, use them. b) If operand is
5241 a static constant rewritten as a literal, obtain the dimensions
5242 from the original declaration, otherwise use dimensions of type
5243 established from context.
5245 2017-04-25 Yannick Moy <moy@adacore.com>
5247 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
5248 of array that is private.
5250 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5252 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
5255 2017-04-25 Yannick Moy <moy@adacore.com>
5257 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
5260 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5262 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
5263 the check that recognizes a call to a private overridding and
5264 replaces the called subprogram with its alias.
5266 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5268 * exp_util.adb: Minor reformatting.
5270 2017-04-25 Justin Squirek <squirek@adacore.com>
5272 * exp_ch3.adb (Freeze_Type): Add condition to always treat
5273 interface types as a partial view of a private type for the
5274 generation of invariant procedure bodies.
5275 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
5276 Add a condition to get the Corresponding_Record_Type for
5277 concurrent types, add condition to return in the absence of a
5278 class in the pragma, remove call to Replace_Type_References,
5279 and add call to Replace_References.
5280 (Add_Interface_Invariatns),
5281 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
5282 to including the working type T.
5283 (Add_Own_Invariants): Remove
5284 legacy condition for separate units, remove dispatching for ASIS
5285 and save a copy of the expression in the pragma expression.
5286 (Build_Invariant_Procedure_Body): Default initalize vars,
5287 remove return condition on interfaces, always use the
5288 private type for interfaces, and move the processing of types
5289 until after the processing of invariants for the full view.
5290 (Build_Invariant_Procedure_Declaration): Remove condition
5291 to return if an interface type is encountered and add
5292 condition to convert the formal parameter to its class-wide
5293 counterpart if Work_Typ is abstract.
5294 (Replace_Type): Add call to Remove_Controlling_Arguments.
5295 (Replace_Type_Ref): Remove class-wide dispatching for the current
5296 instance of the type.
5297 (Replace_Type_References): Remove parameter "Derived"
5298 (Remove_Controlling_Arguments): Created in order to removing
5299 the controlliong argument from calls to primitives in the case
5300 of the formal parameter being an class-wide abstract type.
5301 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
5302 to the change made to Freeze_Type in exp_ch3. Add a condition
5303 to treat interface types as a partial view.
5304 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
5305 to Build_Invariant_Procedure_Declaration to properly generate a
5306 "partial" invariant procedure when Typ is an interface.
5308 2017-04-25 Bob Duff <duff@adacore.com>
5310 * a-numeri.ads: Go back to using brackets encoding for the Greek
5313 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5315 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
5316 (10-15): if derived type T with progenitors is abstract,
5317 and primitive P of this type inherits non-trivial classwide
5318 preconditions from both a parent operation and from an interface
5319 operation, then the inherited operation is abstract if the parent
5320 operation is not null.
5321 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
5322 with Covered_Interface_Op to yield the actual interface operation
5323 that is implemented by a given inherited operation.
5325 2017-04-25 Javier Miranda <miranda@adacore.com>
5327 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
5328 and right operands after performing the validity checks. Required
5329 because validity checks may remove side effects from the operands.
5331 2017-04-25 Javier Miranda <miranda@adacore.com>
5333 * exp_attr.adb (Attribute_Unrestricted_Access):
5334 Do not disable implicit type conversion. Required to generate
5335 code that displaces the pointer to reference the secondary
5338 2017-04-25 Pascal Obry <obry@adacore.com>
5340 * prj-attr.adb, snames.ads-tmpl: Add package Install's
5341 Required_Artifacts attribute.
5343 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5345 * sem_util.adb (Same_Value): String literals are compile-time
5346 values, and comparing them must use Expr_Value_S.
5348 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5350 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
5351 dereference is introduced for the object, and the object is
5352 overloaded, do not check whether it is aliased, because it may
5353 include an implicit dereference.
5354 * sem_type.adb (Disambiguate): If two interpretations are access
5355 attribute types with the same designated type keep either of
5356 them and do not report an ambiguity. A true ambiguity will be
5359 2017-04-25 Bob Duff <duff@adacore.com>
5361 * a-numeri.ads: Change the encoding of Greek letter Pi from
5362 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
5363 to indicate the encoding. We considered using a byte order mark
5364 (BOM), but that causes various trouble (misc software eats the
5365 BOM, if you have a patch with a BOM, then it's not at the start
5366 of the patch, so it's not a BOM, the BOM affects with-ing files,
5368 * scng.adb, s-wchcnv.adb: Minor.
5370 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5372 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
5373 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5375 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
5376 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
5377 Improve error message on operations that inherit non-conforming
5378 classwide preconditions from ancestor and progenitor.
5379 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
5380 moved here from sem_ch3.
5381 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5382 check given in RM 6.1.1 (17) concerning renamings of overriding
5383 operations that inherits class-wide preconditions from ancestor
5386 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5388 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
5389 (Build_Adjust_Statements): Code cleanup.
5390 (Build_Finalizer): Update the initialization of
5392 (Build_Finalize_Statements): Code cleanup.
5393 (Build_Initialize_Statements): Code cleanup.
5394 (Make_Deep_Array_Body): Update the initialization of
5396 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
5397 (Process_Object_Declaration): Generate a null exception handler only
5398 when exceptions are allowed.
5399 (Process_Transients_In_Scope): Update the initialization of
5401 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
5403 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
5404 restrictions when the handler is internally generated and the
5407 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5409 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
5410 enforce legality rule on classwide preconditions inherited from
5411 both an ancestor and a progenitor (RM 6.1.1 (10-13).
5412 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
5413 subprogram need not be dispatching if it appears in a precondition
5414 for an abstract or null subprogram.
5416 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5418 * sem_ch10.adb: Minor typo fix.
5420 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5422 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
5424 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5426 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
5427 have a length which is a power of 2.
5428 (Is_Predefined_File_Name): Likewise. Adjust comment.
5430 2017-04-25 Bob Duff <duff@adacore.com>
5432 * exp_aggr.adb (Component_Count): Protect the
5433 arithmetic from attempting to convert a value >= 2**31 to Int,
5434 which would otherwise raise Constraint_Error.
5436 2017-04-25 Bob Duff <duff@adacore.com>
5438 * opt.ads (Locking_Policy): Fix incorrect documentation. The
5439 first character of the policy name is not unique.
5441 2017-04-25 Bob Duff <duff@adacore.com>
5443 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
5444 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
5445 about this flag not being used. It was already used, and it is
5448 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5450 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
5451 (Ignore_SPARK_Mode_Pragmas): New routine.
5452 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
5453 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
5454 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
5456 (Ignore_SPARK_Mode_Pragmas): New routine
5457 along with pragma Inline.
5458 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
5459 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
5460 Ignore_SPARK_Mode_Pragmas_In_Instance.
5461 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
5462 Save and restore the value of global flag
5463 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
5464 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
5465 the corresponding spec or the body must ignore all SPARK_Mode
5466 pragmas found within.
5467 (Analyze_Subprogram_Declaration): Mark
5468 the spec when it needs to ignore all SPARK_Mode pragmas found
5469 within to allow the body to infer this property in case it is
5470 instantiated or inlined later.
5471 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
5472 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5473 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5474 when the corresponding spec also ignored all SPARK_Mode pragmas
5476 (Analyze_Package_Declaration): Mark the spec when
5477 it needs to ignore all SPARK_Mode pragmas found within to allow
5478 the body to infer this property in case it is instantiated or
5480 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
5481 Save and restore the value of flag
5482 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5483 formal spec when it needs to ignore all SPARK_Mode
5484 pragmas found within to allow the body to infer this
5485 property in case it is instantiated or inlined later.
5486 (Analyze_Package_Instantiation): Save and restore the value
5487 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
5488 the instance spec when it needs to ignore all SPARK_Mode
5489 pragmas found within to allow the body to infer this
5490 property in case it is instantiated or inlined later.
5491 (Analyze_Subprogram_Instantiation): Save and restore the value
5492 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5493 instance spec and anonymous package when they need to ignore
5494 all SPARK_Mode pragmas found within to allow the body to infer
5495 this property in case it is instantiated or inlined later.
5496 (Instantiate_Package_Body): Save and restore the value of global
5497 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
5498 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
5499 corresponding instance spec also ignored all SPARK_Mode pragmas
5501 (Instantiate_Subprogram_Body): Save and restore the
5502 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5503 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5504 when the corresponding instance spec also ignored all SPARK_Mode
5505 pragmas found within.
5506 * sem_prag.adb (Analyze_Pragma): Update the reference to
5507 Ignore_Pragma_SPARK_Mode.
5508 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
5509 all SPARK_Mode pragmas defined within yields mode "off".
5511 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5513 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
5515 2017-04-25 Bob Duff <duff@adacore.com>
5517 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
5518 All_Checks" to avoid generating unnecessary checks.
5519 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
5521 * sem.ads: Fix comment.
5522 * expander.ads: Fix comment.
5523 * exp_atag.ads: Fix comment: "Index = 0" should be
5526 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5528 * s-taprop-linux.adb: Minor editorial fixes.
5530 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5532 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
5533 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
5534 variable and set it to True whenever the main hash table is
5535 populated. Short- circuit the Assoc function if it is false
5536 and add associated guards.
5538 2017-04-25 Olivier Hainque <hainque@adacore.com>
5540 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
5541 specs without elaboration code that have an elaboration counter
5542 nevertheless, e.g. when compiled with -fpreserve-control-flow.
5543 * sem_ch10.adb (Analyze_Compilation_Unit):
5544 Set_Elaboration_Entity_Required when requested to preserve
5545 control flow, to ensure the unit elaboration is materialized at
5546 bind time, resulting in the inclusion of the unit object file
5547 in the executable closure at link time.
5549 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5551 * exp_dbug.adb: In Debug_Renaming_Declaration,
5552 when dealing with indexed component, accept to produce a renaming
5553 symbol when the index is an IN parameter or when it is a name
5554 defined in an outer scope.
5556 2017-04-25 Yannick Moy <moy@adacore.com>
5558 * errout.adb (Error_Msg): Adapt continuation
5559 message in instantiations and inlined bodies for info messages.
5561 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5563 * fname.adb (Has_Internal_Extension): Add pragma Inline.
5564 Use direct 4-character slice comparisons.
5566 pragma Inline. (Has_Suffix): Delete.
5567 (Is_Internal_File_Name):
5568 Test Is_Predefined_File_Name first.
5569 (Is_Predefined_File_Name):
5570 Use direct slice comparisons as much as possible and limit all
5571 comparisons to at most 8 characters.
5573 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5575 * checks.adb (Insert_Valid_Check): Code cleanup.
5576 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
5577 (Expand_Actuals): Generate proper copy-back for a validation
5578 variable when it acts as the argument of a type conversion.
5579 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
5580 predicate to operate on type qualifications.
5582 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5584 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
5587 2017-04-25 Bob Duff <duff@adacore.com>
5589 * sem_prag.adb (No_Return): Give an error if the pragma applies
5590 to a body. Specialize the error for the specless body case,
5591 as is done for (e.g.) pragma Convention.
5592 * debug.adb: Add switch -gnatd.J to disable the above legality
5593 checks. This is mainly for use in our test suite, to avoid
5594 rewriting a lot of illegal (but working) code. It might also
5595 be useful to customers. Under this switch, if a pragma No_Return
5596 applies to a body, and the procedure raises an exception (as it
5597 should), the pragma has no effect. If the procedure does return,
5598 execution is erroneous.
5600 2017-04-25 Bob Duff <duff@adacore.com>
5602 * exp_ch6.adb (Expand_Actuals): This is the
5603 root of the problem. It took N as an 'in out' parameter, and in
5604 some cases, rewrote N, but then set N to Original_Node(N). So
5605 the node returned in N had no Parent. The caller continued
5606 processing of this orphaned node. In some cases that caused a
5607 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
5608 and trips over the Empty Parent). The solution is to make N an
5609 'in' parameter. Instead of rewriting it, return the list of
5610 post-call actions, so the caller can do the rewriting later,
5611 after N has been fully processed.
5612 (Expand_Call_Helper): Move most of Expand_Call here. It has
5613 too many premature 'return' statements, and we want to do the
5614 rewriting on return.
5615 (Insert_Post_Call_Actions): New procedure to insert the post-call
5616 actions in the appropriate place. In the problematic case,
5617 that involves rewriting N as an Expression_With_Actions.
5618 (Expand_Call): Call the new procedures Expand_Call_Helper and
5619 Insert_Post_Call_Actions.
5621 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5623 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
5624 properly type derived from generic formal types, to handle
5625 properly modified version of ACATS 4.1B B611017.
5627 2017-04-25 Javier Miranda <miranda@adacore.com>
5629 * exp_unst.adb (Subp_Index): Adding missing
5630 support for renamings and functions that return a constrained
5631 array type (i.e. functions for which the frontend built a
5632 procedure with an extra out parameter).
5634 2017-04-25 Pascal Obry <obry@adacore.com>
5636 * s-string.adb: Minor code clean-up.
5638 2017-04-25 Bob Duff <duff@adacore.com>
5640 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
5642 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
5643 function for Non_Blocking_Wait_Process.
5645 2017-04-25 Bob Duff <duff@adacore.com>
5647 * prep.adb (Preprocess): Remove incorrect
5648 Assert. Current character can be ASCII.CR.
5650 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5652 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
5653 convention Stdcall, which has a number of exceptions. Convention
5654 is legal on a component declaration whose type is an anonymous
5655 access to subprogram.
5657 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5659 * sem_ch4.adb: sem_ch4.adb Various reformattings.
5660 (Try_One_Prefix_Interpretation): Use the base type when dealing
5661 with a subtype created for purposes of constraining a private
5662 type with discriminants.
5664 2017-04-25 Javier Miranda <miranda@adacore.com>
5666 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
5667 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
5668 dispatching primitives (Restore_Warnings): Restore warning on
5669 late dispatching primitives (Save_Warnings): Save warning on late
5670 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
5671 to enable/disable this warning.
5672 (WA_Warnings): Set warning on late dispatching primitives.
5673 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
5674 that its parent type has a private extension.
5675 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
5677 * usage.adb: Document -gnatw.j and -gnatw.J.
5679 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5681 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
5684 2017-04-25 Bob Duff <duff@adacore.com>
5686 * binde.adb (Validate): Do not pass dynamic strings
5687 to pragma Assert, because older compilers do not support that.
5689 2017-04-25 Bob Duff <duff@adacore.com>
5691 * s-fileio.adb (Close): When a temp file is
5692 closed, delete it and clean up its Temp_File_Record immediately,
5693 rather than waiting until later.
5694 (Temp_File_Record): Add File
5695 component, so Close can know which Temp_File_Record corresponds
5696 to the file being closed.
5697 (Delete): Don't delete temp files,
5698 because they are deleted by Close.
5699 (Open): Set the File component
5700 of Temp_File_Record. This requires moving the creation of the
5701 Temp_File_Record to the end, after the AFCB has been created.
5703 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5705 * checks.adb (Insert_Valid_Check): Do not generate
5706 a validity check when inside a generic.
5708 2017-04-25 Yannick Moy <moy@adacore.com>
5710 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
5712 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5714 * snames.ads-tmpl (Snames): More names for detecting predefined
5715 potentially blocking subprograms.
5717 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5719 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
5720 concerning inheritance of class-wide preconditions do not apply
5723 2017-04-25 Bob Duff <duff@adacore.com>
5725 * s-ficobl.ads: Minor comment fix.
5727 2017-04-25 Yannick Moy <moy@adacore.com>
5729 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
5730 conversions from float to integer in GNATprove mode.
5731 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
5732 to call Apply_Type_Conversion_Checks, so that range checks
5733 are properly positioned when needed on conversions, including
5734 when converting from float to integer. (Determine_Range): In
5735 GNATprove mode, take into account the possibility of conversion
5736 from float to integer.
5737 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
5738 check on conversions from fixed-point to integer, not anymore
5739 on conversions from floating-point to integer, when in GNATprove
5742 2017-04-25 Yannick Moy <moy@adacore.com>
5744 * checks.adb (Determine_Range_R): Special case type conversions
5745 from integer to float in order to get bounds in that case too.
5746 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
5747 mode, for computations involved in interval checking.
5749 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5751 * checks.adb (Insert_Valid_Check): Partially reimplement validity
5753 * einfo.adb Node36 is now used as Validated_Object.
5754 (Validated_Object): New routine.
5755 (Set_Validated_Object): New routine.
5756 (Write_Field36_Name): Add an entry for Validated_Object.
5757 * einfo.ads Add new attribute Validated_Object along with
5759 (Validated_Object): New routine along with pragma Inline.
5760 (Set_Validated_Object): New routine along with pragma Inline.
5761 * exp_attr.adb (Make_Range_Test): Add processing for validation
5762 variables to avoid extra reads and copies of the prefix.
5763 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
5764 variables in order to reflect any changes done in the variable
5765 back into the original object.
5766 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
5767 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
5769 2017-04-25 Steve Baird <baird@adacore.com>
5771 * exp_ch7.adb (Build_Array_Deep_Procs,
5772 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
5773 generate Finalize_Address routines for CodePeer.
5775 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5777 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
5778 Analyze_Pre_Post_Condition, to implement the legality checks
5779 mandated by AI12-0131: Pre'Class shall not be specified for an
5780 overriding primitive subprogram of a tagged type T unless the
5781 Pre'Class aspect is specified for the corresponding primitive
5782 subprogram of some ancestor of T.
5784 2017-04-25 Bob Duff <duff@adacore.com>
5786 * sem_ch8.adb (Use_One_Type): If a use_type_clause
5787 is redundant, set its Used_Operations to empty. This is only
5788 necessary for use clauses that appear in the parent of a generic
5789 child unit, because those use clauses get reanalyzed when we
5790 instantiate the generic, and we don't want the Used_Operations
5791 carried over from the original context (where it was probably
5794 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5796 * exp_ch6.adb: Minor reformatting.
5798 2017-04-25 Bob Duff <duff@adacore.com>
5800 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5801 Use Source_Index (Current_Sem_Unit) to find the correct casing.
5802 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
5803 (Current_Sem_Unit) to find the correct casing.
5804 * par.adb (Par): Null out Current_Source_File, to ensure that
5805 the above bugs won't rear their ugly heads again.
5807 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5809 * sem_ch8.adb (Find_Type): For an attribute reference
5810 'Class, if prefix type is synchronized and previous errors
5811 have suppressed the creation of the corresponding record type,
5812 create a spurious class-wide for the synchonized type itself,
5813 to catch other misuses of the attribute
5815 2017-04-25 Steve Baird <baird@adacore.com>
5817 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
5818 is True, then don't generate the accessibility check for the
5819 tag of a tagged result.
5820 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
5821 if CodePeer_Mode is True, then don't generate the
5822 tag checks for the result of call to an instance of
5823 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
5824 descendant of" check and the accessibility check).
5826 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5828 * sem_ch13.adb: Code cleanups.
5829 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
5830 * sem_ch8.ads: Minor comment fix.
5832 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5834 * exp_ch4.adb (Library_Level_Target): New function.
5835 (Expand_Concatenate): When optimization is enabled, also expand
5836 the operation out-of-line if the concatenation is present within
5837 the expression of the declaration of a library-level object and
5838 not only if it is the expression of the declaration.
5840 2017-04-25 Bob Duff <duff@adacore.com>
5842 * freeze.adb (Freeze_Object_Declaration): Do
5843 not Remove_Side_Effects if there is a pragma Linker_Section,
5844 because in that case we want static initialization in the
5845 appropriate section.
5847 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5849 * exp_dbug.adb: Minor rewording and reformatting.
5851 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5853 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
5854 handle the proposed changes to rules concerning potentially
5855 unevaluated expressions, to include selected components that
5856 do not depend on discriminants, and indexed components with
5858 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
5859 predicate in quantified expression, and fix bugs in the handling
5860 of case expressions and membership test.
5861 (Analyze_Attribute_Old_Result): use new predicate.
5862 (Analyze_Attribute, case Loop_Entry): ditto.
5864 2017-04-25 Bob Duff <duff@adacore.com>
5866 * s-secsta.adb (SS_Info): Add a comment
5867 explaining why we don't need to walk all the chunks in order to
5868 compute the total size.
5870 2017-04-25 Bob Duff <duff@adacore.com>
5872 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
5873 of the global name buffer to 4*Max_Line_Length.
5875 2017-04-25 Javier Miranda <miranda@adacore.com>
5877 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
5878 renaming entity for debug information, mark the entity as needing debug
5879 info if it comes from sources.
5881 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5883 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
5884 restriction converning the use of 'Address where the prefix is
5885 of a controlled type.
5887 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5889 * exp_dbug.adb: In Debug_Renaming_Declaration,
5890 skip slices that are made redundant by an indexed component
5892 * atree.h: New definition for Original_Node.
5894 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5896 * sem_prag.adb, sem_prag.ads: Minor reformatting.
5898 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5900 * sem_ch3.adb (Check_Entry_Contract): Call
5901 Preanalyze_Spec_Expression so that resolution takes place as well.
5902 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
5903 internal calls that appear in preconditions of protected
5904 operations, in default values for same, and in contract guards
5905 for contract cases in SPARK.
5907 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5909 * a-numaux.ads: Fix description of a-numaux-darwin
5911 (Double): Define to Long_Float.
5912 * a-numaux-vxworks.ads (Double): Likewise.
5913 * a-numaux-darwin.ads
5915 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
5916 * a-numaux-x86.ads: Fix package description.
5917 * a-numaux-x86.adb (Is_Nan): Minor tweak.
5918 (Reduce): Adjust and complete description. Call Is_Nan instead of
5919 testing manually. Use an integer temporary to hold rounded value.
5920 * a-numaux-darwin.adb (Reduce): Likewise.
5921 (Is_Nan): New function.
5923 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5925 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
5926 on analysis of prefix whose type is a current instance of a
5927 synchronized type, but where the prefix itself is an entity that
5930 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5932 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
5933 the identity of callable entities therein, because they have been
5934 properly resolved, and prefixed calls may have been rewritten
5937 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
5939 * exp_ch3.adb (Build_Init_Statements): Convert
5940 the expression of the pragma/aspect Secondary_Stack_Size to
5941 internal type System.Parameters.Size_Type before assigning
5942 it to the Secondary_Stack_Size component of the task type's
5943 corresponding record.
5945 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5947 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
5948 (etc) optimizations when the type is modular and the offsets
5951 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5953 * s-osinte-freebsd.ads: Minor comment tweaks
5955 2017-04-25 Javier Miranda <miranda@adacore.com>
5957 * urealp.adb (UR_Write): Reverse previous patch
5958 adding documentation on why we generate multiplications instead
5959 of divisions (needed to avoid expressions whose computation with
5960 large numbers may cause division by 0).
5962 2017-04-25 Bob Duff <duff@adacore.com>
5964 * erroutc.adb (Set_Specific_Warning_Off,
5965 Set_Warnings_Mode_Off): Use the correct source file for
5966 Stop. Was using Current_Source_File, which is only valid during
5967 parsing. Current_Source_File will have a leftover value from
5968 whatever file happened to be parsed last, because of a with_clause
5971 2017-04-25 Bob Duff <duff@adacore.com>
5973 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
5974 to In_Predefined_Unit, but including GNAT units.
5975 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
5976 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
5977 because Should_Ignore_Pragma was not working reliably outside
5978 the parser, because Current_Source_File is not valid.
5979 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
5980 * par-prag.adb: Call Should_Ignore_Pragma_Par.
5982 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5984 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
5987 2017-04-25 Javier Miranda <miranda@adacore.com>
5989 * urealp.adb (UR_Write): Fix output of constants with a base other
5992 2017-04-25 Justin Squirek <squirek@adacore.com>
5994 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
5995 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
5996 Add extra parameter for Process_Interface_Name.
5997 (Process_Interface_Name): Add parameter for pragma to analyze
5998 corresponding aspect.
5999 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
6002 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6004 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
6007 2017-04-25 Yannick Moy <moy@adacore.com>
6009 * sem_res.adb (Resolve_Comparison_Op): Do not
6010 attempt evaluation of relational operations inside assertions.
6012 2017-04-25 Justin Squirek <squirek@adacore.com>
6014 * exp_util.adb (Add_Interface_Invariants):
6015 Restored, code moved back from Build_Invariant_Procedure_Body.
6016 (Add_Parent_Invariants): Restored, code moved back from
6017 Build_Invariant_Procedure_Body.
6018 (Build_Invariant_Procedure_Body):
6019 Remove refactored calls and integrated code from
6020 Add_Parent_Invariants and Add_Interface_Invariants.
6022 2017-04-25 Johannes Kanig <kanig@adacore.com>
6024 * errout.adb (Output_Messages): Adjust computation of total
6026 * erroutc.adb (Error_Msg): In statistics counts, deal
6027 correctly with informational messages that are not warnings.
6028 * errutil.adb (Finalize): adjust computation of total errors.
6030 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6032 * terminals.c (__gnat_terminate_pid): New.
6033 * g-exptty.ads (Terminate_Process): New. Update comments.
6035 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6037 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
6039 2017-04-25 Justin Squirek <squirek@adacore.com>
6041 * sem_ch3.adb (Analyze_Declarations): Minor
6042 correction to comments, move out large conditional and scope
6043 traversal into a predicate.
6044 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
6047 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6049 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
6050 of prefix whose type is a current instance of a synchronized
6051 type. If the prefix is an object this is an external call (or
6052 requeue) that can only access public operations of the object. The
6053 previous predicate was too restrictive, and did not allow public
6054 protected operations, only task entries.
6056 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6058 * sem_ch5.adb, fname.adb: Minor reformatting.
6060 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6062 * einfo.adb (Is_Anonymous_Access_Type): New routine.
6063 * einfo.ads Update the placement of
6064 E_Anonymous_Access_Subprogram_Type along with all subtypes that
6066 (Is_Anonymous_Access_Type): New routine.
6067 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
6068 master for an access type subject to pragma No_Heap_Finalization.
6069 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
6070 allocated or deallocated does not finalization actions if the
6071 associated access type is subject to pragma No_Heap_Finalization.
6072 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
6073 * par-prag.adb Pragma No_Heap_Finalization does not need special
6074 processing from the parser.
6075 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
6076 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
6077 * sem_prag.adb Add an entry in table Sig_Flags for pragma
6078 No_Heap_Finalization.
6079 (Analyze_Pragma): Add processing for
6080 pragma No_Heap_Finalization. Update various error messages to
6081 use Duplication_Error.
6082 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
6083 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
6084 and corresponding pragma id.
6086 2017-04-25 Bob Duff <duff@adacore.com>
6088 * freeze.adb (Freeze_Record_Type): Use the
6089 underlying type of the component type to determine whether it's
6090 elementary. For representation clause purposes, a private type
6091 should behave the same as its full type.
6092 * fname.ads, fname.adb (Is_Predefined_File_Name):
6093 Make sure things like "system.ali" are recognized as predefined.
6095 2017-04-25 Javier Miranda <miranda@adacore.com>
6097 * debug.adb: Update documentation of -gnatd.6.
6099 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6101 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
6102 element iterator when the name is an overloaded function call,
6103 one of whose interpretations yields an array.
6105 2017-04-25 Bob Duff <duff@adacore.com>
6107 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
6108 Is_Internal_Unit_Name): New functions for operating on unit
6109 names, as opposed to file names. There's some duplicated code
6110 with fname.adb, which is unfortunate, but it seems like we don't
6111 want to add dependencies here.
6112 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
6113 to Is_Predefined_Unit_Name; the former was wrong, because Uname
6114 is not a file name at all.
6115 * fname.ads, fname.adb: Document the fact that
6116 Is_Predefined_File_Name and Is_Internal_File_Name can be called
6117 for ALI files, and fix the code so it works properly for ALI
6118 files. E.g. these should return True for "system.ali".
6120 2017-04-25 Justin Squirek <squirek@adacore.com>
6122 * exp_util.adb (Add_Invariant): Removed,
6123 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
6124 and Add_Own_Invariant. (Add_Invariant_Check): Used
6125 for adding runtime checks from any kind of invariant.
6126 (Add_Inherited_Invariant): Generates invariant checks for
6127 class-wide invariants (Add_Interface_Invariants): Removed, code
6128 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
6129 Create a types own invariant procedure (Add_Parent_Invariants):
6130 Removed, code moved to Build_Invariant_Procedure_Body
6131 (Build_Invariant_Procedure_Body): Add refactored calls
6132 and integrated code from Add_Parent_Invariants and
6133 Add_Interface_Invariants.
6134 (Process_Type): Removed, the
6135 relavant code was inlined into both Add_Own_Invariant and
6136 Add_Inherited_Invariant.
6138 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6140 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
6141 scn.adb, osint.adb, fname.adb: Minor reformatting.
6143 2017-04-25 Pascal Obry <obry@adacore.com>
6145 * s-taprop-mingw.adb: Do not check for CloseHandle in
6148 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6150 * sem_util.adb (Check_Part_Of_Reference):
6151 Continue to examine the context if the reference appears within
6152 an expression function.
6154 2017-04-25 Justin Squirek <squirek@adacore.com>
6156 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
6157 and Build_Invariant_Procedure_Declaration.
6158 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
6159 and Build_Invariant_Procedure_Declaration from exp_ch7
6160 and break-out Is_Untagged_Private_Derivation from
6161 Build_Invariant_Procedure_Body.
6162 (Replace_Type_References):
6163 Append an extra parameter to allow for dispatching replacements
6164 and add the corrasponding logic.
6165 (Type_Invariant): Remove
6166 Replace_Typ_Refs and replace its references with calls to
6167 Replace_Type_References.
6168 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
6170 2017-04-25 Bob Duff <duff@adacore.com>
6172 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
6173 that returns True when appropriate.
6174 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
6175 when compiling predefined files.
6176 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
6177 "gnat.adc" should not be considered a predefined file name.
6178 That required (or at least encouraged) a lot of cleanup of global
6179 variable usage. We shouldn't be communicating information via
6180 the global name buffer.
6181 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
6182 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
6183 required by the above-mentioned cleanup.
6185 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6187 * osint.adb (Find_File): Handle properly a request for a
6188 configuration file whose name is a directory.
6190 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6192 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
6194 2017-04-25 Bob Duff <duff@adacore.com>
6196 * types.ads: Minor: Fix '???' comment.
6197 * sem_ch8.adb: Minor comment fix.
6199 2017-04-25 Bob Duff <duff@adacore.com>
6201 * sem_prag.adb: Remove suspicious uses of Name_Buf.
6202 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
6203 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
6204 Add String_To_Name with no side effects.
6206 2017-04-25 Justin Squirek <squirek@adacore.com>
6208 * sem_ch3.adb (Analyze_Declarations): Add
6209 additional condition for edge case.
6211 2017-04-25 Bob Duff <duff@adacore.com>
6213 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
6214 reserved words inside pragmas. This is necessary to allow the
6215 pragma name Interface to be used in pragma Ignore_Pragma.
6216 * par.adb: Minor comment fix.
6218 2017-04-25 Javier Miranda <miranda@adacore.com>
6220 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
6221 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
6222 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
6223 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
6224 occurrences of RE_Type_Is_Abstract
6226 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6228 * exp_util.adb (Build_Chain): Account for ancestor
6229 subtypes while traversing the derivation chain.
6231 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6233 * sem_attr.adb: minor reformatting.
6235 2017-04-25 Doug Rupp <rupp@adacore.com>
6237 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
6239 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6241 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
6242 the first pass over an assignment statement with target names,
6243 to prevent the generation of subtypes (such as discriminated
6244 record components)that may carry the target name outside of the
6245 tree for the assignment. The subtypes will be generated when
6246 the assignment is reanalyzed in full.
6247 (Analyze_Target_Name): Handle properly class-wide types.
6249 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6251 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
6252 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6253 the purposes of freezing.
6254 * exp_util.adb Update the documentation and structure of the
6255 type map used in class-wide semantics of assertion expressions.
6256 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6257 and resolve the triaged expression because all substitutions
6258 refer to the proper entities. Update the replacement of
6260 (Build_DIC_Procedure_Body): Add formal parameter
6261 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6262 are now only processed when freezing occurs. Build a body only
6264 (Entity_Hash): Removed.
6265 (Map_Types): New routine.
6266 (Replace_Object_And_Primitive_References): Removed.
6267 (Replace_References): New routine.
6268 (Replace_Type_References): Moved to the library level of Exp_Util.
6269 (Type_Map_Hash): New routine.
6270 (Update_Primitives_Mapping): Update the mapping call.
6271 (Update_Primitives_Mapping_Of_Types): Removed.
6272 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6273 parameter For_Freeze and update the comment on usage.
6274 (Map_Types): New routine.
6275 (Replace_References): New routine.
6276 (Replace_Type_References): Moved to the library level of Exp_Util.
6277 (Update_Primitives_Mapping_Of_Types): Removed.
6278 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6279 properties of the private type to the full view in case the full
6280 view derives from a parent type and inherits a DIC pragma.
6281 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6282 DIC pragma is placed at the top of a declarative region.
6284 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6286 * a-tasatt.adb: Complete previous change and use an unsigned
6287 int to avoid overflow checks.
6289 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6291 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
6292 the error message when the attribute reference is an actual in
6293 a call to a subprogram inherited from a generic formal type with
6294 unknown discriminants, which makes the subprogram and its formal
6295 parameters intrinsic (see RM 6.3.1 (8) and (13)).
6297 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6299 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
6300 sem_prag.adb: Minor reformatting.
6302 2017-04-25 Bob Duff <duff@adacore.com>
6304 * sem_attr.adb (Type_Key): Add code in the
6305 recursive Compute_Type_Key to protect against fetching the source
6306 code for Standard, in case a component of the type is declared
6307 in Standard. There was already code to do this for the original
6308 type, but not for its components.
6310 2017-04-25 Javier Miranda <miranda@adacore.com>
6312 * exp_ch3.adb (Build_Initialization_Call): Handle
6313 subtypes of private types when searching for the underlying full
6314 view of a private type.
6316 2017-04-25 Javier Miranda <miranda@adacore.com>
6318 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
6319 real conditional expression can appear in a fixed-type context
6320 and must be resolved with that context to facilitate the code
6321 generation to the backend.
6323 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6325 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
6326 to indicate whether during inline processing, when some unit U1
6327 appears in the context of a unit U2 compiled for instantiation
6328 or inlining purposes, the body of U1 needs to be compiled as well.
6329 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
6330 context is a package declaration.
6331 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
6332 Analyze_Generic_Package_Declaration): ditto.
6333 * inline.adb (Analyze_Inlined_Bodies): Check
6334 Body_Needed_For_Inlining.
6336 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6338 * par.adb (Current_Assign_Node): Global variable use to record
6339 the presence of a target_name in the right hand side of the
6340 assignment being parsed.
6341 * par-ch4.adb (P_Name): If the name is a target_name, mark the
6342 enclosing assignment node accordingly.
6343 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
6345 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
6346 analyzing RHS if the statement has target_names.
6347 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
6348 properly choices that are subtype marks.
6349 * exp_ch5.adb: Code cleanup.
6351 2017-04-25 Bob Duff <duff@adacore.com>
6353 * s-memory.adb: Add a comment regarding efficiency.
6354 * atree.adb: Fix the assertion, and combine 2 assertions into one,
6355 "the source has an extension if and only if the destination does."
6356 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
6358 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6360 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
6363 2017-04-25 Doug Rupp <rupp@adacore.com>
6365 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
6366 handling for ppc64-vx7.
6367 * sigtramp-vxworks-target.inc
6368 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
6370 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6372 * ada_get_targ.adb: New file.
6374 2017-04-25 Bob Duff <duff@adacore.com>
6376 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
6377 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
6378 (UI_GCD): Remove ??? comment involving possible efficiency
6379 improvements. This just isn't important after all these years.
6381 * uintp.ads: Minor cleanup.
6383 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6385 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
6386 Revert previous changes.
6387 * scng.adb: Minor reformatting.
6388 * s-stratt.ads: Fix unbalanced parens in comment.
6390 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6392 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
6395 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6397 * scng.adb (Scan): Handle '@' appropriately.
6398 * sem_ch5.adb: Code cleanup.
6400 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6402 * freeze.adb (Check_Expression_Function): Do not check for the
6403 use of deferred constants if the freezing of the expression
6404 function is triggered by its generated body, rather than a
6407 2017-04-25 Javier Miranda <miranda@adacore.com>
6409 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
6410 subtypes of private types when performing the view conversion.
6412 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6414 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6415 the purposes of freezing.
6416 * exp_util.adb Update the documentation and structure of the
6417 type map used in class-wide semantics of assertion expressions.
6418 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6419 and resolve the triaged expression because all substitutions
6420 refer to the proper entities. Update the replacement of
6422 (Build_DIC_Procedure_Body): Add formal parameter
6423 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6424 are now only processed when freezing occurs. Build a body only
6426 (Entity_Hash): Removed.
6427 (Map_Types): New routine.
6428 (Replace_Object_And_Primitive_References): Removed.
6429 (Replace_References): New routine.
6430 (Replace_Type_References): Moved to the library level of Exp_Util.
6431 (Type_Map_Hash): New routine.
6432 (Update_Primitives_Mapping): Update the mapping call.
6433 (Update_Primitives_Mapping_Of_Types): Removed.
6434 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6435 parameter For_Freeze and update the comment on usage.
6436 (Map_Types): New routine.
6437 (Replace_References): New routine.
6438 (Replace_Type_References): Moved to the library level of Exp_Util.
6439 (Update_Primitives_Mapping_Of_Types): Removed.
6440 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6441 properties of the private type to the full view in case the full
6442 view derives from a parent type and inherits a DIC pragma.
6443 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6444 DIC pragma is placed at the top of a declarative region.
6446 2017-04-25 Tristan Gingold <gingold@adacore.com>
6448 * s-mmap.ads (Data): Add pragma Inline.
6450 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6452 * checks.adb (Insert_Valid_Check): Do not use
6453 a renaming to alias a volatile name because this will lead to
6454 multiple evaluations of the volatile name. Use a constant to
6455 capture the value instead.
6457 2017-04-25 Doug Rupp <rupp@adacore.com>
6459 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
6461 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6463 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
6464 Add out parameter to indicate to caller that a wrapper must
6465 be constructed for an inherited primitive whose inherited
6466 pre/postcondition has called to overridden primitives.
6467 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
6468 for inherited primitive that requires it.
6469 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
6470 legal primitive operations and belong to the list of bodies
6471 generated after the freeze point of a type.
6472 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
6473 of Build_Class_Wide_Expression.
6474 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
6475 to construct the specification of the wrapper subprogram created
6476 for an inherited operation.
6478 2017-04-25 Bob Duff <duff@adacore.com>
6480 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
6481 pthread_mutexattr_setprioceiling): Add new interfaces for these
6483 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
6484 protocols as appropriate for Locking_Policy 'C' and 'I'.
6485 * s-taprop-posix.adb: Minor reformatting to make it more similar
6486 to s-taprop-linux.adb.
6488 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6490 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
6491 Handle properly a multi- level derivation involving both renamed
6492 and constrained parent discriminants, when the type to be
6493 constrained has fewer discriminants that the ultimate ancestor.
6495 2017-04-25 Bob Duff <duff@adacore.com>
6497 * sem_util.adb (Is_Object_Reference): In the
6498 case of N_Explicit_Dereference, return False if it came from a
6499 conditional expression.
6501 2017-04-25 Bob Duff <duff@adacore.com>
6503 * par-ch4.adb (P_Case_Expression): If a semicolon
6504 is followed by "when", assume that ";" was meant to be ",".
6506 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6508 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
6511 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6513 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
6514 loading of an entity.
6515 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
6516 previously repeated in the analysis.
6517 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
6518 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
6519 use new procedure SPARK_Implicit_Load.
6520 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
6521 SPARK_Implicit_Load.
6523 2017-04-25 Javier Miranda <miranda@adacore.com>
6525 * sem_util.adb (New_Copy_Tree): By default
6526 copying of defining identifiers is prohibited because
6527 this would introduce an entirely new entity into the
6528 tree. This patch introduces an exception to this general
6529 rule: the declaration of constants and variables located in
6530 Expression_With_Action nodes.
6531 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
6532 (In_Map): New subprogram.
6533 (Visit_Entity): New subprogram.
6534 (Visit_Node): Handle EWA_Level,
6535 EWA_Inner_Scope_Level, and take care of defining entities defined
6536 in Expression_With_Action nodes.
6538 2017-04-25 Thomas Quinot <quinot@adacore.com>
6540 * exp_ch6.adb: minor comment edit.
6541 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
6542 procedure specifications that come from source.
6543 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
6544 Null_Statement attribute.
6545 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
6546 procedure, generate statement SCO for the generated NULL statement.
6547 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
6548 parser, if available.
6550 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6552 * system-linux-s390.ads: Use Long_Integer'Size to define
6555 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
6557 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
6559 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6561 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
6562 * g-socket.adb (To_Host_Entry): Fix typo in comment.
6563 * gnat_ugn.texi: Fix typo.
6564 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
6565 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
6566 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
6567 * sem_util.adb (Mark_Coextensions): Likewise.
6568 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
6570 2017-03-28 Andreas Schwab <schwab@suse.de>
6573 * system-linux-aarch64-ilp32.ads: New file.
6574 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6575 from LIBGNAT_TARGET_PAIRS.
6576 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6577 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6578 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6579 or -mabi=ilp32, resp.
6581 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
6583 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
6585 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
6588 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
6590 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
6593 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
6595 * system-linux-arm.ads (Default_Bit_Order): Likewise.
6596 * system-linux-mips.ads (Default_Bit_Order): Likewise.
6597 * system-linux-armeb.ads: Delete.
6598 * system-linux-mipsel.ads: Likewise.
6599 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
6600 (ARM/Linux): Likewise.
6602 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6605 * gcc-interface/misc.c (gnat_handle_option): Pass true to
6606 handle_generated_option GENERATED_P.
6608 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6610 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
6611 around a justified modular type if it doesn't have the same scalar
6612 storage order as the enclosing record type.
6614 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6616 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
6617 of boolean rvalues to function calls.
6619 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6621 * gcc-interface/utils.c (fold_bit_position): New function.
6622 (rest_of_record_type_compilation): Call it instead of bit_position to
6623 compute the field position and remove the call to remove_conversions.
6624 (compute_related_constant): Factor out the multiplication in both
6625 operands, if any, and streamline the final test.
6627 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6629 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
6631 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6633 * gcc-interface/decl.c: Include demangle.h.
6634 (is_cplusplus_method): Return again true for a primitive operation
6635 only if it is dispatching. For a subprogram with an interface name,
6636 call the demangler to get the number of C++ parameters and compare it
6637 with the number of Ada parameters.
6639 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6641 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
6642 there is no end label, put the location of the At_End procedure on
6643 the call to the procedure.
6645 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6647 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
6648 value for array types with TYPE_INDEX_TYPE set on their domain type.
6649 * gcc-interface/utils.c (max_size): For operations and expressions, do
6650 not build a new node if the operands have not changed or are missing.
6652 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6654 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
6655 argument when recursing on TRUTH_NOT_EXPR.
6657 2017-02-12 John Marino <gnugcc@marino.st>
6659 * system-freebsd-x86.ads: Rename into...
6660 * system-freebsd.ads: ...this.
6661 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
6662 * gcc-interface/Makefile.in: Support aarch64-freebsd.
6663 (x86-64/FreeBSD): Adjust to above renaming.
6664 (i386/FreeBSD): Likewise.
6666 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
6668 * comperr.adb: Update FSF bug reporting URL.
6670 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
6671 Jakub Jelinek <jakub@redhat.com>
6674 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
6676 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
6679 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
6680 to build_translation_unit_decl.
6682 2017-01-23 Javier Miranda <miranda@adacore.com>
6684 * sem_util.adb (New_Copy_Tree): Code cleanup:
6685 removal of the internal map (ie. variable Actual_Map, its
6686 associated local variables, and all the code handling it).
6687 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
6688 force loading of the System package when processing a task type.
6689 (Analyze_Protected_Type_Declaration): in GNATprove mode force
6690 loading of the System package when processing a protected type.
6691 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
6692 force loading of the System package when processing compilation
6693 unit with a main-like subprogram.
6694 * frontend.adb (Frontend): remove forced loading of the System
6697 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6699 * sem_prag.adb (Default_Initial_Condition): If the desired type
6700 declaration is a derived type declaration with discriminants,
6701 it is rewritten as a private type declaration.
6702 * sem_ch13.adb (Replace_Type_References_Generic,
6703 Visible_Component): A discriminated private type with descriminnts
6704 has components that must be rewritten as selected components
6705 if they appear as identifiers in an aspect expression such as
6706 a Default_Initial_Condition.
6707 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
6710 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6712 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
6713 * gnat1drv.adb Generate an empty object file for an ignored
6714 Ghost compilation unit.
6715 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
6717 2017-01-23 Yannick Moy <moy@adacore.com>
6719 * sem_ch4.adb (Analyze_Indexed_Component_Form):
6720 Adapt to inlined prefix with string literal subtype.
6721 * inline.adb (Expand_Inlined_Call): Keep unchecked
6722 conversion inside inlined call when formal type is constrained.
6724 2017-01-23 Javier Miranda <miranda@adacore.com>
6726 * sem_util.adb (New_Copy_Tree): Code cleanup:
6727 removal of global variables. All the global variables, global
6728 functions and tables of this subprogram are now declared locally.
6730 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6732 * exp_strm.ads: Minor reformatting and typo fixes.
6734 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6736 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
6737 exp_aggr.adb: Minor reformatting.
6738 * g-diopit.adb: minor grammar/punctuation fix in comment.
6739 * g-byorma.ads: minor fix of unbalanced parens in comment.
6741 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6743 * par.adb: Update the documentation of component Labl.
6744 * par-ch6.adb (P_Return_Statement): Set the expected label of
6745 an extended return statement to Error.
6747 2017-01-23 Tristan Gingold <gingold@adacore.com>
6749 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
6751 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6753 * expander.adb: Handle N_Delta_Aggregate.
6755 2017-01-23 Javier Miranda <miranda@adacore.com>
6757 * exp_ch6.adb (Expand_Call): Improve the code that
6758 checks if some formal of the called subprogram is a class-wide
6759 interface, to handle subtypes of class-wide interfaces.
6761 2017-01-23 Javier Miranda <miranda@adacore.com>
6763 * checks.adb (Apply_Parameter_Aliasing_Checks):
6764 Remove side effects of the actuals before generating the overlap
6767 2017-01-23 Justin Squirek <squirek@adacore.com>
6769 * exp_strm.ads, exp_strm.ads
6770 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
6771 as to avoid getting the underlying type by default.
6772 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
6773 underlying type in the Iiput and output attribute cases when
6774 building their respective functions.
6776 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6778 * scng.adb: Minor reformatting of error message.
6780 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6782 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
6783 to freeze the return type of an expression funxtion that is a
6784 completion, if the type is a limited view and the non-limited
6787 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6789 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
6790 aggregate construct.
6791 (P_Record_Or_Array_Component_Association): An array aggregate
6792 can start with an Iterated_Component_Association.
6793 * scng.adb: Modify error message on improper use of @ in earlier
6794 versions of the language.
6795 * sinfo.ads: New node kind N_Delta_Aggregate.
6796 * sinfo.adb: An N_Delta_Aggregate has component associations and
6798 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
6799 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
6800 Create a new index for each one of the choices in the association,
6801 to prevent spurious homonyms in the scope.
6802 (Resolve_Delta_Aggregate): New.
6803 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
6804 * exp_util.adb (Insert_Actions): Take into account
6806 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
6807 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
6808 and local procedures Expand_Delta_Array_Aggregate and
6809 expand_Delta_Record_Aggregate.
6810 * sprint.adb: Handle N_Delta_Aggregate.
6812 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6814 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
6815 empty name when the exception declaration is subject to pragma
6817 (Null_String): New routine.
6819 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6821 * par-ch9.adb (P_Protected_Definition): Parse
6822 any optional and potentially illegal pragmas which appear in
6823 a protected operation declaration list.
6824 (P_Task_Items): Parse
6825 any optional and potentially illegal pragmas which appear in a
6828 2017-01-23 Pascal Obry <obry@adacore.com>
6830 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
6831 is needed when a foreign thread call a Win32 API using a thread handle
6832 like GetThreadTimes() for example.
6834 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6836 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6837 allow an 'Address clause to be specified on a prefix of a
6840 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6842 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6843 attribute 'Valid is a renaming of the original expression when
6844 the expression denotes a name. For all other kinds of expression,
6845 use a constant to capture the value.
6846 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6847 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6849 2017-01-23 Justin Squirek <squirek@adacore.com>
6851 * sem_eval.adb (Eval_Integer_Literal): Add special
6852 case to avoid optimizing out check if the literal appears in
6855 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6857 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6858 allow an 'Address clause to be specified on a prefix of a
6861 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6863 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6864 attribute 'Valid is a renaming of the original expression when
6865 the expression denotes a name. For all other kinds of expression,
6866 use a constant to capture the value.
6867 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6868 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6870 2017-01-23 Justin Squirek <squirek@adacore.com>
6872 * sem_eval.adb (Eval_Integer_Literal): Add special
6873 case to avoid optimizing out check if the literal appears in
6876 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6878 * sem_ch4.adb (Try_Primitive_Operations,
6879 Is_Valid_First_Argument_Of): argument is valid if it is a derived
6880 type with unknown discriminants that matches its underlying
6882 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
6883 expression if its type is derived from a limited type with
6884 unknown discriminants, because the expansion (which is a call)
6885 must be expanded in the enclosing context to add the proper build-
6886 in-place parameters to the call.
6887 * lib.ads, exp_ch9.adb: Minor fixes in comments.
6889 2017-01-23 Yannick Moy <moy@adacore.com>
6891 * frontend.adb (Frontend): Do not load runtime
6892 unit for GNATprove when parsing failed.
6893 * exp_ch9.adb: minor removal of extra whitespace
6894 * exp_ch6.adb: minor typo in comment
6895 * sem_util.adb: Code cleanup.
6896 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
6897 * a-ngcefu.adb: minor style fix in whitespace
6899 2017-01-23 Thomas Quinot <quinot@adacore.com>
6901 * scos.ads: Document usage of 'd' as default SCO kind for
6903 * par_sco.adb (Traverse_Declarations_Or_Statements.
6904 Traverse_Degenerate_Subprogram): New supporting routine for expression
6905 functions and null procedures.
6906 (Traverse_Declarations_Or_Statements.Traverse_One): Add
6907 N_Expression_Function to the subprogram case; add required
6908 support for null procedures and expression functions.
6910 2017-01-23 Bob Duff <duff@adacore.com>
6912 * namet.ads (Bounded_String): Decrease the size of type
6913 Bounded_String to avoid running out of stack space.
6914 * namet.ads (Append): Don't ignore buffer overflow; raise
6915 Program_Error instead.
6917 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6919 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
6920 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
6922 * exp_ch9.adb: minor style fix in comment.
6924 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6926 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
6927 for a limited record extension with unknown discriminants whose
6928 full view has no discriminants.
6930 2017-01-23 Yannick Moy <moy@adacore.com>
6932 * exp_spark.adb: Alphabetize with clauses.
6934 2017-01-23 Yannick Moy <moy@adacore.com>
6936 * sem_util.adb (Has_Enabled_Property): Treat
6937 protected objects and variables differently from other variables.
6939 2017-01-23 Thomas Quinot <quinot@adacore.com>
6941 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
6942 Split original Ada 95 part off into new subprogram
6943 below. Call that subprogram (instead of proceeding with
6944 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
6945 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
6946 * debug.adb Document new switch -gnatd.p
6947 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
6948 record for reverse bit order if an error has already been posted
6949 on the record type. This avoids generating extraneous "info:"
6950 messages for illegal code.
6952 2017-01-23 Justin Squirek <squirek@adacore.com>
6954 * sem_ch3.adb (Analyze_Declarations): Correct comments
6955 * freeze.adb (Find_Constant): Add detection of deferred constants
6956 so they are not incorrectly flagged as premature.
6958 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6960 * scans.ads: New token At_Sign. Remove '@' from list of illegal
6961 characters for future version of the language. '@' is legal name.
6962 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
6963 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
6964 denotes a Target_Name.
6965 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
6966 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
6967 (Has_Target_Names): New flag on N_Assignment_Statement, to
6968 indicate that RHS has occurrences of N_Target_Name.
6969 * sem.adb: Call Analyze_Target_Name.
6970 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
6971 (urrent_LHS): Global variable that denotes LHS of assignment,
6972 used in the analysis of Target_Name nodes.
6973 * sem_res.adb (Resolve_Target_Name): New procedure.
6974 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
6975 N is an assignment statement whose RHS contains occurences of @
6976 that designate the value of the LHS of the assignment. If the
6977 LHS is side-effect free the target names can be replaced with
6978 a copy of the LHS; otherwise the semantics of the assignment
6979 is described in terms of a procedure with an in-out parameter,
6980 and expanded as such.
6981 (Expand_N_Assignment_Statement): Call
6982 Expand_Assign_With_Target_Names when needed.
6983 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
6984 * sprint.adb: Handle N_Target_Name.
6986 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
6988 * checks.adb: Minor fix in comment.
6990 2017-01-23 Philippe Gil <gil@adacore.com>
6992 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
6993 count in Sort = Memory_Usage or Allocations_Count
6995 2017-01-23 Justin Squirek <squirek@adacore.com>
6997 * sem_ch3.adb: Code cleanup.
6999 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7001 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
7002 variables to the local variable section. Update the profile
7003 of various nested routine that previously had visibility
7004 of those globals. One the matching phase has completed,
7005 remove certain classes of clauses which are considered noise.
7006 (Check_Dependency_Clause): Properly detect a match between two
7007 'Result attributes. Update the various post-match cases to use
7008 Is_Already_Matched as this routine now automatically recognizes
7009 a previously matched 'Result attribute.
7010 (Is_Already_Matched): New routine.
7011 (Remove_Extra_Clauses): New routine.
7012 (Report_Extra_Clauses): Remove the detection of ... => null
7013 clauses as this is now done in Remove_Extra_Clauses.
7015 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7017 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
7018 report on spurious overlaps between values involving a subtype
7019 with a static predicate, because the expansion of such a subtype
7020 into individual ranges in inhibited in ASIS mode.
7022 2017-01-23 Justin Squirek <squirek@adacore.com>
7024 * sem_ch3.adb (Analyze_Declarations): Add detection
7025 of an edge case and delay freezing if it is present.
7027 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7029 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
7030 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
7032 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7034 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
7035 access-to-subprogram types inherit the convention of the
7036 associated subprogram. (Set_Profile_Convention): New routine.
7037 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
7038 of the two entities directly, use Conventions_Match to account
7039 for anonymous access-to-subprogram and subprogram types.
7040 (Conventions_Match): New routine.
7042 2017-01-23 Claire Dross <dross@adacore.com>
7044 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
7045 which return Universal_Integer, force the overflow check flag for
7046 Length and Range_Length for types as big as Long_Long_Integer.
7048 2017-01-23 Claire Dross <dross@adacore.com>
7050 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
7051 attributes which return Universal_Integer, introduce a conversion
7052 to the expected type with the appropriate check flags set.
7053 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
7054 base type if the range is null. It may still be invalid if it
7055 is higher than the lower bound. This is checked later in the
7056 context in which the range appears.
7058 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
7060 * scos.ads: Introduce a constant to represent ignored
7061 dependencies in SCO_Unit_Table_Entry.
7063 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7065 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
7066 spaces from error messages.
7068 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7070 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
7071 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
7072 an object declaration for an array type with a modular index type
7073 with the size of Long_Long_Integer. Special processing is needed
7074 in this case to compute reliably the size of the object, and
7075 eventually to raise Storage_Error, when wrap-around arithmetic
7076 might compute a meangingless size for the object.
7078 2017-01-23 Justin Squirek <squirek@adacore.com>
7080 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
7081 sem_type.adb: Code cleanups.
7083 2017-01-23 Bob Duff <duff@adacore.com>
7085 * sem_res.adb (Resolve_Call): In the part of the code where
7086 it is deciding whether to turn the call into an indexed
7087 component, avoid doing so if the call is to an instance of
7088 Unchecked_Conversion. Otherwise, the compiler turns it into an
7089 indexed component, and resolution of that turns it back into a
7090 function call, and so on, resulting in infinite recursion.
7091 * sem_util.adb (Needs_One_Actual): If the first formal has a
7092 default, then return False.
7094 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
7096 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
7097 optimizations when the type is modular and the offsets are equal.
7099 2017-01-20 Thomas Quinot <quinot@adacore.com>
7101 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
7104 2017-01-20 Nicolas Roche <roche@adacore.com>
7106 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
7108 2017-01-20 Bob Duff <duff@adacore.com>
7110 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
7111 (etc) optimizations when the type is modular.
7113 2017-01-20 Yannick Moy <moy@adacore.com>
7115 * sem_ch6.adb (Move_Pragmas): move some pragmas,
7116 but copy the SPARK_Mode pragma instead of moving it.
7117 (Build_Subprogram_Declaration): Ensure that the generated spec
7118 and original body share the same SPARK_Pragma aspect/pragma.
7119 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
7120 procedure to copy SPARK_Mode aspect.
7122 2017-01-20 Bob Duff <duff@adacore.com>
7124 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
7126 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
7127 Empty even in ASIS mode.
7129 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7131 * exp_ch9.adb: minor style fixes in comments.
7132 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
7133 relative statement introduces an implicit dependency on
7134 Ada.Real_Time.Clock_Time.
7135 * sem_util.adb: Minor reformatting.
7137 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7139 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
7140 must be treated as delayed aspect even if the expression is
7141 a literal, because the aspect affects the freezing and the
7142 elaboration of the object to which it applies.
7144 2017-01-20 Tristan Gingold <gingold@adacore.com>
7146 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
7148 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7150 * lib-xref.adb (Generate_Reference): Do not warn about the
7151 presence of a pragma Unreferenced if the entity appears as the
7152 actual in a procedure call that does not come from source.
7154 2017-01-20 Pascal Obry <obry@adacore.com>
7156 * expect.c, terminals.c: Fix some warnings about unused variables.
7157 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
7160 2017-01-20 Bob Duff <duff@adacore.com>
7162 * exp_attr.adb (Constrained): Apply an access check (check that
7163 the prefix is not null) when the prefix denotes an object of an
7164 access type; that is, when there is an implicit dereference.
7166 2017-01-20 Gary Dismukes <dismukes@adacore.com>
7168 * s-rident.ads (constant Profile_Info): Remove
7169 No_Calendar from GNAT_Extended_Ravenscar restrictions.
7171 2017-01-20 Tristan Gingold <gingold@adacore.com>
7173 * s-maccod.ads: Add pragma No_Elaboration_Code_All
7175 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7177 * ghost.adb (Mark_Ghost_Clause): New routine.
7178 (Prune_Node): Do not prune compilation unit nodes.
7179 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
7180 This does not touch the node itself, but does prune all its fields.
7181 * ghost.ads (Mark_Ghost_Clause): New routine.
7182 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
7183 package clause mentions Ghost and non-Ghost packages. Mark a
7184 use package clause as Ghost when it mentions a Ghost package.
7185 (Analyze_Use_Type): Emit an error when a use type clause mentions
7186 Ghost and non-Ghost types. Mark a use type clause as Ghost when
7187 it mentions a Ghost type.
7188 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
7189 Ghost when it withs a Ghost unit.
7191 2017-01-20 Javier Miranda <miranda@adacore.com>
7193 * sem_res.adb (Resolve_Call): If a function call
7194 returns a limited view of a type and at the point of the call the
7195 function is not declared in the extended main unit then replace
7196 it with the non-limited view, which must be available. If the
7197 called function is in the extended main unit then no action is
7198 needed since the back-end handles this case.
7200 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
7202 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
7203 (Contains_Subprograms_Refs): ...this. Adjust comment
7204 for constants. (Is_Subp_Or_Const_Ref): Rename into...
7205 (Is_Subprogram_Ref): ...this.
7206 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
7207 Has_Non_Subprograms_Referencer and adjust comment. Remove
7208 incorrect shortcut for package declarations and bodies.
7210 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7212 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
7213 base type differs from that of the completion and the private
7214 subtype is an itype (created for a constraint on an access
7215 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
7218 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7220 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7221 When inheriting the SPARK_Mode of a prior expression function,
7222 look at the properly resolved entity rather than the initial
7223 candidate which may denote a homonym.
7225 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7227 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
7228 Precondition or Postcondition, and the context is pragma
7229 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
7230 and suggest the standard names Assertion_Policy /Pre /Post
7233 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7235 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
7237 2017-01-20 Javier Miranda <miranda@adacore.com>
7239 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
7241 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
7242 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
7245 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7247 * sem_ch13.adb (Analyze_Aspect_Specification, case
7248 Dynamic_Predicate): If the entity E is a subtype that inherits
7249 a static predicate for its parent P,, the inherited and the
7250 new predicate combine in the generated predicate function,
7251 and E only has a dynamic predicate.
7253 2017-01-20 Tristan Gingold <gingold@adacore.com>
7255 * s-boustr.ads, s-boustr.adb: New package.
7256 * Makefile.rtl: Add s-boustr.
7258 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7260 * inline.adb (Process_Formals): Qualify the
7261 expression of a return statement when it yields a universal type.
7263 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7265 * freeze.adb (Freeze_All): Freeze the default
7266 expressions of all eligible formal parameters that appear in
7267 entries, entry families, and protected subprograms.
7269 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7271 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
7272 for illegal inherited Implicit_Dereference aspects with renamed
7275 2017-01-20 Javier Miranda <miranda@adacore.com>
7277 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
7278 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
7279 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
7280 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
7281 Set_Prev, Tree_Read): Adding assertion.
7282 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
7283 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
7284 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
7285 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
7286 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
7287 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
7288 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
7289 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
7290 Set_ListN_With_Parent): Adding assertion.
7292 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7294 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
7295 import that applies to several homograph subprograms. when one
7296 of them is declared by a subprogram body.
7298 2017-01-20 Justin Squirek <squirek@adacore.com>
7300 * exp_ch6.adb (Expand_Call): Remove optimization
7301 that nulls out calls to null procedures.
7303 2017-01-20 Yannick Moy <moy@adacore.com>
7305 * inline.adb (Expand_Inlined_Call): Keep more
7306 precise type of actual for inlining whenever possible. In
7307 particular, do not switch to the formal type in GNATprove mode in
7308 some case where the GNAT backend might require it for visibility.
7310 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7312 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
7313 aspect Implicit_Dereference can be inherited by a full view if
7314 the partial view has no discriminants, because there is no way
7315 to apply the aspect to the partial view.
7316 (Build_Derived_Record_Type): If derived type renames discriminants
7317 of the parent, the new discriminant inherits the aspect from
7319 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
7320 call through an access discriminant designating a subprogram.
7321 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
7322 properly a parameterless call through an access discriminant on
7323 the left-hand side of an assignment.
7324 * sem_res.adb (resolve): If an interpreation involves a
7325 discriminant with an implicit dereference and the expression is an
7326 entity, resolution takes place later in the appropriate routine.
7327 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
7328 access discriminants that designate a subprogram type.
7330 2017-01-20 Pascal Obry <obry@adacore.com>
7332 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
7334 2017-01-20 Yannick Moy <moy@adacore.com>
7336 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
7337 on implicitly with'ed units in GNATprove mode.
7338 * sinfo.ads (Implicit_With): Document use of flag for implicitly
7339 with'ed units in GNATprove mode.
7341 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7343 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
7344 unit Do not report an error on a non-static entity that appears
7345 in the context of a spec expression, such as an aspect expression.
7347 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7349 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
7350 (Is_Underlying_Full_View): New routine.
7351 (Set_Is_Underlying_Full_View): New routine.
7352 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
7353 * einfo.ads Add new attribute Is_Underlying_Full_View.
7354 (Is_Underlying_Full_View): New routine along with pragma Inline.
7355 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
7356 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
7357 class-wide types and underlying full views. The first subtype
7358 is used as the working type for all Itypes, not just array base types.
7359 (Build_DIC_Procedure_Declaration): Do not consider
7360 class-wide types and underlying full views. The first subtype
7361 is used as the working type for all Itypes, not just array
7363 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
7364 view or an underlying full view without clobbering the attributes
7365 of a previous freeze node.
7366 (Inherit_Freeze_Node): New routine.
7367 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
7369 (Build_Underlying_Full_View): Mark an underlying full view as such.
7370 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
7373 2017-01-20 Yannick Moy <moy@adacore.com>
7375 * sinfo.ads: Document lack of Do_Division_Check flag
7376 on float exponentiation.
7378 2017-01-19 Javier Miranda <miranda@adacore.com>
7380 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
7381 identifier attribute of a block-statement node. Required to avoid
7382 assertion failure when building the new containers library.
7384 2017-01-19 Bob Duff <duff@adacore.com>
7386 * exp_ch3.adb: Update comment.
7388 2017-01-19 Vincent Celier <celier@adacore.com>
7390 * gprep.adb (Gnatprep): Parse the definition file without
7391 "replace in comments" even when switch -C is used.
7393 2017-01-19 Justin Squirek <squirek@adacore.com>
7395 * exp_ch9.adb (Is_Pure_Barrier): Create function
7396 Is_Count_Attribute to identify an expansion of the 'Count
7399 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7401 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
7402 statements within an element iterator loop are only analyzed
7403 agter the loop is rewritten. Within a generic the analysis must
7404 be performed in any case to complete name capture.
7406 2017-01-19 Bob Duff <duff@adacore.com>
7408 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
7409 before checking for unrecognized pragmas.
7410 Initialize Pname on its declarations; that's always good style.
7412 2017-01-19 Claire Dross <dross@adacore.com>
7414 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
7415 body into the tree for GNATprove by setting its Parent field. The
7416 components invariants of composite types are not checked by
7417 the composite type's invariant procedure in GNATprove mode.
7418 (Build_Invariant_Procedure_Declaration): Semi-insert the
7419 declaration into the tree for GNATprove by setting its Parent
7421 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
7422 the component invariants to the array type invariant procedure
7423 so that the procedure can be used to check the array type
7425 (Freeze_Record_Type): In GNATprove mode, do
7426 not add the component invariants to the record type invariant
7427 procedure so that the procedure can be used to check the record
7428 type invariants if any.
7430 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7432 * lib-xref-spark_specific.adb: Minor reformatting.
7433 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
7435 2017-01-19 Javier Miranda <miranda@adacore.com>
7437 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
7438 Build_Back_End_Aggregate.
7439 (Generate_Aggregate_For_Derived_Type): Code cleanup.
7440 (Prepend_Stored_Values): Code cleanup.
7442 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7444 * sem_ch6.adb (Analyze_Expression_Function): Check for an
7445 incomplete return type after attempting to freeze it, so that
7446 other freeze actiona are generated in the proper order.
7448 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7450 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
7451 type, ie. a type whose component is a character type, and the
7452 aggregate is positional, do not convert into a string literal
7453 if the index type is not an integer type, because the original
7454 type may be required in an enclosing operation.
7456 2017-01-19 Bob Duff <duff@adacore.com>
7458 * binde.adb, debug.adb: Enable new elaboration order algorithm
7459 by default. -dp switch reverts to the old algorithm.
7461 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7463 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
7464 (Analyze_Declarations): Create the DIC and Invariant
7465 procedure bodies s after all freezing has taken place.
7466 (Build_Assertion_Bodies): New routine.
7467 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
7469 (Analyze_Package_Specification): Remove the
7470 generation of the DIC and Invariant procedure bodies. This is
7471 now done by Analyze_Declarations.
7472 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
7473 procedures are never treated as primitives.
7475 2017-01-19 Yannick Moy <moy@adacore.com>
7477 * frontend.adb: Analyze inlined bodies and check elaboration
7478 rules in GNATprove mode too.
7479 * sem_elab.adb (Delay_Element): Add Boolean component to save
7480 indication that call is in SPARK code. (Check_Elab_Calls):
7481 Check elaboration rules in GNATprove mode, and correctly set
7482 the current value of SPARK_Mode.
7483 * lib-xref-spark_specific.adb
7484 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
7486 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7488 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
7489 checks on the expression for the high bound of concatenation
7490 when checks are disabled, to suppress warnings about potential
7491 constraint errors in restricted runtimes.
7493 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7495 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
7496 representation-to-position function as inlined.
7497 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
7498 the purity of an internally generated entity if it has been
7499 explicitly marked as pure for optimization purposes.
7500 * exp_aggr.adb: Minor reformatting.
7502 2017-01-19 Javier Miranda <miranda@adacore.com>
7504 * exp_ch6.adb (Expand_Call): Remove side effects on
7505 actuals that are allocators with qualified expression since the
7506 initialization of the object is performed by means of individual
7507 statements (and hence it must be done before the call).
7509 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7511 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
7512 (Build_Derived_Enumeration_Type): If the derived type inherits a
7513 dynamic predicate from its parent, the bounds of the type must
7514 freeze because an explicit constraint is constructed for the
7515 type and the corresponding range is elaborated now.
7517 2017-01-19 Arnaud Charlet <charlet@adacore.com>
7519 * sem_attr.ads: minor fix of inconsistent casing in comment
7520 * lib-writ.ads: minor align comments in columns
7521 * sem_ch3.adb: Minor reformatting.
7522 * spark_xrefs.ads: minor fix typo in SPARK-related comment
7523 * table.ads: minor style fix in comment
7524 * lib-xref-spark_specific.adb
7525 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
7526 * sem_ch12.adb: minor whitespace fix
7527 * freeze.adb: Add comment.
7528 * sem_util.adb (Unique_Name): for instances of
7529 generic subprograms ignore the name of the wrapper package.
7531 2017-01-19 Javier Miranda <miranda@adacore.com>
7533 * exp_aggr.adb (Resolve_Record_Aggregate):
7534 Factorize code needed for aggregates of limited and unlimited
7535 types in a new routine.
7536 (Pass_Aggregate_To_Back_End): New subprogram.
7538 2017-01-19 Yannick Moy <moy@adacore.com>
7540 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
7542 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7544 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
7545 public, for use elsewhere.
7546 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
7547 an Inlined_body, recognize a call that uses object notation
7548 and has not been rewritten as a regular call because regular
7549 expansion has not taken place.
7551 2017-01-19 Bob Duff <duff@adacore.com>
7553 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
7554 in case of generic formal discrete types, because it causes crashes in
7555 the compiler when built with assertions on.
7557 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7559 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
7560 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
7562 2017-01-19 Bob Duff <duff@adacore.com>
7564 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
7565 Increment Warnings_Detected. It was decrementing, which is
7566 wrong since we just issued a warning message.
7567 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
7568 these variables to be of subtype Nat instead of Int, because
7569 they should never be negative.
7571 2017-01-19 Javier Miranda <miranda@adacore.com>
7573 * contracts.adb (Build_Postconditions_Procedure): Replace
7574 Generate_C_Code by Modify_Tree_For_C.
7575 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
7576 Replace Generate_C_Code by Modify_Tree_For_C.
7577 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
7579 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
7580 Generate_C_Code by Modify_Tree_For_C.
7581 * exp_ch4.adb (Expand_Allocator_Expression): Replace
7582 Generate_C_Code by Modify_Tree_For_C.
7583 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
7584 by Modify_Tree_For_C.
7585 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
7586 Generate_C_Code by Modify_Tree_For_C.
7587 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
7588 by Modify_Tree_For_C.
7589 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
7591 2017-01-19 Javier Miranda <miranda@adacore.com>
7593 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
7595 (Is_Inlinable_Expression_Function): New subprogram.
7596 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
7598 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
7600 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7602 * sem_ch4.adb (Diagnose_Call): Improve error message when a
7603 selected component has a prefix that might be interpreted
7604 as a parameterless function call, but none of the candidate
7605 interpretations is parameterless, and there is a hidden homonym
7606 of the prefix that is a package.
7607 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
7608 interpreted as a parameterless function call and its analysis
7609 fails, do not call Analyze_Selected_Component.
7611 2017-01-19 Steve Baird <baird@adacore.com>
7613 * sem_util.ads: Add new Use_Full_View Boolean parameter to
7615 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
7616 calls to a newly-defined Scalar_Range_Of_Right_View function.
7618 2017-01-19 Arnaud Charlet <charlet@adacore.com>
7620 * gnat1drv.adb: minor fix of unbalanced parens in comment
7621 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
7622 to visible part of the package to allow re-use in GNATprove.
7623 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
7624 from repeated code of Traverse_Compilation_Unit.
7625 (Traverse_Declaration_Or_Statement): fixed detection of
7626 generic subprograms and packages; also, iteration over case
7627 statement alternatives rewritten to avoid testing if the first
7628 alternative is present (since it must be present due to Ada
7629 syntax restrictions).
7631 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7633 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
7634 returning by reference not just for subprogram body stubs,
7635 but for all subprogram cases.
7636 * sem_util.adb: Code reformatting.
7637 (Requires_Transient_Scope): Update the call to Results_Differ.
7638 (Results_Differ): Update the parameter profile and the associated
7641 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7643 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
7644 identifier nodes that do not come from source, to handle properly
7645 dimensionality check within an inlined body which inclddes both
7646 original operands and rewritten operands. This removes spurious
7647 dimensionality errors in the presence of front-end inlining,
7648 as well as in SPARK mode.
7650 2017-01-16 Jakub Jelinek <jakub@redhat.com>
7653 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
7655 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7657 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
7659 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7661 * doc/gnat_ugn/getting_started_with_gnat.rst,
7662 doc/gnat_ugn/inline_assembler.rst,
7663 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7664 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
7665 doc/gnat_ugn/about_this_guide.rst,
7666 doc/gnat_ugn/platform_specific_information.rst,
7667 doc/gnat_ugn/example_of_binder_output.rst,
7668 doc/gnat_ugn/gnat_and_program_execution.rst,
7669 doc/gnat_ugn/gnat_utility_programs.rst,
7670 doc/gnat_ugn/the_gnat_compilation_model.rst,
7671 doc/gnat_rm/implementation_defined_attributes.rst,
7672 doc/gnat_rm/compatibility_and_porting_guide.rst,
7673 doc/gnat_rm/standard_library_routines.rst,
7674 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
7675 doc/gnat_rm/implementation_defined_pragmas.rst,
7676 doc/gnat_rm/the_gnat_library.rst,
7677 doc/gnat_rm/obsolescent_features.rst,
7678 doc/gnat_rm/about_this_guide.rst,
7679 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
7680 doc/gnat_rm/implementation_of_ada_2012_features.rst,
7681 doc/gnat_rm/interfacing_to_other_languages.rst,
7682 doc/gnat_rm/implementation_defined_aspects.rst,
7683 doc/gnat_rm.rst: Update documentation.
7684 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
7686 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7688 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
7689 * scil_ll.adb: Minor style fix in comment.
7690 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
7691 even if entity is already set, because the node may be renalyzed
7692 after inlining transformations.
7694 2017-01-13 Javier Miranda <miranda@adacore.com>
7696 * sem_res.adb (Resolve_Call): Do not establish a transient scope
7697 for a call to inlinable expression function (since the call will
7698 be replaced by its returned object).
7699 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
7700 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
7701 (Expand_Call): For inlinable expression function call replace the
7702 call by its returned object.
7703 (Is_Inlinable_Expression_Function): New subprogram.
7705 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7707 * checks.adb: Minor typo fix and reformatting.
7709 2017-01-13 Javier Miranda <miranda@adacore.com>
7711 * contracts.adb (Contract_Only_Subprograms): Remove formal.
7712 (Copy_Original_Specification): Removed.
7713 (Skip_Contract_Only_Subprogram): Move here checks previously
7714 located in the caller of this routine (to leave the code more clean).
7715 (Build_Contract_Only_Subprogram): Code cleanup.
7716 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
7717 (Get_Contract_Only_Missing_Body_Name): Removed.
7719 2017-01-13 Javier Miranda <miranda@adacore.com>
7721 * sem_ch6.adb (Cloned_Expression): New subprogram.
7722 (Freeze_Expr_Types): Complete previous patch since the expression
7723 of an expression-function may have iterators and loops with
7724 defining identifiers which, as part of the preanalysis of the
7725 expression, may be left decorated with itypes that will not be
7726 available in the tree passed to the backend.
7728 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7730 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
7731 conversion to Integer of an expression that is an attribute
7732 reference 'Pos on an enumeration type.
7734 2017-01-13 Bob Duff <duff@adacore.com>
7736 * atree.ads: Minor comment fix.
7738 2017-01-13 Justin Squirek <squirek@adacore.com>
7740 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
7741 calls in accessibility check on return statement.
7743 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7745 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7746 Ensure that the input body is a subprogram body before trying to
7747 determine whether it denoted an expression function. Note that
7748 subprogram body stubs cannot denote expression functions.
7750 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7752 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
7755 2017-01-13 Javier Miranda <miranda@adacore.com>
7757 * einfo.ads (Component_Bit_Offset): Fix documentation.
7758 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
7759 on record holes for components with unknown compile-time offsets.
7761 2017-01-13 Bob Duff <duff@adacore.com>
7763 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
7764 * g-locfil.ads: Minor comment fix.
7766 2017-01-13 Bob Duff <duff@adacore.com>
7768 * binde.adb (Elab_New): New elaboration order algorithm
7769 that is expected to cause fewer ABE issues. This is a work in
7770 progress. The new algorithm is currently disabled, and can be
7771 enable by the -dp switch, or by modifying the Do_Old and Do_New
7772 etc. flags and rebuilding. Experimental code is included to
7773 compare the results of the old and new algorithms.
7774 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
7775 can have multiple of these tables, so the old and new algorithms
7777 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
7778 parameter of type array. This avoids the global variable, and
7779 allows bounds checking (which is normally defeated by the tables
7780 packages). It also ensures that the Elab_Order is read-only
7782 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
7783 subprograms that need it, as above.
7784 * debug.adb: Document new -dp switch. Modify doc of old -do
7786 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
7787 and Bindgen. Move writing of closure (-R and -Ra switches)
7788 to Binde; that's more convenient.
7790 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7792 * sem_ch6.adb (Analyze_Expression_Function): If the expression
7793 function is a completion, all entities referenced in the
7794 expression are frozen. As a consequence, a reference to an
7795 uncompleted private type from an enclosing scope is illegal.
7797 2017-01-13 Javier Miranda <miranda@adacore.com>
7799 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
7800 (Analyze_Subprogram_Body_Helper): At the occurrence of an
7801 expression function declaration that is a completion, its
7802 expression causes freezing (AI12-0103).
7804 2017-01-13 Vadim Godunko <godunko@adacore.com>
7806 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
7807 Reference functions of Ada.Containers.Indefinite_Holders.
7809 2017-01-13 Bob Duff <duff@adacore.com>
7811 * s-os_lib.ads: Minor comment fixes.
7813 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7815 * exp_ch3.adb (Default_Initialize_Object): Do not default
7816 initialize an object when it is of a task type and restriction
7817 No_Tasking is in effect because the initialization is obsolete.
7818 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
7819 restriction No_Tasking is in effect.
7820 (Build_Master_Renaming): Do not rename a master when restriction
7821 No_Tasking is in effect.
7823 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7825 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
7826 the legality of An others clause applies as well to a choice in
7827 an Iterated_component_ association.
7828 (Resolve_Iterated_Component_Association): An others choice
7830 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
7831 Iterated_Component_Association is not static.
7833 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7835 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
7836 control is passed to the expresion handler before the new mode
7838 * sem_ch12.adb (Analyze_Package_Instantiation,
7839 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
7840 in case control is passed to the expresion handler before the
7843 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7845 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
7846 exp_aggr.adb: Minor reformatting.
7848 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7850 * inline.adb: Minor reformatting and typo fix.
7852 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7854 * sem_util.ads, sem_util.adb (Choice_List): Move function here
7855 from sem_aggr.adb, for use elsewhere.
7856 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
7857 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
7858 Iterated_Component_Present.
7859 * exp_aggr.adb: Use Choice_List throughout, to handle
7860 Iterated_Component_Associations.
7861 (Gen_Loop): Generate proper loop for an
7862 Iterated_Component_Association: loop variable has the identifier
7863 of the original association. Generate a loop even for a single
7864 component choice, in order to make loop parameter visible in
7866 (Flatten): An Iterated_Component_Association is not static.
7868 2017-01-13 Yannick Moy <moy@adacore.com>
7870 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
7871 float exponentiation for statically known small negative values
7872 is the reciprocal of the exponentiation for the opposite value
7874 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
7875 Ensure that the value of float exponentiation for negative values
7876 is the reciprocal of the exponentiation for the opposite value
7878 * inline.adb (Expand_Inlined_Call): Fix the count
7879 for the number of generated gotos.
7881 2017-01-13 Yannick Moy <moy@adacore.com>
7883 * inline.adb: Code cleanup.
7884 * sem_util.adb (Is_OK_Volatile_Context): Add
7885 expression in delay statement as OK for volatile context.
7887 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7889 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
7890 mode a choice that is a subtype with a static predicate is
7891 replaced by the values it covers. This transformation must not
7892 be performed in ASIS mode, to preserve the source for analysis.
7894 2017-01-13 Justin Squirek <squirek@adacore.com>
7896 * nlists.ads: Correct minor typo.
7898 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7900 * sem_ch13.adb: Minor reformatting and typo fix.
7902 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7904 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
7905 Iterated_Component_Association is a named association in an
7907 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
7908 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
7909 and resolve the discrete choices and the expression of the
7911 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
7912 Loop_Actions and Box_Present are attributes of
7913 N_Iterated_Component_Association nodes. Box_Present is always
7915 * sprint.adb (Sprint_Node): An Iterated_Component_Association
7916 has a Discrete_Choices list, as specified in the RM. A
7917 Component_Association for aggregate uses instead a Choices list.
7918 We have to live with this small inconsistency because the new
7919 construct also has a defining identifier, and there is no way
7920 to merge the two node structures.
7922 2017-01-13 Yannick Moy <moy@adacore.com>
7924 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
7925 list of pragmas to remove. Remove pragmas from the list of
7926 statements in the body to inline.
7927 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
7929 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7931 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
7932 Analyze_Declarations, to analyze and resolve the expressions of
7933 aspect specifications in the current declarative list, so that
7934 the expressions have proper entity and type info. This is needed
7935 for ASIS when there is no subsequent expansion to generate this
7936 semantic information.
7937 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
7938 original expression, to suppress cascaded errors when expression
7939 has been constant-folded.
7940 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
7941 ASIS mode, because there is no subsequent expansion to decorate
7944 2017-01-13 Yannick Moy <moy@adacore.com>
7946 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
7947 New function to detect when a call may be inlined or not in
7949 (Expand_Inlined_Call): Ensure that a temporary
7950 is always created in the cases where a type conversion may be
7951 needed on an input parameter in GNATprove mode, so that GNATprove
7952 sees the check to perform.
7953 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
7954 when not applicable due to actual requiring type conversion
7955 with possible check but no temporary value can be copied for
7956 GNATprove to see the check.
7958 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7960 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
7961 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
7962 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
7963 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
7964 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
7965 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
7966 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
7967 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
7968 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
7969 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
7970 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
7971 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
7972 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
7973 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
7974 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
7975 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
7976 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
7977 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
7978 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
7979 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
7980 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
7981 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
7982 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
7983 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
7984 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
7985 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
7986 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
7987 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
7988 statements to reflect the new style for case alternatives. Various
7989 code clean up and reformatting.
7991 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7993 * exp_util.adb: Minor reformatting.
7995 2017-01-13 Yannick Moy <moy@adacore.com>
7997 * exp_spark.adb: Code cleanup.
7998 * sem_ch9.adb (Analyze_Delay_Until): Resolve
7999 expression so that calls are identified as such inside delay
8002 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8004 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
8005 * par-ch3.adb (P_Discrete_Choice_List): An
8006 Iterated_Component_Association is an array aggregate component.
8007 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
8008 (Is_Quantified_Expression): New function that performs a lookahead
8009 to distinguish quantified expressions from iterated component
8011 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
8013 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
8014 * sem.adb (Analyze): Handle Iterated_Component_Association.
8015 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
8016 component associations.
8017 * sinfo.ads, sinfo.adb: Entries for for
8018 N_Iterated_Component_Association and its fields.
8019 * sprint.adb (Sprint_Node_Actual): Handle
8020 N_Iterated_Component_Association.
8022 2017-01-13 Justin Squirek <squirek@adacore.com>
8024 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
8025 of the style check until after preanalysis of acutals.
8027 2017-01-13 Yannick Moy <moy@adacore.com>
8029 * sem_ch13.adb: Minor reformatting.
8030 * par-ch11.adb: minor style fix in whitespace
8031 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
8032 reduced to Add_Artificial_ALI_File; style fix in declaration of
8033 Text; grammar fix in comment.
8034 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
8035 * freeze.adb: Cleanup to pass pragma instead of
8037 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
8038 replace System'To_Address by equivalent call.
8040 2017-01-13 Arnaud Charlet <charlet@adacore.com>
8042 * bindusg.adb: Improve usage output for -f switch.
8044 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8046 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
8049 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8051 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
8052 treat comparisons on strings as legal in a Static_Predicate.
8053 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
8054 a function call that is the expansion of a string comparison.The
8055 function call is built when compiling the corresponding predicate
8056 function, but the expression has been found legal as a static
8057 predicate during earlier analysis.
8058 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
8059 properly a function call that is the expansion of a string
8060 comparison operation, in order to recover the Static_Predicate
8061 expression and apply it to a static argument when needed.
8063 2017-01-13 Tristan Gingold <gingold@adacore.com>
8065 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
8066 (Open_Read): Re-implement using Open_Read_No_Exception.
8067 (Open_Write): Raise exception in case of error.
8068 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
8069 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
8071 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
8073 2017-01-13 Yannick Moy <moy@adacore.com>
8075 * checks.adb: Code cleanup.
8077 2017-01-13 Yannick Moy <moy@adacore.com>
8079 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
8080 expression instead of unanalyzed aspect expression for checking
8081 the validity of inheriting an operation. Also copy the expression
8082 being passing it to Build_Class_Wide_Expression, as this call
8083 modifies its argument.
8084 * sem_util.ads Fix comment to reference correct function name
8087 2017-01-13 Javier Miranda <miranda@adacore.com>
8089 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
8090 when we propagate information about the indexes back to the original
8091 indexing mode and the prefix of the index is a function call, do not
8092 remove any parameter from such call.
8094 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8096 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
8097 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
8098 a build-in-place function whose result type is tagged.
8100 2017-01-13 Yannick Moy <moy@adacore.com>
8102 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
8103 Do not generate a wrapper when the only candidate is a class-wide
8105 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
8106 inside a generic context.
8108 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8110 * exp_util.adb (Add_Inherited_Tagged_DIC):
8111 Pass the object parameters of both the parent and the derived
8112 type DIC procedure to the reference replacement circuitry.
8113 (Find_DIC_Type): Modify the circuitry to present the partial
8114 view of a private type in case the private type defines its own
8116 (Replace_Object_And_Primitive_References): Add two
8117 optional formal parameters. Update the comment on usage. Update
8118 the replacement of references to object parameters.
8120 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8122 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
8124 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8126 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
8127 an out parameter that is a type conversion, independently of th
8128 range check that may apply to the expression of the conversion,
8129 for use in GNATProve.
8131 2017-01-13 Yannick Moy <moy@adacore.com>
8133 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
8134 GNATprove_Mode here to Frontend.
8135 * frontend.adb (Frontend): Move the implicit with for System
8136 in GNATprove_Mode here as it ismore correct this way; the old
8137 place only worked by chance, since there were no overloaded names.
8138 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
8139 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
8140 four attributes identified in SRM 9(18), add an implicit with
8141 to Ada.Task_Identification.
8142 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
8143 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
8145 * checks.adb (Apply_Discriminant_Check,
8146 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
8147 In GNATprove mode, we do not apply the checks, but we still
8148 analyze the expression to possibly issue errors on SPARK
8149 code when a run-time error can be detected at compile time.
8150 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
8153 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8155 * expander.adb (Expand): Add a warning about using return
8156 statements in Ghost management code.
8157 * exp_ch3.adb (Freeze_Type): Add a warning about using return
8158 statements in Ghost management code.
8159 * exp_ch7.adb (Build_Invariant_Procedure_Body,
8160 Build_Invariant_Procedure_Declaration): Add a warning about
8161 using return statements in Ghost management code.
8162 * exp_disp.adb (Make_DT): Add a warning about using return
8163 statements in Ghost management code.
8164 * exp_util.adb (Build_DIC_Procedure_Body,
8165 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
8166 warning about using return statements in Ghost management code.
8167 * freeze.adb (Freeze_Entity): Add a warning about using return
8168 statements in Ghost management code.
8169 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
8170 statements in Ghost management code.
8171 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
8172 a warning about using return statements in Ghost management code.
8173 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
8174 return statements in Ghost management code.
8175 * sem_ch6.adb (Analyze_Procedure_Call,
8176 Analyze_Subprogram_Body_Helper): Add a warning about using return
8177 statements in Ghost management code.
8178 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
8179 using return statements in Ghost management code.
8180 * sem_ch12.adb (Analyze_Package_Instantiation,
8181 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
8182 Instantiate_Subprogram_Body): Add a warning about using return
8183 statements in Ghost management code.
8184 * sem_ch13.adb (Build_Predicate_Functions,
8185 Build_Predicate_Function_Declarations): Add a warning about
8186 using return statements in Ghost management code.
8187 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
8188 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
8189 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
8190 using return statements in Ghost management code.
8192 2017-01-13 Tristan Gingold <gingold@adacore.com>
8194 * s-mmosin-mingw.adb: Fix pragma import.
8196 2017-01-13 Arnaud Charlet <charlet@adacore.com>
8198 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
8201 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8203 * atree.adb (Allocate_Initialize_Node): A newly created node is
8204 no longer marked as Ghost at this level.
8205 (Mark_New_Ghost_Node): New routine.
8206 (New_Copy): Mark the copy as Ghost.
8207 (New_Entity): Mark the entity as Ghost.
8208 (New_Node): Mark the node as Ghost.
8209 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
8210 apply to unanalyzed entities.
8211 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
8213 (Set_Is_Checked_Ghost_Entity): This attribute now
8214 applies to all entities as well as unanalyzed entities.
8215 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
8216 all entities as well as unanalyzed entities.
8217 * expander.adb Add with and use clauses for Ghost.
8218 (Expand): Install and revert the Ghost region associated with the node
8220 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
8221 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
8222 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
8223 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
8224 (Freeze_Type): Install and revert the Ghost region associated
8225 with the type being frozen.
8226 * exp_ch5.adb Remove with and use clauses for Ghost.
8227 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
8228 * exp_ch6.adb Remove with and use clauses for Ghost.
8229 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
8230 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
8231 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
8232 Ghost region of the working type.
8233 (Build_Invariant_Procedure_Declaration): Install and revert
8234 the Ghost region of the working type.
8235 (Expand_N_Package_Body): Remove all Ghost-related code.
8236 * exp_ch8.adb Remove with and use clauses for Ghost.
8237 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
8239 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
8240 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
8241 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
8243 * exp_ch13.adb Remove with and use clauses for Ghost.
8244 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
8245 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
8246 the tagged type. Move the generation of various entities within
8247 the Ghost region of the type.
8248 * exp_prag.adb Remove with and use clauses for Ghost.
8249 (Expand_Pragma_Check): Remove all Ghost-related code.
8250 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
8251 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
8252 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
8253 * exp_util.adb (Build_DIC_Procedure_Body): Install
8254 and revert the Ghost region of the working types.
8255 (Build_DIC_Procedure_Declaration): Install and revert the
8256 Ghost region of the working type.
8257 (Make_Invariant_Call): Install and revert the Ghost region of the
8259 (Make_Predicate_Call): Reimplemented. Install and revert the
8260 Ghost region of the associated type.
8261 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
8262 of the entity being frozen.
8263 (New_Freeze_Node): Removed.
8264 * ghost.adb Remove with and use clauses for Opt.
8265 (Check_Ghost_Completion): Update the parameter profile
8266 and all references to formal parameters.
8267 (Ghost_Entity): Update the comment on usage.
8268 (Install_Ghost_Mode): New routines.
8269 (Is_Ghost_Assignment): New routine.
8270 (Is_Ghost_Declaration): New routine.
8271 (Is_Ghost_Pragma): New routine.
8272 (Is_Ghost_Procedure_Call): New routine.
8273 (Is_Ghost_Renaming): Removed.
8274 (Is_OK_Declaration): Reimplemented.
8275 (Is_OK_Pragma): Reimplemented.
8276 (Is_OK_Statement): Reimplemented.
8277 (Is_Subject_To_Ghost): Update the comment on usage.
8278 (Mark_And_Set_Ghost_Assignment): New routine.
8279 (Mark_And_Set_Ghost_Body): New routine.
8280 (Mark_And_Set_Ghost_Completion): New routine.
8281 (Mark_And_Set_Ghost_Declaration): New routine.
8282 (Mark_And_Set_Ghost_Instantiation): New routine.
8283 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8284 (Mark_Full_View_As_Ghost): Removed.
8285 (Mark_Ghost_Declaration_Or_Body): New routine.
8286 (Mark_Ghost_Pragma): New routine.
8287 (Mark_Ghost_Renaming): New routine.
8288 (Mark_Pragma_As_Ghost): Removed.
8289 (Mark_Renaming_As_Ghost): Removed.
8290 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
8291 (Prune_Node): Freeze nodes no longer need special pruning, they
8292 are processed by the general ignored Ghost code mechanism.
8293 (Restore_Ghost_Mode): New routine.
8294 (Set_Ghost_Mode): Reimplemented.
8295 (Set_Ghost_Mode_From_Entity): Removed.
8296 * ghost.ads Add with and use clauses for Ghost.
8297 (Check_Ghost_Completion): Update the parameter profile
8298 along with the comment on usage.
8299 (Install_Ghost_Mode): New routine.
8300 (Is_Ghost_Assignment): New routine.
8301 (Is_Ghost_Declaration): New routine.
8302 (Is_Ghost_Pragma): New routine.
8303 (Is_Ghost_Procedure_Call): New routine.
8304 (Mark_And_Set_Ghost_Assignment): New routine.
8305 (Mark_And_Set_Ghost_Body): New routine.
8306 (Mark_And_Set_Ghost_Completion): New routine.
8307 (Mark_And_Set_Ghost_Declaration): New routine.
8308 (Mark_And_Set_Ghost_Instantiation): New routine.
8309 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8310 (Mark_Full_View_As_Ghost): Removed.
8311 (Mark_Ghost_Pragma): New routine.
8312 (Mark_Ghost_Renaming): New routine.
8313 (Mark_Pragma_As_Ghost): Removed.
8314 (Mark_Renaming_As_Ghost): Removed.
8315 (Restore_Ghost_Mode): New routine.
8316 (Set_Ghost_Mode): Redefined.
8317 (Set_Ghost_Mode_From_Entity): Removed.
8318 * sem.adb (Analyze): Install and revert the Ghost region of the
8319 node being analyzed.
8320 (Do_Analyze): Change the way a clean Ghost
8321 region is installed and reverted.
8322 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
8323 all Ghost-related code.
8324 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
8325 (Analyze_Number_Declaration): Remove all Ghost-related code.
8326 (Analyze_Object_Declaration): Install and revert the Ghost region of
8327 a deferred object declaration's completion.
8328 (Array_Type_Declaration): Remove all Ghost-related code.
8329 (Build_Derived_Type): Update the comment on
8330 the propagation of Ghost attributes from a parent to a derived type.
8331 (Derive_Subprogram): Remove all Ghost-related code.
8332 (Make_Class_Wide_Type): Remove all Ghost-related code.
8333 (Make_Implicit_Base): Remove all Ghost-related code.
8334 (Process_Full_View): Install and revert the Ghost region of
8335 the partial view. There is no longer need to check the Ghost
8337 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
8338 region of the left hand side.
8339 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
8340 all Ghost-related code.
8341 (Analyze_Expression_Function): Remove all Ghost-related code.
8342 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
8343 (Analyze_Procedure_Call): Install and revert the Ghost region of
8344 the procedure being called.
8345 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
8346 region of the spec or body.
8347 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
8348 (Build_Subprogram_Declaration): Remove all Ghost-related code.
8349 (Find_Corresponding_Spec): Remove all Ghost-related code.
8350 (Process_Formals): Remove all Ghost-related code.
8351 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
8352 the Ghost region of the spec.
8353 (Analyze_Package_Declaration): Remove all Ghost-related code.
8354 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
8355 Ghost when it aliases a Ghost entity.
8356 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
8358 (Analyze_Object_Renaming): Mark a renaming as Ghost when
8359 it aliases a Ghost entity.
8360 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
8362 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
8363 aliases a Ghost entity.
8364 * sem_ch11.adb Remove with and use clauses for Ghost.
8365 (Analyze_Exception_Declaration): Remove all Ghost-related code.
8366 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
8368 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
8370 (Analyze_Package_Instantiation): Install and revert the Ghost region
8371 of the package instantiation.
8372 (Analyze_Subprogram_Instantiation): Install
8373 and revert the Ghost region of the subprogram instantiation.
8374 (Instantiate_Package_Body): Code clean up. Install and revert the
8375 Ghost region of the package body.
8376 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
8377 Ghost region of the subprogram body.
8378 * sem_ch13.adb (Build_Predicate_Functions): Install
8379 and revert the Ghost region of the related type.
8380 (Build_Predicate_Function_Declaration): Code clean up. Install
8381 and rever the Ghost region of the related type.
8382 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8383 Install and revert the Ghost region of the pragma.
8384 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
8385 Ghost region of the pragma.
8386 (Analyze_Pragma): Install and revert the Ghost region of various
8387 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
8388 or encloses a Ghost entity.
8389 (Analyze_Pre_Post_Condition): Install and revert the Ghost
8390 region of the pragma.
8391 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
8392 Ghost region of the pragma.
8393 * sem_res.adb (Resolve): Remove all Ghost-related code.
8394 * sem_util.adb (Is_Declaration): Reimplemented.
8395 (Is_Declaration_Other_Than_Renaming): New routine.
8396 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
8397 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
8398 (Is_Ghost_Pragma): Removed.
8399 (Is_Ignored_Ghost_Pragma): New routine.
8400 (Set_Is_Checked_Ghost_Pragma): New routine.
8401 (Set_Is_Ghost_Pragma): Removed.
8402 (Set_Is_Ignored_Ghost_Pragma): New routine.
8403 * sinfo.ads: Update the documentation on Ghost mode and
8404 Ghost regions. New attributes Is_Checked_Ghost_Pragma
8405 and Is_Ignored_Ghost_Pragma along with usages in nodes.
8406 Remove attribute Is_Ghost_Pragma along with usages in nodes.
8407 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8408 (Is_Ghost_Pragma): Removed along with pragma Inline.
8409 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8410 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8411 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
8412 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8414 2017-01-12 Tristan Gingold <gingold@adacore.com>
8416 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
8417 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
8419 2017-01-12 Yannick Moy <moy@adacore.com>
8421 * errout.adb, errout.ads (Initialize): Factor common treatment
8423 (Reset_Warnings): New procedure to reset counts related to warnings.
8424 (Record_Compilation_Errors): New variable to store the presence of an
8425 error, used in gnat2why to allow changing the Warning_Mode.
8426 (Compilation_Errors): Use new variable Record_Compilation_Errors to
8427 store the presence of an error.
8429 2017-01-12 Javier Miranda <miranda@adacore.com>
8431 * sem_ch13.adb (Analyze_Aspect_Specifications):
8432 For Interrupt_Handler and Attach_ Handler aspects, decorate the
8433 internally built reference to the protected procedure as coming
8434 from sources and force its analysis.
8436 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8438 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
8439 inherit predicates if any from the first_subtype of the parent,
8440 not from the anonymous parent type.
8441 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
8442 predicate is not a static subtype.
8444 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8446 * freeze.adb (Check_Suspicious_Convention): New procedure
8447 performing a warning check on discriminated record types with
8448 convention C or C++. Factored out of procedure Freeze_Record_Type,
8449 and changed to only apply to base types (to avoid spurious
8450 warnings on subtypes). Minor improvement of warning messages
8451 to refer to discriminated rather than variant record types.
8452 (Freeze_Record_Type): Remove code for performing a suspicious
8454 (Freeze_Entity): Only call Freeze_Record_Type
8455 on types that aren't declared within any enclosing generic units
8456 (rather than just excluding the type when the innermost scope
8457 is generic). Call Check_Suspicious_Convention whether or not
8458 the type is declared within a generic unit.
8459 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
8460 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
8463 2017-01-12 Tristan Gingold <gingold@adacore.com>
8465 * sysdep.c, adaint.c, rtinit.c, ming32.h:
8466 (__gnat_current_codepage): Renamed from CurrentCodePage
8467 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
8469 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8471 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
8472 quantified expressions, following AI12-050: the loop parameters
8473 of two quantified expressions are conformant if they have the
8476 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8478 * gcc-interface/Makefile.in: Clean up VxWorks targets.
8480 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8482 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
8483 Hnadle properly the attribute reference when it appears as part
8484 of an expression in another loop aspect.
8486 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8488 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
8489 subsidiary of Build_Initialization_Call, to complete generation
8490 of predicate checks on discriminants whose (sub)types have
8491 predicates, and to add checks on variants that do not have an
8493 * sem_util.adb (Gather_Components): A missing Others alternative is
8494 not an error when the type of the discriminant is a static predicate
8495 (and coverage has been checked when analyzing the case statement). A
8496 runtime check is generated to verify that a given discriminant
8497 satisfies the predicate (RM 3.8.1. (21.1/2)).
8499 2017-01-12 Yannick Moy <moy@adacore.com>
8501 * gnat1drv.adb (Adjust_Global_Switches): Only
8502 perform checking of exception mechanism when generating code.
8504 2017-01-12 Justin Squirek <squirek@adacore.com>
8506 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
8507 Remove handling of access component with invariant.
8508 (Build_Invariant_Procedure_Declaration): Remove return on class
8510 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
8511 conditional exception for component or array so Has_Own_Invariants
8512 flag is not falsly set.
8513 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
8514 wide type to have no invariant flags.
8516 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8518 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
8519 sem_ch13.adb: Minor reformatting.
8521 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8523 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
8524 adjustment primitive when the ancestor type was not properly frozen.
8525 (Gen_Assign): Guard against a missing initialization
8526 primitive when the component type was not properly frozen.
8527 (Initialize_Array_Component): Guard against a missing adjustment
8528 primitive when the component type was not properly frozen.
8529 (Initialize_Record_Component): Guard against a missing adjustment
8530 primitive when the component type was not properly frozen.
8531 (Process_Transient_Component_Completion): The transient object may
8532 not be finalized when its associated type was not properly frozen.
8533 * exp_ch3.adb (Build_Assignment): Guard against a missing
8534 adjustment primitive when the component type was not properly frozen.
8535 (Build_Initialization_Call): Guard against a missing
8536 initialization primitive when the associated type was not properly
8538 (Expand_N_Object_Declaration): Guard against a missing
8539 adjustment primitive when the base type was not properly frozen.
8540 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
8541 body when there is no adjustment primitive available. Create an
8542 empty Deep_Finalize body when there is no finalization primitive
8544 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
8545 missing finalization primitive when the designated type was
8546 not properly frozen.
8547 (Expand_N_Allocator): Guard against a missing initialization primitive
8548 when the designated type was not properly frozen.
8549 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
8550 only when the corresponding adjustment primitive is available.
8551 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
8552 adjustment/finalization statements only when there is an available
8553 primitive to carry out the action.
8554 (Build_Initialize_Statements): Generate the initialization/finalization
8555 statements only when there is an available primitive to carry out the
8557 (Make_Adjust_Call): Do not generate a call when the underlying
8558 type is not present due to a possible missing full view.
8559 (Make_Final_Call): Do not generate a call when the underlying
8560 type is not present due to a possible missing full view.
8561 (Make_Finalize_Address_Stmts): Generate an empty body when the
8562 designated type lacks a finalization primitive.
8563 (Make_Init_Call): Do not generate a call when the underlying type is
8564 not present due to a possible missing full view.
8565 (Process_Component_For_Adjust): Add the adjustment call only when the
8566 corresponding adjustment primitive is available.
8567 (Process_Component_For_Finalize): Add the finalization call only when
8568 the corresponding finalization primitive is available.
8569 (Process_Object_Declaration): Use a null statement to emulate a
8570 missing call to the finalization primitive of the object type.
8571 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
8572 (Make_Final_Call): Update the comment on usage.
8573 (Make_Init_Call): Update the comment on usage.
8574 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
8576 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8578 * einfo.ads: Update documentation of Address_Taken.
8579 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
8580 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
8581 for subprograms when setting Address_Taken flag.
8583 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
8585 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
8586 Configurable_Run_Time_Mode off when analysing with'ed predefined
8589 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8591 * sem_prag.adb: Minor reformatting.
8592 * sem_util.adb (Unique_Entity): fix result for
8593 bodies of entry families.
8595 2017-01-12 Justin Squirek <squirek@adacore.com>
8597 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
8598 Resolve_Suppressible in the pragma Assertion_Policy case.
8599 (Resolve_Suppressible): Created this function to factor out
8600 common code used to resolve Suppress to either Ignore or Check
8601 * snames.ads-tmpl: Add name for Suppressible.
8603 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8605 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
8607 * debug.adb: Minor comment fixes.
8609 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8611 * sem_util.adb (Unique_Entity): For concurrent
8612 bodies that are defined with stubs and complete a declaration
8613 of a single concurrent object return the entity of an implicit
8614 concurrent type, not the entity of the anonymous concurrent
8616 * debug.adb: -gnatd.J is no longer used.
8617 * make.adb (Globalize): Removed, no longer used.
8618 * sem_ch9.adb: minor typo in comment for entry index
8620 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
8622 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8623 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8624 the value record of a task, set its _Secondary_Stack_Size field
8626 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8627 a _Secondary_Stack_Size field in the value record of
8628 the task if a Secondary_Stack_Size rep item is present.
8629 (Make_Task_Create_Call): Include secondary stack size
8630 parameter. If No_Secondary_Stack restriction is in place, passes
8632 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8633 Secondary_Stack_Size.
8634 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8635 function to define the overhead of the secondary stack.
8636 * s-tarest.adb (Create_Restricted_Task,
8637 Create_Restricted_Task_Sequential): Functions now include
8638 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8639 * s-tarest.adb (Create_Restricted_Task,
8640 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
8641 include Secondary_Stack_Size parameter.
8642 (Task_Wrapper): Secondary stack now allocated to the size specified by
8643 the Secondary_Stack_Size parameter in the task's ATCB.
8644 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
8645 Secondary_Stack_Size component.
8646 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8647 Create_Restricted_Task_Sequential): Function now include
8648 Secondary_Stack_Size parameter.
8649 (Task_Wrapper): Secondary stack now allocated to the size
8650 specified by the Secondary_Stack_Size parameter in the task's
8652 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
8653 to include Secondary_Stack_Size parameter.
8654 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
8655 Secondary_Stack_Size aspect, turning the aspect into its corresponding
8657 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
8658 * snames.adb-tmpl, snames.ads-tmpl: Added names
8659 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8660 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8662 2017-01-12 Yannick Moy <moy@adacore.com>
8664 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
8667 2017-01-12 Justin Squirek <squirek@adacore.com>
8669 * exp_attr.adb (Expand_N_Attribute_Reference):
8670 Fix Finalization_Size case by properly resolving the type after
8671 rewritting the node.
8673 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8675 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
8677 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
8678 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
8679 exp_sel.ads: Minor reformatting.
8681 2017-01-12 Justin Squirek <squirek@adacore.com>
8683 * exp_ch6.adb (Expand_Call): Add guard to prevent
8684 invariant checks from being created for internally generated
8687 2017-01-12 Bob Duff <duff@adacore.com>
8689 * lib-writ.ads: Remove incorrect comment.
8691 2017-01-12 Javier Miranda <miranda@adacore.com>
8693 * debug.adb (-gnatd.K): Enable generation of contract-only
8694 procedures in CodePeer mode.
8695 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
8697 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
8699 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
8701 (Get_Contract_Only_Missing_Body_Name): New subprogram.
8702 (Get_Contract_Only_Body): New subprogram.
8703 (Set_Contract_Only_Body): New subprogram.
8704 (Is_Contract_Only_Body): New subprogram.
8705 (Set_Is_Contract_Only_Body): New subprogram.
8706 (SCIL_Nodes): Replace table by hash-table.
8708 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8710 * exp_ch6.adb: Minor reformatting.
8711 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
8713 2017-01-12 Bob Duff <duff@adacore.com>
8715 * binde.adb (Forced): New reason for a dependence.
8716 (Force_Elab_Order): Implementation of the new switch.
8717 * binde.ads: Minor comment fixes.
8718 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
8719 long ago that is no longer supported; removed comment about that.
8720 * opt.ads (Force_Elab_Order_File): Name of file specified for
8722 * switch-b.adb: Parse -f switch.
8724 2017-01-12 Justin Squirek <squirek@adacore.com>
8726 * exp_ch6.adb (Check_View_Conversion): Created this function
8727 to properly chain calls to check type invariants that may be
8728 present in a subprogram call after the subprogram.
8729 (Expand_Call): Add a conditional to identify when a view conversion
8730 needs to be checked.
8731 * nlists.adb, nlists.ads (Prepend_New): New routine.
8732 (Prepend_New_To): New routine.
8734 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8736 * sinfo.ads: Minor reformatting.
8738 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8740 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
8743 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8745 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
8746 variable Definite. Create a local object and pass its 'Access to the
8747 BIP function when the result type is either definite or it does not
8748 require any finalization or secondary stack management.
8750 2017-01-12 Bob Duff <duff@adacore.com>
8752 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
8753 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
8754 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
8755 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
8756 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
8757 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
8758 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8759 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
8760 Change name to Pragma_Name_Unmapped.
8761 (Pragma_Name_Mapped): Change name to Pragma_Name.
8762 This is because the "mapped" version should be the usual case.
8764 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
8766 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
8767 Is_Default_Init_Cond_Procedure, and
8768 Has_Inherited_Default_Init_Cond. Add uses of flags
8769 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
8770 (Default_Init_Cond_Procedure): Removed.
8771 (DIC_Procedure): New routine.
8772 (Has_Default_Init_Cond): Removed.
8773 (Has_DIC): New routine.
8774 (Has_Inheritable_Invariants): The attribute applies to the base type.
8775 (Has_Inherited_Default_Init_Cond): Removed.
8776 (Has_Inherited_DIC): New routine.
8777 (Has_Inherited_Invariants): The attribute applies to the base type.
8778 (Has_Own_DIC): New routine.
8779 (Has_Own_Invariants): The attribute applies to the base type.
8780 (Is_Default_Init_Cond_Procedure): Removed.
8781 (Is_DIC_Procedure): New routine.
8782 (Set_Default_Init_Cond_Procedure): Removed.
8783 (Set_DIC_Procedure): New routine.
8784 (Set_Has_Default_Init_Cond): Removed.
8785 (Set_Has_Inheritable_Invariants): The attribute applies
8787 (Set_Has_Inherited_Default_Init_Cond): Removed.
8788 (Set_Has_Inherited_DIC): New routine.
8789 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
8790 (Set_Has_Own_DIC): New routine.
8791 (Set_Has_Own_Invariants): The attribute applies to the base type.
8792 (Set_Is_Default_Init_Cond_Procedure): Removed.
8793 (Set_Is_DIC_Procedure): New routine.
8794 (Write_Entity_Flags): Update the output of all flags related to
8795 default initial condition.
8796 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
8797 of the call to the DIC procedure.
8798 (Freeze_Type): Generate the body of the DIC procedure.
8799 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
8800 all occurrences of Create_Append with Append_New_To. Do
8801 not generate an invariant procedure for a class-wide type.
8802 The generated body acts as a freeze action of the working type.
8803 (Build_Invariant_Procedure_Declaration): Do not generate an
8804 invariant procedure for a class-wide type.
8805 (Create_Append): Removed.
8806 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
8807 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
8808 class-wide pre/postcondition description and data structures from
8810 (Build_Class_Wide_Expression): Moved from Sem_Prag.
8811 (Build_DIC_Call): New routine.
8812 (Build_DIC_Procedure_Body): New routine.
8813 (Build_DIC_Procedure_Declaration): New routine.
8814 (Entity_Hash): Moved from Sem_Prag.
8815 (Find_DIC_Type): New routine.
8816 (Update_Primitives_Mapping): Reimplemented.
8817 (Update_Primitives_Mapping_Of_Types): New routine.
8818 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
8819 (Build_DIC_Call): New routine.
8820 (Build_DIC_Procedure_Body): New routine.
8821 (Build_DIC_Procedure_Declaration): New routine.
8822 (Update_Primitives_Mapping): Moved from Sem_Prag.
8823 (Update_Primitives_Mapping_Of_Types): New routine.
8824 * nlists.adb (Append_New): New routine.
8825 (Append_New_To): New routine.
8826 * nlists.ads (Append_New): New routine.
8827 (Append_New_To): New routine.
8828 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
8829 of DIC procedures here. This is now done at the end of the
8830 visible declarations, private declarations, and at the freeze
8832 (Analyze_Private_Extension_Declaration):
8833 A private extension inherits the DIC pragma of a parent type.
8834 (Analyze_Subtype_Declaration): No need to propagate invariant
8835 attributes to a subtype as those apply to the base type.
8836 (Build_Derived_Record_Type): No need to inherit invariants here
8837 as this is now done in Build_Derived_Type.
8838 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
8840 (Process_Full_View): Update the propagation of DIC attributes.
8841 (Propagate_Default_Init_Cond_Attributes): Removed.
8842 * sem_ch7.adb Add with and use clauses for Exp_Util.
8843 (Analyze_Package_Specification): Create the body of the DIC
8844 procedure at the end of the visible and private declarations.
8845 (Preserve_Full_Attributes): Propagate DIC attributes.
8846 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
8848 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
8849 * sem_elab.adb (Check_A_Call): Update the call to
8850 Is_Nontrivial_Default_Init_Cond_Procedure.
8851 * sem_prag.adb Remove the with and use clauses for
8852 GNAT.HTable. Move the handling of class- wide pre/postcondition
8853 description and data structures to Exp_Util.
8854 (Analyze_Pragma): Create the declaration of the DIC procedure. There
8855 is no need to propagate invariant-related attributes at this point
8856 as this is done in Build_Invariant_Procedure_Declaration.
8857 (Build_Class_Wide_Expression): Moved to Exp_Util.
8858 (Entity_Hash): Moved to Exp_Util.
8859 (Update_Primitives_Mapping): Moved to Exp_Util.
8860 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
8861 (Update_Primitives_Mapping): Moved to Exp_Util.
8862 * sem_util.adb: Remove with and use clauses for Ghost
8864 (Build_Default_Init_Cond_Call): Removed.
8865 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8866 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8867 (Get_Views): Reimplemented.
8868 (Has_Full_Default_Initialization): Reimplement the section on DIC.
8869 (Inherit_Default_Init_Cond_Procedure): Removed.
8870 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8871 (Is_Nontrivial_DIC_Procedure): New routine.
8872 (Is_Verifiable_DIC_Pragma): New routine.
8873 (Propagate_DIC_Attributes): New routine.
8874 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
8875 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8876 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8877 (Inherit_Default_Init_Cond_Procedure): Removed.
8878 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8879 (Is_Nontrivial_DIC_Procedure): New routine.
8880 (Is_Verifiable_DIC_Pragma): New routine.
8881 (Propagate_DIC_Attributes): New routine.
8882 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
8884 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
8886 (Expression_Copy): New routine along with pragma Inline.
8887 (Set_Expression_Copy): New routine along with pragma Inline.
8889 2017-01-06 Bob Duff <duff@adacore.com>
8891 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
8892 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
8893 we won't generate the call to s_stalib_adafinal when the main
8894 is not written in Ada.
8896 2017-01-06 Bob Duff <duff@adacore.com>
8898 * sem_prag.adb: Minor: remove pragma Warnings.
8900 2017-01-06 Tristan Gingold <gingold@adacore.com>
8902 * Makefile.rtl: Do not compile s-stchop by default.
8904 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8906 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
8907 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
8908 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
8909 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
8910 Reverted previous change for now.
8912 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8914 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
8915 check to default discriminant value if checks are enabled.
8916 (Build_Assignment): If type of component has static predicate,
8917 apply check to its default value, if any.
8919 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8921 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8922 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8923 the value record of a task, set its _Secondary_Stack_Size field
8925 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8926 a _Secondary_Stack_Size field in the value record of
8927 the task if a Secondary_Stack_Size rep item is present.
8928 (Make_Task_Create_Call): Include secondary stack size
8929 parameter. If No_Secondary_Stack restriction is in place, passes
8931 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8932 Secondary_Stack_Size.
8933 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8934 function to define the overhead of the secondary stack.
8935 * s-tarest.adb (Create_Restricted_Task,
8936 Create_Restricted_Task_Sequential): Functions now include
8937 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8938 * s-tarest.adb (Create_Restricted_Task,
8939 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
8940 now include Secondary_Stack_Size parameter.
8942 Secondary stack now allocated to the size specified by the
8943 Secondary_Stack_Size parameter in the task's ATCB.
8944 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
8945 Secondary_Stack_Size component.
8946 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8947 Create_Restricted_Task_Sequential): Function now include
8948 Secondary_Stack_Size parameter.
8949 (Task_Wrapper): Secondary stack
8950 now allocated to the size specified by the Secondary_Stack_Size
8951 parameter in the task's ATCB.
8952 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
8953 for Secondary_Stack_Size aspect, turning the aspect into its
8954 corresponding internal attribute.
8955 (Analyze_Attribute_Definition):
8956 Process Secondary_Stack_Size attribute.
8957 * snames.adb-tmpl, snames.ads-tmpl: Added names
8958 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8959 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8961 2017-01-06 Pascal Obry <obry@adacore.com>
8963 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
8964 Sequential_IO and Direct_IO.
8966 2017-01-06 Bob Duff <duff@adacore.com>
8968 * snames.ads-tmpl (Renamed): New name for the pragma argument.
8969 * par-ch2.adb: Allow the new pragma (with analysis deferred
8971 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
8972 Keep a mapping from new pragma names to old names.
8973 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
8974 implement it by calling Map_Pragma_Name.
8975 * checks.adb, contracts.adb, einfo.adb, errout.adb,
8976 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
8977 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
8978 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
8979 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
8980 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8981 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
8984 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8986 * exp_ch9.adb: Minor reformatting.
8988 2017-01-06 Tristan Gingold <gingold@adacore.com>
8990 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
8991 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
8992 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
8994 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
8995 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
8996 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
8997 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
8999 2017-01-06 Bob Duff <duff@adacore.com>
9001 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
9002 dummy implementation of Map_Pragma_Name.
9004 2017-01-06 Tristan Gingold <gingold@adacore.com>
9006 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
9007 entry_body variable constant.
9008 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
9009 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
9011 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
9012 now access to constant.
9014 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9016 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
9017 reformatting and typo fixes.
9019 2017-01-06 Bob Duff <duff@adacore.com>
9021 * snames.ads-tmpl: New names for pragma renaming.
9022 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
9023 * par-prag.adb: Add new pragma name to case statement.
9024 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
9026 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
9027 Dummy implementation of Pragma_Name_Mapped.
9029 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9031 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
9032 better detect call within an entry_wrapper.
9033 * sem_res.adb (Resolve_Call): A protected call within an
9034 entity_wrapper is analyzed in the context of the protected
9035 object but corresponds to a pre-analysis and is not an access
9037 * sem_attr.adb: Minor reformatting.
9039 2017-01-06 Justin Squirek <squirek@adacore.com>
9041 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
9042 Finalization_Size to allow a prefix of any non-class-wide type.
9043 * sem_attr.ads Modify comment for Finalization_Size to include
9044 definite type use case.
9046 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9048 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
9049 on procedures that are wrappers created for entries that have
9051 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
9052 body is an entry_wrapper, compile it in the context of the
9053 synchronized type, because a precondition may refer to funtions
9055 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
9057 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
9058 within an Entry_Wrapper this is an external call whose target
9059 is the synchronized object that is the actual in the call to
9062 2017-01-06 Yannick Moy <moy@adacore.com>
9064 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
9065 in tree, which means not analyzing the previous prefix if the node has
9066 been rewritten into its prefix.
9068 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9070 * s-tpobop.adb: Minor reformatting.
9072 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9074 * checks.adb (Ensure_Valid): Do not generate a validity check
9075 within a generated predicate function, validity checks will have
9076 been applied earlier when required.
9078 2017-01-06 Tristan Gingold <gingold@adacore.com>
9080 * s-tpoben.ads (Protection_Entries): Add comment and reorder
9081 components for performances.
9082 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
9085 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9087 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
9088 If expression is compile-time known and obeys a static predicate
9089 it must be labelled as static, to prevent spurious warnings and
9090 run-time errors, e.g. in case statements. This is relevant when
9091 the expression is the result of constant-folding a type conversion
9092 whose expression is a variable with a known static value.
9094 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9096 * exp_attr.adb, sem_attr.ads: Minor reformatting.
9098 2017-01-06 Justin Squirek <squirek@adacore.com>
9100 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
9101 expansion of Finalization_Size attribute.
9102 * sem_attr.adb (Analyze_Attribute): Add entry to check the
9103 semantics of Finalization_Size.
9104 (Eval_Attribute): Add null entry for Finalization_Size.
9105 * sem_attr.ads: Add Finalization_Size to the implementation
9106 dependent attribute list.
9107 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
9109 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9111 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
9112 iterator specification with a serious syntactic error, transform
9113 construct into an infinite loop in order to continue analysis
9114 and prevent a compiler abort.
9116 2017-01-06 Tristan Gingold <gingold@adacore.com>
9118 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
9119 max_queue_lengths_array if unused.
9121 2017-01-06 Bob Duff <duff@adacore.com>
9123 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
9124 array access, in case "\" is at the end of Text.
9125 * stylesw.adb (Set_Style_Check_Options): Don't include input
9126 characters in the error message template, because they could
9127 be control characters such as "\", which Errout will try to
9130 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9132 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
9133 For a private type examine the visible declarations that follow
9134 the partial view, not just the private declarations that follow
9137 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9139 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
9142 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9144 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
9145 alias of the inherited op is the parent iterator, no need to
9146 examine dispatch table positions which might not be established
9147 yet if type is not frozen.
9148 * sem_disp.adb (Check_Controlling_Formals): The formal of a
9149 predicate function may be a subtype of a tagged type.
9150 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
9151 of representation items for the completion of a type extension
9152 where a predicate applies to the partial view.
9153 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
9154 parameter that designates function whose actual receives a
9155 predicate check, to improve warning message when the check will
9156 lead to infinite recursion.
9157 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
9158 Apply_Predicate_Check.
9160 2017-01-06 Tristan Gingold <gingold@adacore.com>
9162 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
9163 Gnat_Extended_Ravenscar.
9164 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
9166 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9168 * sem_util.ads: Minor typo fix and reformatting.
9170 2017-01-06 Yannick Moy <moy@adacore.com>
9172 * ghost.adb Minor fixing of references to SPARK RM.
9173 (Check_Ghost_Context): Check whether reference is to a lvalue
9174 before issuing an error about violation of SPARK RM 6.9(13)
9175 when declaration has Ghost policy Check and reference has Ghost
9177 * sem_util.adb Minor indentation.
9178 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
9179 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
9180 * sem_util.ads (Unique_Defining_Entity): Document the result
9181 for package body stubs.
9183 2017-01-06 Tristan Gingold <gingold@adacore.com>
9185 * raise-gcc.c (abort): Macro to call Abort_Propagation.
9186 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
9188 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
9189 Do not generate the Entry_Max_Queue_Lengths_Array if all default
9191 * exp_util.adb (Corresponding_Runtime_Package): Consider
9192 Max_Queue_Length pragma.
9194 2017-01-06 Justin Squirek <squirek@adacore.com>
9196 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
9197 Remove declaration generation in the case of
9198 System_Tasking_Protected_Objects_Single_Entry being used,
9199 and add a warning message when this is detected to occur.
9200 (Make_Initialize_Protection): Remove reference pass in the case
9201 of System_Tasking_Protected_Objects_Single_Entry.
9202 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
9203 * s-tposen.adb (Initialize_Protection_Entry): Remove
9204 Entry_Queue_Max parameter.
9205 * s-tposen.ads: Remove the types use to store the entry queue
9207 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
9209 2017-01-06 Yannick Moy <moy@adacore.com>
9211 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
9212 behavior of function, to also accept out of range positions
9213 and raise Constraint_Error in such case, and to copy sloc from
9214 literal if No_Location passed as location.
9215 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
9216 of functions to raise Constraint_Error in case of value not in
9219 2017-01-06 Tristan Gingold <gingold@adacore.com>
9221 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
9222 Invalidate_Stack_Cache.
9224 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
9226 * s-os_lib.adb: Minor fix to the signature of Readlink.
9228 2017-01-06 Javier Miranda <miranda@adacore.com>
9230 * sem_ch6.adb (Conforming_Types): Handle another
9231 confusion between views in a nested instance with an actual
9232 private type whose full view is not in scope.
9234 2017-01-06 Arnaud Charlet <charlet@adacore.com>
9236 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
9237 mark a rewritten if statement as explicit (Comes_From_Source).
9239 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9241 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
9243 2017-01-06 Tristan Gingold <gingold@adacore.com>
9245 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
9247 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9249 * sem_case.adb: Minor reformatting.
9251 2017-01-06 Thomas Quinot <quinot@adacore.com>
9253 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
9255 2017-01-06 Justin Squirek <squirek@adacore.com>
9257 * aspects.adb: Register aspect in Canonical_Aspect.
9258 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
9259 into respective tables.
9260 * einfo.ads, einfo.adb: Add a new attribute for
9261 handling the parameters for Pragma_Max_Entry_Queue
9262 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
9263 for accessing and setting were added as well.
9264 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
9265 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
9266 declaration for pramga arguments and store them in the protected
9268 (Make_Initialize_Protection): Pass a reference to
9269 the Entry_Max_Queue_Lengths_Array in the protected type node to
9271 * rtsfind.adb: Minor grammar fix.
9272 * rtsfind.ads: Register new types taken from the
9273 runtime libraries RE_Protected_Entry_Queue_Max and
9274 RE_Protected_Entry_Queue_Max_Array
9275 * s-tposen.adb, s-tpoben.adb
9276 (Initialize_Protection_Entry/Initialize_Protection_Entries):
9277 Add extra parameter and add assignment to local object.
9278 * s-tposen.ads, s-tpoben.ads: Add new types to
9279 store entry queue maximums and a field to the entry object record.
9280 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
9281 for Aspect_Max_Queue_Length.
9282 (Check_Aspect_At_Freeze_Point):
9283 Add aspect to list of aspects that don't require delayed analysis.
9284 * sem_prag.adb (Analyze_Pragma): Add case statement for
9285 Pragma_Max_Queue_Length, check semantics, and register arugments
9286 in the respective entry nodes.
9287 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
9288 and Has_Max_Queue_Length
9289 * snames.ads-tmpl: Add constant for the new aspect-name
9290 Name_Max_Queue_Length and corrasponding pragma.
9292 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9294 * exp_util.adb (Is_Controlled_Function_Call):
9295 Reimplemented. Consider any node which has an entity as the
9296 function call may appear in various ways.
9298 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9300 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
9301 an unchecked type conversion when performing a view conversion
9302 to/from a private type. In all other cases use a regular type
9303 conversion to ensure that any relevant checks are properly
9306 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9308 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
9310 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9312 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
9313 error on case expression that is an entity, when coverage is
9314 incomplete and entity has a static value obtained by local
9316 (Handle_Static_Predicate): New procedure, subsidiary of
9317 Check_Choices, to handle case alternatives that are either
9318 subtype names or subtype indications involving subtypes that
9319 have static predicates.
9321 2017-01-06 Thomas Quinot <quinot@adacore.com>
9323 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
9324 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
9326 2017-01-06 Bob Duff <duff@adacore.com>
9328 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
9329 Elaborate_All(P) to P itself. That could happen in obscure cases,
9330 and always introduced a cycle (P body must be elaborated before
9332 * lib-writ.ads: Comment clarification.
9333 * ali-util.ads: Minor comment fix.
9334 * ali.adb: Minor reformatting.
9336 2017-01-06 Tristan Gingold <gingold@adacore.com>
9338 * a-exexpr-gcc.adb: Improve comment.
9340 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9342 * s-linux-mips.ads: Use correct signal and errno constants.
9343 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
9345 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9347 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
9348 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
9351 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
9353 * gnatvsn.ads: Bump copyright year.
9355 2017-01-01 Jakub Jelinek <jakub@redhat.com>
9357 * gnat_ugn.texi: Bump @copying's copyright year.
9358 * gnat_rm.texi: Likewise.
9360 Copyright (C) 2017 Free Software Foundation, Inc.
9362 Copying and distribution of this file, with or without modification,
9363 are permitted in any medium without royalty provided the copyright
9364 notice and this notice are preserved.