1 2017-09-13 Nicolas Roche <roche@adacore.com>
3 * Make-lang.in: In the fallback mechanim, parse the associated .ali
4 file and try to guess the locations of dependencies.
6 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
8 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
9 the suppression status of Alignment_Check on the current scope.
10 (Alignment_Checks_Suppressed): New function to use the saved instead of
11 the current suppression status of Alignment_Check.
12 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
13 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
14 the table, call Register_Address_Clause_Check.
15 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
16 recorded address clause instead of its entity.
18 2017-09-13 Jerome Guitton <guitton@adacore.com>
20 * libgnarl/s-tpopsp__vxworks-tls.adb,
21 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
22 (Self): Register thread if task id is null.
24 2017-09-13 Arnaud Charlet <charlet@adacore.com>
26 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
28 2017-09-13 Arnaud Charlet <charlet@adacore.com>
30 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
31 from an entity to only scope index, as a mapping from an entity to the
32 same entity was useless.
33 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
35 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
37 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
38 variable, just use return statements.
40 2017-09-13 Arnaud Charlet <charlet@adacore.com>
42 * libgnarl/s-vxwext__kernel-smp.adb,
43 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
46 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
48 * einfo.adb: Flag42 is now Is_Controlled_Active.
49 (Is_Controlled): This attribute is now synthesized.
50 (Is_Controlled_Active): This attribute is now an explicit flag rather
51 than a synthesized attribute. (Set_Is_Controlled): Removed.
52 (Set_Is_Controlled_Active): New routine.
53 (Write_Entity_Flags): Update the output for Flag42.
54 * einfo.ads: Update the documentation of the following attributes:
55 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
56 and Is_Controlled_Active have swapped their functionality.
57 (Is_Controlled): Renamed to Is_Controlled_Active.
58 (Is_Controlled_Active): Renamed to Is_Controlled.
59 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
60 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
62 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
63 (Needs_Finalization): Code clean up. Remove the tests for
64 Disable_Controlled because a) they were incorrect as they would reject
65 a type which is sublect to the aspect, but may contain controlled
66 components, and b) they are no longer necessary.
67 * exp_util.ads (Needs_Finalization): Update comment on documentation.
68 * freeze.adb (Freeze_Array_Type): Restore the original use of
70 (Freeze_Record_Type): Restore the original use of Is_Controlled.
71 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
73 (Array_Type_Declaration): Restore the original use of Is_Controlled.
74 (Build_Derived_Private_Type): Restore the original use of
76 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
77 type derived from Ada.Finalization.[Limited_]Controlled.
78 (Build_Derived_Type): Restore the original use of Is_Controlled.
79 (Record_Type_Definition): Restore the original use of Is_Controlled.
80 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
82 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
83 (Analyze_Aspect_Specifications): Use routine
84 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
86 2017-09-13 Vincent Celier <celier@adacore.com>
88 * clean.adb (Gnatclean): Fix error when looking for target
91 2017-09-13 Javier Miranda <miranda@adacore.com>
92 Ed Schonberg <schonberg@adacore.com>
94 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
95 expanded name that designates the current instance of a child unit in
96 its own body and appears as the prefix of a reference to an entity
97 local to the child unit.
99 2017-09-12 Bob Duff <duff@adacore.com>
101 * sem_warn.adb: Minor comment.
103 2017-09-12 Bob Duff <duff@adacore.com>
105 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
106 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
107 be Default_Initialized_Item, and apply pragma Unmodified to it,
108 to suppress the warning.
110 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
112 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
115 2017-09-12 Yannick Moy <moy@adacore.com>
117 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
118 together with Global when ignoring one in CodePeer mode.
120 2017-09-12 Javier Miranda <miranda@adacore.com>
122 * sem_ch3.adb (Analyze_Declarations): In nested
123 package declarations that have a private part enable missing check
124 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
125 resolved at the end of the immediately enclosing declaration list.
127 2017-09-12 Bob Duff <duff@adacore.com>
129 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
132 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
134 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
135 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
137 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
138 in preparation for the evolution of the SPARK language that
139 includes a pointer analysis for checking non-aliasing of access
140 types. The Check_Safe_Pointers function is the entry point, and
141 will traverse the AST and raise compile-time errors everytime
142 it detects non-begign aliasing. Detailed comments are present
143 in the sem_spark.ads file.
144 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
145 functions to iterate over the list of globals of a subprogram.
146 * libgnat/system.ads: Add restriction No_Finalization.
147 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
148 dependency on g-dynhta.adb.
150 2017-09-12 Bob Duff <duff@adacore.com>
152 * sem_ch6.adb (Analyze_Expression_Function): Call
153 Check_Dynamically_Tagged_Expression.
154 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
155 "and then Is_Tagged_Type (Typ)" because there is an earlier
156 "Assert (Is_Tagged_Type (Typ))".
158 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
160 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
162 2017-09-11 Arnaud Charlet <charlet@adacore.com>
164 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
165 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
166 for no longer supported platforms.
167 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
168 description of the semantics for dimensionality analysis.
169 * gnat_ugn.texi: Regenerated.
171 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
173 * freeze.adb (Has_Incomplete_Compoent): Delete.
175 Do not inhibit the freezing of the profile of an expression
177 (Freeze_Subprogram): Do not re-create extra formals.
178 * sem_ch6.adb (Analyze_Expression_Function): Always
179 pre-analyze the expression if the function is not a completion.
180 (Analyze_Subprogram_Body_Helper): For the body generated
181 from an expression function that is not a completion, do
182 not freeze the profile and temporary mask the types declared
183 outside the expression that are not yet frozen.
184 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
185 during the pre-analysis of an expression function.
187 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
189 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
192 2017-09-11 Yannick Moy <moy@adacore.com>
194 * lib-xref-spark_specific.adb: Minor rewrite.
196 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
198 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
199 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
200 renaming into account.
202 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
204 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
205 * gcc-interface/Makefile.in: Take this renaming into account.
207 2017-09-11 Arnaud Charlet <charlet@adacore.com>
209 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
212 2017-09-11 Yannick Moy <moy@adacore.com>
214 * sem_util.adb (Check_Result_And_Post_State):
215 Do not issue a warning about missing reference to an outcome if
216 the subprogram is ghost and has no outputs.
217 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
220 2017-09-11 Yannick Moy <moy@adacore.com>
222 * gnat1drv.adb (Adjust_Global_Switches): Set
223 Check_Validity_Of_Parameters to False in GNATprove mode.
224 * opt.ads (Check_Validity_Of_Parameters): Document switch to
227 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
229 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
230 generate debug info for inner record types if -fgnat-encodings=minimal.
231 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
232 type as the debug type.
234 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
236 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
237 packed record types if pragma Optimize_Alignment (Space) is enabled.
239 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
241 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
242 limits for expression functions.
243 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
245 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
247 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
248 layout of the record from the parent type only if both are or are not
250 (is_stored_discriminant): Return false for an unchecked union.
252 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
254 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
257 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
259 * gcc-interface/decl.c (promote_object_alignment): New function taken
261 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
262 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
263 create a padding type on success before doing the atomic check.
265 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
267 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
268 promotion to static memory earlier in the processing.
270 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
272 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
273 and TYPE_BY_REFERENCE_P flags on types after various promotions.
274 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
275 Consider all kinds of entities.
277 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
279 * gcc-interface/utils.c (convert): When converting to a padding type,
280 reuse an existing CONSTRUCTOR if it has got the right size.
282 2017-09-08 Nicolas Roche <roche@adacore.com>
284 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
286 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
287 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
288 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
289 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
290 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
291 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
292 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
293 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
294 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
295 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
296 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
297 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
298 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
299 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
300 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
301 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
302 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
303 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
304 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
305 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
306 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
307 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
308 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
309 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
310 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
311 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
312 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
313 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
314 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
315 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
316 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
317 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
318 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
319 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
320 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
321 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
322 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
323 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
324 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
325 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
326 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
327 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
328 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
329 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
330 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
331 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
332 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
333 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
334 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
335 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
336 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
337 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
338 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
339 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
340 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
341 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
342 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
343 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
344 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
345 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
346 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
347 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
348 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
349 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
350 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
351 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
352 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
353 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
354 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
355 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
356 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
357 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
358 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
359 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
360 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
361 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
362 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
363 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
364 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
365 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
366 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
367 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
368 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
369 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
370 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
371 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
372 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
373 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
374 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
375 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
376 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
377 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
378 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
379 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
380 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
381 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
382 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
383 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
384 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
385 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
386 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
387 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
388 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
389 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
390 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
391 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
392 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
393 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
394 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
395 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
396 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
397 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
398 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
399 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
400 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
401 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
402 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
403 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
404 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
405 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
406 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
407 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
408 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
409 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
410 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
411 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
412 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
413 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
414 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
415 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
416 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
417 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
418 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
419 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
420 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
421 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
422 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
423 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
424 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
425 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
426 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
427 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
428 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
429 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
430 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
431 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
432 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
433 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
434 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
435 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
436 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
437 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
438 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
439 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
440 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
441 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
442 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
443 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
444 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
445 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
446 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
447 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
448 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
449 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
450 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
451 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
452 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
453 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
454 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
455 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
456 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
457 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
458 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
459 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
460 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
461 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
462 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
463 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
464 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
465 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
466 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
467 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
468 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
469 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
470 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
471 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
472 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
473 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
474 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
475 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
476 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
477 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
478 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
479 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
480 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
481 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
482 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
483 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
484 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
485 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
486 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
487 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
488 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
489 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
490 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
491 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
492 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
493 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
494 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
495 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
496 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
497 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
498 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
499 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
500 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
501 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
502 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
503 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
504 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
505 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
506 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
507 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
508 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
509 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
510 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
511 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
512 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
513 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
514 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
515 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
516 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
517 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
518 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
519 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
520 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
521 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
522 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
523 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
524 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
525 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
526 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
527 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
528 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
529 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
530 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
531 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
532 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
533 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
534 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
535 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
536 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
537 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
538 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
539 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
540 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
541 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
542 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
543 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
544 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
545 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
546 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
547 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
548 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
549 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
550 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
551 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
552 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
553 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
554 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
555 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
556 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
557 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
558 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
559 to libgnat subdirectory.
561 2017-09-08 Yannick Moy <moy@adacore.com>
563 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
564 return the entity associated with the call.
565 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
566 Replace the internal Get_Function_Id with the new
567 Sem_Aux.Get_Called_Entity.
568 (Iterate_Call_Parameters): New
569 procedure to iterate on formals and actuals at the same time.
570 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
571 Set SPARK_Mode from spec when set, for analysis
572 of instance. Restore after analysis of instance.
573 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
574 set, for analysis of body instance. Restored automatically at
575 the end of the subprogram.
576 * gnat1drv.adb (Adjust_Global_Switches): Set
577 Check_Validity_Of_Parameters to False in GNATprove mode.
578 * opt.ads (Check_Validity_Of_Parameters): Document switch to
581 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
583 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
584 (New_Copy_Tree): ...there. Reset the hash tables only if they
585 were used in the previous invocation.
586 * s-htable.adb: Fix typo.
588 2017-09-08 Bob Duff <duff@adacore.com>
590 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
592 2017-09-08 Arnaud Charlet <charlet@adacore.com>
594 * sem_aggr.adb: minor style fix.
596 2017-09-08 Bob Duff <duff@adacore.com>
598 * sprint.adb (Write_Corresponding_Source): Ignore if there is
599 no current source file.
600 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
601 Print something helpful in case N is invalid.
602 * sprint.ads: Minor comment fix.
604 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
606 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
609 2017-09-08 Bob Duff <duff@adacore.com>
611 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
612 Ada_2020, along the same lines as the other Ada version pragmas.
614 2017-09-08 Gary Dismukes <dismukes@adacore.com>
616 * sem_ch12.adb: Minor typo fixes and reformatting.
618 2017-09-08 Yannick Moy <moy@adacore.com>
620 * sem_aggr.adb (Resolve_Record_Aggregate):
621 Rewrite bounds of aggregate subexpressions which may depend on
622 discriminants of the enclosing aggregate.
624 2017-09-08 Yannick Moy <moy@adacore.com>
626 * sem_ch5.adb: Prevent assertion failure on illegal code.
628 2017-09-08 Yannick Moy <moy@adacore.com>
630 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
631 calling Renamed_Entity on an entity which cannot be a renaming.
633 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
635 * exp_aggr.adb: Add with & use clause for Urealp.
636 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
637 elementary types instead of just discrete types.
638 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
639 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
640 Be prepared for the FP zero value in the memset case. Add small
643 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
645 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
648 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
650 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
651 of New_Copy because the latter leaves the syntactic structure of
652 the tree inconsistent (a child is accessible through two parents)
653 and prevents proper replication of itypes by subsequent calls
655 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
656 New_Copy because the latter leaves the syntactic structure of the
657 tree inconsistent (a child is accessible through two parents)
658 and prevents proper replication of itypes by subsequent calls
660 * sem_util.adb (In_Subtree): New routine.
661 (New_Copy_Tree): Reimplemented.
662 * sem_util.ads (In_Subtree): New routine.
663 (New_Copy_Tree): Reimplemented.
665 2017-09-08 Ed Schonberg <schonberg@adacore.com>
667 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
668 for aspect Default_Value is a static scalar value, but it does
669 not freeze the type. Yhis allows for subsequent representation
670 clauses for the type.
672 2017-09-08 Javier Miranda <miranda@adacore.com>
674 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
675 not add entries into the undefined reference table when we are
676 compiling with errors ignored.
678 2017-09-08 Ed Schonberg <schonberg@adacore.com>
680 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
681 check if the instance is within an enclosing instance body. The
682 formal package was legal in the enclosing generic, and is
683 legal in the enclosing instantiation. This optimisation may be
684 applicable elsewhere, and it also removes spurious errors that
685 may arise with on-the-fly processing of instantiations that
686 contain Inline_Always subprograms.
688 2017-09-08 Vincent Celier <celier@adacore.com>
690 * gnatcmd.adb: Disregard empty argument of GNAT driver.
692 2017-09-08 Justin Squirek <squirek@adacore.com>
694 * checks.adb (Insert_Valid_Check): Manually decorate
695 the generated temporary for range valdity checks.
697 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
699 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
701 2017-09-08 Justin Squirek <squirek@adacore.com>
703 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
704 case to handle underscore flags.
705 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
706 new procedure to handle underscores.
708 2017-09-08 Javier Miranda <miranda@adacore.com>
710 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
711 divisions with fixed point results to avoid generating twice
712 the runtime check on divide by zero.
713 * checks.adb (Apply_Divide_Checks): Ensure that operands are
714 not evaluated twice (once for their runtime checks and once for
715 their regular computation).
717 2017-09-08 Yannick Moy <moy@adacore.com>
719 * sem_prag.adb (Analyze_Part_Of): Add missing
720 return statements after issuing errors. Add detection of
721 out-of-order item and single concurrent type.
723 2017-09-08 Nicolas Roche <roche@adacore.com>
725 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
726 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
727 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
728 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
729 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
730 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
731 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
732 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
733 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
734 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
735 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
736 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
737 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
738 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
739 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
740 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
741 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
742 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
743 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
744 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
745 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
746 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
747 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
748 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
749 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
750 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
751 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
752 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
753 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
754 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
755 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
756 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
757 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
758 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
759 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
760 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
761 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
762 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
763 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
764 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
765 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
766 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
767 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
768 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
769 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
770 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
771 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
772 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
773 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
774 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
775 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
776 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
777 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
778 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
780 2017-09-08 Arnaud Charlet <charlet@adacore.com>
782 * doc/share/conf.py, doc/share/latex_elements.py,
783 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
786 2017-09-08 Arnaud Charlet <charlet@adacore.com>
788 * gnat_rm.texi, gnat_ugn.texi,
789 doc/gnat_ugn/the_gnat_compilation_model.rst,
790 doc/gnat_ugn/getting_started_with_gnat.rst,
791 doc/gnat_ugn/inline_assembler.rst,
792 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
793 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
794 doc/gnat_ugn/about_this_guide.rst,
795 doc/gnat_ugn/platform_specific_information.rst,
796 doc/gnat_ugn/example_of_binder_output.rst,
797 doc/gnat_ugn/gnat_and_program_execution.rst,
798 doc/gnat_ugn/gnat_utility_programs.rst,
799 doc/gnat_rm/implementation_of_specific_ada_features.rst,
800 doc/gnat_rm/interfacing_to_other_languages.rst,
801 doc/gnat_rm/implementation_defined_aspects.rst,
802 doc/gnat_rm/intrinsic_subprograms.rst,
803 doc/gnat_rm/implementation_defined_characteristics.rst,
804 doc/gnat_rm/implementation_advice.rst,
805 doc/gnat_rm/implementation_defined_attributes.rst,
806 doc/gnat_rm/compatibility_and_porting_guide.rst,
807 doc/gnat_rm/standard_library_routines.rst,
808 doc/gnat_rm/the_gnat_library.rst,
809 doc/gnat_rm/implementation_defined_pragmas.rst,
810 doc/gnat_rm/representation_clauses_and_pragmas.rst,
811 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
812 doc/gnat_rm/obsolescent_features.rst,
813 doc/gnat_rm/about_this_guide.rst,
814 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
815 doc/gnat_rm/implementation_of_ada_2012_features.rst,
817 doc/gnat_rm.rst: Update documentation.
819 2017-09-08 Arnaud Charlet <charlet@adacore.com>
821 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
822 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
823 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
825 2017-09-08 Bob Duff <duff@adacore.com>
827 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
828 New routine to read the Tag robustly.
829 * exp_attr.adb (Input): Change the expansion of 'Input,
830 in the class-wide case, to call String_Input_Tag instead of
833 2017-09-08 Arnaud Charlet <charlet@adacore.com>
835 * s-rident.ads (Restriction_Id): reorder enum
836 literals, so that Pure_Barriers is no longer in range of the
837 Cunit_Boolean_Restrictions subtype.
839 2017-09-08 Nicolas Roche <roche@adacore.com>
841 * a-taster.ads, a-taster.adb: Move to libgnarl
842 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
843 Add support for files in libgnarl.
845 2017-09-08 Ed Schonberg <schonberg@adacore.com>
847 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
848 accessibility check to an interface conversion, whose purpose
849 is to perform a pointer adjustment in a dispatching call.
850 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
851 when the actual is a construct that involves a dereference of an
852 expression that includes a formal of the enclosing subprogram,
853 In such cases, the accessibility level of the actual is that of
854 the corresponding formal, which is passed in as an additional
855 actual in the outer call.
857 2017-09-08 Bob Duff <duff@adacore.com>
859 * exp_intr.adb (Add_Source_Info): Do not decode
860 file names; they were not encoded in the first place.
862 2017-09-08 Bob Duff <duff@adacore.com>
864 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
865 exceptions instead of crashes. Check for absurdly long strings
866 and empty strings. Empty strings cause trouble because they can
867 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
868 be empty, which causes an array index out of bounds.
869 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
872 2017-09-08 Arnaud Charlet <charlet@adacore.com>
874 * sem_util.adb (Is_CCT_Instance): allow use in
875 the context of protected types.
877 2017-09-08 Arnaud Charlet <charlet@adacore.com>
879 * a-tigeli.adb: minor remove extra whitespace.
881 2017-09-08 Gary Dismukes <dismukes@adacore.com>
883 * par-ch4.adb: Reformatting of an error message.
885 2017-09-08 Javier Miranda <miranda@adacore.com>
887 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
888 identifiers to ensure their correct decoration of names on
891 2017-09-08 Yannick Moy <moy@adacore.com>
893 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
894 not skip a loop coming from source which is rewritten into a loop.
896 2017-09-08 Ed Schonberg <schonberg@adacore.com>
898 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
899 wrapper has convention Ada, to prevent spurious warnings on
900 unconstrained array parameters.
902 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
904 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
905 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
907 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
909 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
911 2017-09-08 Arnaud Charlet <charlet@adacore.com>
913 * exp_intr.adb (Append_Entity_Name): Move to ...
914 * sem_util.ads, sem_util.adb: ... here to share it.
915 (Subprogram_Name): New subprogram, to compute the name of the enclosing
917 * errutil.adb (Error_Msg): Fill new field Node.
918 * erroutc.ads (Subprogram_Name_Ptr): New.
919 (Error_Msg_Object): New field Node.
920 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
921 * errout.adb (Error_Msg): New variant with node id parameter.
922 Fill new parameter Node when emitting messages. Revert previous
923 changes for Include_Subprogram_In_Messages.
924 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
925 generating warning message.
927 2017-09-08 Ed Schonberg <schonberg@adacore.com>
929 * par-ch4.adb (P_Iterated_Component_Association): Place construct
930 under -gnat2020 flag, given that it is a future feature of
932 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
933 defining identifier as referenced to prevent spurious warnings:
934 corresponding loop is expanded into one or more loops whose
935 variable has the same name, and the expression uses those names
936 and not the original one.
938 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
940 * sem_elab.adb (Check_A_Call): Do not consider
941 references to internal variables for SPARK semantics.
943 2017-09-08 Arnaud Charlet <charlet@adacore.com>
945 * inline.adb (In_Package_Spec): refine type of
946 the parameter from Node_Id to Entity_Id.
948 2017-09-08 Justin Squirek <squirek@adacore.com>
950 * exp_ch5.adb (Expand_Formal_Container_Loop):
951 Reset the scope of the loop parameter after it is reanalyzed.
953 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
955 * sem_util.ads (Set_Rep_Info): New inline procedure.
956 * sem_util.adb (Set_Rep_Info): Implement it.
957 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
958 always copy the representation aspects onto the subtype.
960 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
962 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
963 Correction of the return type from access type to option type.
964 (Simple_HTable): Moving the Instance_Data to ads file.
966 2017-09-08 Yannick Moy <moy@adacore.com>
968 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
970 2017-09-08 Arnaud Charlet <charlet@adacore.com>
972 * opt.ads (Include_Subprogram_In_Messages): New variable.
973 * errout.ads (Current_Subprogram_Ptr): New variable.
974 * errout.adb (Error_Msg): Prepend current subprogram info
975 in messages if Include_Subprogram_In_Messages is set.
976 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
978 * gnat1drv.adb (Adjust_Global_Switches): Set
979 Include_Subprogram_In_Messages when -gnatdJ is set.
980 * debug.adb: Document and reserve -gnatdJ.
982 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
984 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
985 functions to iterate over simple hastables.
986 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
988 2017-09-08 Javier Miranda <miranda@adacore.com>
990 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
991 missing checks on the presence of Entity() before checking the
994 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
996 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
997 statements, use local variable and remove unnecessary processing.
999 2017-09-08 Javier Miranda <miranda@adacore.com>
1001 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
1003 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
1004 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
1006 (Unqual_BIP_Iface_Function_Call): New subprogram.
1007 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
1008 subprogram containing code that was previously inside
1009 Make_Build_In_Place_Call_In_Object_Declaration since it is also
1010 required for one of the new subprograms.
1012 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
1013 (Expand_N_Extended_Return_Statement): Extend the
1014 cases covered by an assertion on expected BIP object
1016 (Make_Build_In_Place_Call_In_Assignment):
1017 Removing unused code; found working on this ticket.
1018 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
1019 that replaces the internal name of the renaming declaration
1020 into the new subprogram Replace_Renaming_Declaration_Id.
1021 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
1022 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
1024 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
1026 (Unqual_BIP_Iface_Function_Call): New subprogram.
1027 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
1028 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
1029 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
1030 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1031 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
1032 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
1033 (Expand_N_Indexed_Component): Invoke the new subprogram
1034 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1035 (Expand_N_Selected_Component): Invoke the new subprogram
1036 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1037 (Expand_N_Slice): Invoke the new subprogram
1038 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1039 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
1040 Invoke the new subprogram
1041 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1043 2017-09-08 Javier Miranda <miranda@adacore.com>
1045 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
1046 access to interface types. Remove also the accessibility check.
1048 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1050 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
1051 all the types that are referenced by the expression.
1052 (Analyze_Expression_Function): Call Freeze_Expr_Types for
1053 a completion instead of manually freezing the type of the
1055 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
1057 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1059 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
1060 New procedure, auxiliary to Expand_Pragma_Check, to handle
1061 references to the discriminants of a protected type within a
1062 precondition of a protected operation. This is needed because
1063 the original precondition has been analyzed in the context of
1064 the protected declaration, but in the body of the operation
1065 references to the discriminants have been replaved by references
1066 to the discriminants of the target object, and these references
1067 are only created when expanding the protected body.
1069 2017-09-08 Yannick Moy <moy@adacore.com>
1071 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
1074 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1076 * exp_attr.adb (Build_Record_VS_Func): If the record is an
1077 unchecked union, do not emit checks for its (non-existent)
1078 discriminants, or for variant parts that depend on them.
1080 2017-09-08 Justin Squirek <squirek@adacore.com>
1082 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
1083 Find_Comparison_Type.Try_One_Interp): Add check for generic
1086 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1088 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
1089 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
1090 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
1091 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
1092 remaining references to AAMP_On_Target.
1094 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1096 * style.adb: Fix typo.
1098 2017-09-08 Javier Miranda <miranda@adacore.com>
1100 * einfo.adb (Underlying_Type): Add missing support for class-wide
1101 types that come from the limited view.
1102 * exp_attr.adb (Attribute_Address): Check class-wide type
1103 interfaces using the underlying type to handle limited-withed
1105 (Attribute_Tag): Check class-wide type interfaces using
1106 the underlying type to handle limited-withed types.
1108 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1110 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
1111 over a subtype of a type with a static predicate, taking into
1112 account the predicate function of the parent type and the bounds
1113 given in the loop specification.
1114 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
1115 a loop specification that is a subtype indication whose type mark
1116 is a type with a static predicate, inherit predicate function,
1117 used to build case statement for rewritten loop.
1119 2017-09-08 Justin Squirek <squirek@adacore.com>
1121 * lib-load.adb: Modify printing of error message to exclude file
1124 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1126 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
1127 don't inline subprograms declared in both visible and private
1129 (In_Package_Spec): previously In_Package_Visible_Spec; now
1130 detects subprograms declared both in visible and private parts
1133 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1135 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
1136 the type is an anonymous array in an object declaration, whose
1137 component type has an invariant, use the object declaration
1138 as the insertion point for the invariant procedure, given that
1139 there is no explicit type declaration for an anonymous array type.
1141 2017-09-08 Bob Duff <duff@adacore.com>
1143 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
1145 2017-09-08 Bob Duff <duff@adacore.com>
1147 * a-strfix.adb (Trim): Compute Low and High only if needed.
1149 2017-09-08 Justin Squirek <squirek@adacore.com>
1151 * lib-load.adb (Load_Main_Source): Add error output in the case a
1152 source file is missing.
1154 2017-09-08 Bob Duff <duff@adacore.com>
1157 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
1158 Default_WCEM by default (i.e. if the encoding is not specified
1159 by the Form string).
1161 2017-09-08 Bob Duff <duff@adacore.com>
1163 * s-trasym.ads (Hexa_Traceback): If
1164 Suppress_Hex is True, print "..." instead of a hexadecimal
1166 * s-trasym.adb: Ignore No_Hex in this version.
1169 2017-09-08 Bob Duff <duff@adacore.com>
1171 * debug.adb: Minor reformatting.
1173 2017-09-08 Bob Duff <duff@adacore.com>
1175 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
1176 code so it doesn't trigger an "uninit var" warning.
1178 2017-09-08 Nicolas Roche <roche@adacore.com>
1180 * s-hibaen.ads: Remove obsolete file.
1182 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1184 * a-locale.ads: Add comment explaining the state of this package.
1186 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1188 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
1190 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
1191 allow calls in the context of package spec (for pragma
1192 Initializes) and bodies (for pragma Refined_State).
1194 2017-09-08 Bob Duff <duff@adacore.com>
1196 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
1199 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1201 * debug.adb (dA): Adjust comment.
1202 * gnat1drv.adb (Gnat1drv): Likewise.
1203 * opt.ads (List_Representation_Info_Extended): New variable.
1204 * repinfo.adb (List_Record_Info): Split implementation into...
1205 (Compute_Max_Length): ...this. Recurse on records if requested.
1206 (List_Record_Layout): Likewise.
1207 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
1208 statement, accept '0' and set List_Representation_Info_Extended
1210 * usage.adb (Usage): Document new -gnatRe variant.
1212 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1214 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1215 Do not save the given entity in the global variable Default_Pool
1216 if the pragma appears within a generic unit.
1218 2017-09-08 Bob Duff <duff@adacore.com>
1220 * errout.adb (Delete_Warning): Do not
1221 decrement Warnings_Treated_As_Errors. This is called before
1222 Warnings_Treated_As_Errors has been incremented to account for
1223 this warning. Decrementing it here can lead to negative values
1224 of Warnings_Treated_As_Errors, raising Constraint_Error in
1225 checks-on builds, and causing the compiler to return an error
1226 code in checks-off builds.
1228 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1230 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
1231 entities of named concurrent types as Ref_Id and not of anonymous
1232 concurrent objects (because callers already know when a conversion
1233 is necessary and can easily do it); also, do not expect protected
1234 types or protected objects as Context_Id (because no flow-related
1235 SPARK pragmas are attached there); reflect these changes in a
1236 more precise comment.
1238 2017-09-08 Olivier Hainque <hainque@adacore.com>
1240 * g-altive.ads: Add documentation.
1242 2017-09-08 Bob Duff <duff@adacore.com>
1244 * sem_util.ads, debug.adb: Minor comment fix.
1245 * erroutc.ads: Comment fix.
1247 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1249 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
1250 for compatibility of component types of formal and actual in an
1251 instantiation of a child unit, when the component type of the
1252 formal is itself a formal of an enclosing generic.
1254 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1256 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
1257 sem_prag.adb to make it available for GNATprove; for concurrent
1258 types replace custom scope climbing with Scope_Same_Or_Within; for
1259 single concurrent objects add scope climbing (with Scope_Within),
1260 which was not there (that's the primary semantic change of this
1261 commit); also, when comparing a single concurrent object with
1262 its corresponding concurrent type rely on equality of types,
1263 not of objects (because that's simpler to code).
1264 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
1265 (Analyze_Global_Item): adjust special-casing of references to the
1266 current instance of a concurrent unit in the Global contracts
1267 of task types and single tasks objects; similar for references
1268 in the protected operations and entries of protected types and
1269 single protected objects (in all these cases the current instance
1270 behaves as an implicit parameter and must not be mentioned in
1271 the Global contract).
1273 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1275 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
1276 function calls returning a record within a subprogram call,
1279 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1281 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
1282 name that designates the current instance of a child unit in its
1283 own body and appears as the prefix of a reference to an entity
1284 local to the child unit.
1285 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
1288 2017-09-08 Yannick Moy <moy@adacore.com>
1290 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
1293 2017-09-08 Tristan Gingold <gingold@adacore.com>
1295 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
1296 warnings on internal units in configurable run time mode.
1298 2017-09-08 Bob Duff <duff@adacore.com>
1300 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
1301 representation items from interfaces that the derived type
1302 implements, not just from the parent type.
1303 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
1304 this to return an empty list when there are no interfaces.
1305 * einfo.ads, sem_ch13.adb: Minor comment fixes.
1306 * sem_attr.adb: Minor comment fix.
1308 2017-09-08 Doug Rupp <rupp@adacore.com>
1310 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
1313 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1315 * exp_ch4.adb (Expand_N_Allocator): Generate a
1316 call to Allocate_Any_Controlled when the allocation does not
1317 require any initialization.
1319 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1321 * sem_util.adb (Copy_Node_With_Replacement):
1322 Update the Renamed_Object field of a replicated object renaming
1325 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
1327 * exp_ch9.adb (Is_Pure_Barrier): Allow type
1328 conversions and components of objects. Simplified the detection
1329 of the Count attribute by identifying the corresponding run-time
1332 2017-09-08 Yannick Moy <moy@adacore.com>
1334 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
1335 sem_type.adb, sinfo.ads: Minor reformatting.
1337 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1339 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
1340 of Freeze_Profile, used to inhibit the freezing of the profile
1341 of an expression function declared within a nested package, when
1342 some type in the profile depends on a private type declared in
1343 an enclosing package.
1345 2017-09-08 Bob Duff <duff@adacore.com>
1347 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
1348 the subunit case. It's still OK to set it in the "missing subunits"
1349 case, because that won't cause the obsolete .ali files that cause
1352 2017-09-08 Bob Duff <duff@adacore.com>
1354 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
1355 unclear why this didn't cause a warning.
1356 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
1357 pragmas. It's unclear why this didn't cause an error.
1359 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1361 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
1363 (Expand_SPARK_Potential_Renaming): Code clean up.
1364 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
1365 the item does not have a proper entity.
1366 (Analyze_Input_Item): Add a guard in case the item does not have a
1368 (Collect_States_And_Objects): Include object renamings in the
1369 items being collected.
1370 (Resolve_State): Update the documentation of this routine.
1371 * sem_util.adb (Entity_Of): Add circuitry to handle
1372 renamings of function results.
1373 (Remove_Entity): New routine.
1374 (Remove_Overloaded_Entity): Take advantage of factorization.
1375 * sem_util.ads (Entity_Of): Update the documentation
1377 (Remove_Entity): New routine.
1378 (Remove_Overloaded_Entity): Update the documentation of this
1381 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1383 * repinfo.adb (List_Record_Info): During first loop,
1384 do not override the normalized position and first bit
1385 if they have already been set. Move fallback code
1386 for the packed case to the case where it belongs.
1387 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
1388 Also adjust the normalized position of components.
1389 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
1391 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1393 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
1394 the placement of a primitive operation O that renames an operation
1395 R declared in an inner package, and which is thus not a primitive
1396 of the dispatching type of O. In this case O is a new primitive
1397 and does not inherit its dispatch table position from R (which
1400 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1402 * sem_dim.adb (Analyze_Dimension_If_Expression,
1403 Analyze_Dimension_Case_Expression): new subprograms to verify
1404 the dimensional correctness of Ada2012 conditional expressions,
1405 and set properly the dimensions of the construct.
1406 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
1407 call Analyze_Dimension.
1409 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1411 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
1412 loop on an interface declared as a private extension of another
1413 synchronized interface.
1415 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1417 * sem_ch12.adb (Check_Generic_Parent): New procedure within
1418 Analyze_Associations, to handle actual packages that depend on
1419 previous instances. If a package IAP that is an instantiation is
1420 used as an actual in a subsequent instantiation SI in the same
1421 scope, and IAP has a body, IAP must be frozen before SI. If
1422 the generic parent of IAP is itself declared in a previous
1423 instantiation in the same scope, that instantiation must also
1424 be frozen before SI.
1425 (Install_Body): Prevent double insertion of freeze node for
1428 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1430 * sem_prag.adb (Resolve_State): Update the
1431 comment on documentation. Generate a reference to the state once
1432 resolution takes place.
1434 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1436 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1437 Linker_Section): If the aspect applies to an object declaration
1438 with explicit initialization, do not delay the freezing of the
1439 object, to prevent access-before-elaboration in the generated
1440 initialization code.
1442 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1444 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
1445 (Integer_Value (Item)) when the size of the fixed decimal type
1446 is larger than Integer.
1448 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1451 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
1452 in order of increasing position in more cases.
1454 2017-09-07 Yannick Moy <moy@adacore.com>
1456 * a-exetim-mingw.ads: Add contract Global=>null
1457 on all operations that are modeled as having no read or write
1458 of global variables in SPARK.
1460 2017-09-07 Raphael Amiard <amiard@adacore.com>
1462 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
1463 to Hmaps.Generic_Ops.
1464 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
1466 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
1468 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
1469 position in cursors.
1471 2017-09-07 Javier Miranda <miranda@adacore.com>
1473 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
1474 allow disabling the generation of implicit pragma Elaborate_All
1477 2017-09-07 Javier Miranda <miranda@adacore.com>
1479 * exp_disp.adb (Make_Tags): Avoid suffix counter
1480 in the external name of the elaboration flag. Required to fix
1481 the regressions introduced by the initial version of this patch.
1483 2017-09-07 Bob Duff <duff@adacore.com>
1485 * sem_ch6.adb (Analyze_Function_Return): Do not
1486 insert an explicit conversion to force the displacement of the
1487 "this" pointer to reference the secondary dispatch table in the
1488 case where the return statement is returning a raise expression,
1489 as in "return raise ...".
1491 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1493 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
1494 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
1495 procedure from sem_disp.adb.
1496 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
1498 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
1499 return the instantiation node for subprograms. Update references
1500 to Get_Unit_Instantiation_Node.
1501 * sem_ch7.adb (Install_Parent_Private_Declarations): update
1502 reference to Get_Unit_Instantiation_Node.
1503 * exp_dist.adb (Build_Package_Stubs): update reference to
1504 Get_Unit_Instantiation_Node.
1505 * sem_ch9.adb: minor typo in comment.
1506 * lib-xref-spark_specific.adb
1507 (Traverse_Declaration_Or_Statement): traverse into task type
1510 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1512 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
1513 to handle properly various cases of type conversions where the
1514 target type and/or the expression carry dimension information.
1515 (Dimension_System_Root); If a subtype carries dimension
1516 information, obtain the source parent type that carries the
1519 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
1521 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
1523 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1525 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
1526 If the prefix is a reference to an object, rewrite it as an
1527 explicit dereference, as required by 3.7.2 (2) and as is done
1528 with most other attributes whose prefix is an access value.
1530 2017-09-07 Bob Duff <duff@adacore.com>
1532 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
1533 Refined_Depends aspect.
1534 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
1535 Refined_Depends pragma.
1536 * scans.ads: Fix documentation of Inside_Depends flag.
1537 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
1539 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
1541 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
1542 Account for the case where the are no lists to insert, but the
1543 secondary stack still requires management.
1544 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
1545 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
1546 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
1547 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
1550 2017-09-07 Vincent Celier <celier@adacore.com>
1552 * clean.adb: Do not get the target parameters before calling
1555 2017-09-07 Nicolas Roche <roche@adacore.com>
1557 * s-osinte-solaris-posix.ads: Removed.
1559 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1561 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
1562 single concurrent objects.
1564 2017-09-07 Javier Miranda <miranda@adacore.com>
1566 * s-regexp.ads: Fix documentation of the globbing grammar.
1568 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1570 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
1572 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1574 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
1575 in CodePeer mode, to support more legacy code automatically.
1577 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1579 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
1580 and thus not a controlling argument, preserve its type after
1581 rewriting because it may appear in an nested call with a classwide
1584 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1586 * comperr.adb (Delete_SCIL_Files): Handle case of
1587 N_Package_Instantiation.
1589 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1591 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
1592 clause for a unit U appears in a context that includes a regular
1593 with_clause on U, rewrite the redundant private clause into a null
1594 statement, rather than removing it altogether from the context,
1595 so that ASIS tools can reconstruct the original source.
1597 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1599 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
1600 for aspect Small can be of any real type (not only a universal
1601 real literal) as long as it is a static constant.
1603 2017-09-07 Thomas Quinot <quinot@adacore.com>
1605 * par_sco.adb: Minor reformatting.
1607 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1609 * s-parame-ae653.ads: Removed.
1611 2017-09-07 Nicolas Roche <roche@adacore.com>
1613 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
1614 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
1615 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
1616 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
1617 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
1618 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
1620 2017-09-07 Yannick Moy <moy@adacore.com>
1622 * a-ngelfu.ads Add preconditions to all functions
1623 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
1625 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1627 * lib-xref.adb (Generate_Reference): ignore
1628 references to entities which are Part_Of single concurrent
1631 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1633 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
1636 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1638 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
1639 Null_Task_Id is passed.
1641 2017-09-07 Javier Miranda <miranda@adacore.com>
1643 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
1644 attribute. Defined for record types and subtypes.
1645 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
1646 (Init_Tags_List) to facilitate generating separate code in the
1647 IP routine to initialize the object components and for completing
1648 the elaboration of dispatch tables.
1649 * exp_ch3.adb (Build_Init_Procedure): Improve the code
1650 generated in the IP routines by means of keeping separate
1651 the initialization of the object components from the
1652 initialization of its dispatch tables. (Init_Secondary_Tags):
1653 Adding new formal (Init_Tags_List) and adjusting calls to
1654 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
1655 adjusting also calls to Ada.Tags.Register_Interface_Offset
1656 because the type of one of its formals has been changed.
1657 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
1658 modified. Instead of receiving a pointer to an object this
1659 routine receives now a primary tag.
1660 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
1661 additional formal: the tag of the primary dispatch table.
1662 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
1663 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
1664 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
1665 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
1666 formal in calls to Init_Secondary_Tags.
1668 2017-09-07 Javier Miranda <miranda@adacore.com>
1670 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
1672 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
1673 applied to generic subprograms.
1675 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1677 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
1678 (because it refers to the anonymous concurrent object, not its type);
1679 fix condition for emitting error message about task/protected type,
1681 2017-09-07 Bob Duff <duff@adacore.com>
1683 * binde.adb (Debug_Flag_Old): If both -do and -dp
1684 are specified, behave as if just -do was specified, rather than
1687 2017-09-07 Nicolas Roche <roche@adacore.com>
1689 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
1690 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
1692 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1694 * sem_prag.adb (Find_Role): The Global_Seen flag
1695 is now consulted not only for abstract states and variables,
1696 but for all kinds of items.
1697 (Collect_Subprogram_Inputs_Outputs): Do not process formal
1698 generic parameters, because unlike ordinary formal parameters,
1699 generic formals only act as input/ outputs if they are explicitly
1700 mentioned in a Global contract.
1702 2017-09-07 Yannick Moy <moy@adacore.com>
1704 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
1705 predicate procedure. Check predicate pragma/aspect with Ghost entity.
1706 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
1709 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1711 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
1713 * sem_ch3.adb (Build_Derived_Record_Type):i Call
1714 Copy_Dimensions_Of_Components after creating the copy of the
1716 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
1717 derived recor type, copy the dikensions if any of each component
1718 of the parent record to the corresponding component declarations
1719 of the derived record. These expressions are used among other
1720 things as default values in aggregates with box associations.
1721 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
1722 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
1725 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1727 * sem_util.adb: Remove extra space after THEN.
1729 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1731 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
1732 also mark the renamed subprogram as referenced.
1734 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1736 * par-ch6.adb (P_Subprogram): Improve error message on null
1737 procedure with misplaced aspect specification, which the parser
1738 first attempts to interpret as a malformed expression function.
1740 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1742 * sem_attr.adb (Analyze_Attribute_Old_Result):
1743 Allow attributes Result and Old in the case of an expression
1746 2017-09-07 Justin Squirek <squirek@adacore.com>
1748 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
1749 Volatile to subcomponents.
1751 2017-09-07 Bob Duff <duff@adacore.com>
1753 * exp_ch7.adb (Find_Last_Init): Check for the
1754 case where a build-in-place function call has been replaced by a
1755 'Reference attribute reference.
1757 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1759 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
1762 2017-09-07 Bob Duff <duff@adacore.com>
1764 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
1765 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
1766 secondary stack for all functions that return limited tagged
1767 types -- just do it for dispatching calls. Misc cleanup.
1768 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
1769 remove qualifications and type conversions. Fix various bugs
1770 where only a single level of qualification or conversion was
1771 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
1773 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
1776 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1778 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
1779 do not create actual subtypes that may generate further predicate
1781 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
1782 of body is a predicate function as well.
1783 (Resolve_Aspect_Expressions, Resolve_Name): For a component
1784 association, only the expression needs resolution, not the name.
1785 (Resolve_Aspect_Expressions, case Predicates): Construct and
1786 analyze the predicate function declaration in the scope of the
1787 type, before making the type and its discriminants visible.
1789 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1791 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
1792 only if the record type itself comes from source.
1794 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1796 * sem_ch5.adb: Minor reformatting and a typo fix
1798 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1800 * sinput-l.ads: minor remove extra period at the end of comment
1802 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1804 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
1806 (Find_Role): remove support for E_Discriminant.
1808 2017-09-06 Javier Miranda <miranda@adacore.com>
1810 * exp_ch6.adb (Expand_Simple_Function_Return):
1811 Add missing implicit type conversion to force displacement of the
1814 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1816 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
1818 2017-09-06 Yannick Moy <moy@adacore.com>
1820 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
1821 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
1823 2017-09-06 Bob Duff <duff@adacore.com>
1825 * sem_ch8.adb: Change Assert to be consistent with
1828 2017-09-06 Bob Duff <duff@adacore.com>
1830 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
1831 requested. Previously, the -do switch meant "run Elab_New and
1832 Elab_Old and use the order chosen by Elab_Old, possibly with
1833 debugging printouts comparing the two orders." Now it means
1834 "do not run Elab_New." This is of use if there are bugs that
1835 cause Elab_New to crash.
1836 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
1838 * ali.ads (Elab_Position): Change type to Nat, to avoid various
1841 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1843 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
1844 reference to SPARK RM.
1846 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1848 * layout.adb: Use SSU short hand consistently throughout the file.
1850 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1852 * freeze.adb (Freeze_Record_Type)
1853 <Sized_Component_Total_Round_RM_Size>: New local variable to
1854 accumulate the rounded RM_Size of components. Update it for
1855 every component whose RM_Size is statically known. Add missing
1856 guard to check that bit packing is really required before issuing
1857 the error about packing. Swap condition for clarity's sake.
1858 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
1860 2017-09-06 Fedor Rybin <frybin@adacore.com>
1862 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
1863 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
1864 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
1865 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
1866 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
1867 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
1868 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
1869 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
1870 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
1871 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
1872 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
1873 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
1874 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
1875 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
1876 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
1877 project manager sources.
1879 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1881 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
1882 entity of a mutable type and the right-hand side is a conditional
1883 expression, resolve the alternatives of the conditional using
1884 the base type of the target entity, because the alternatives
1885 may have distinct subtypes. This is particularly relevant if
1886 the alternatives are aggregates.
1888 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1890 * checks.adb (Apply_Predicate_Check): If the expression is an
1891 aggregate that is the RHS of an assignment, apply the check to
1892 the LHS after the assignment, rather than to the aggregate. This
1893 is more efficient than creating a temporary for the aggregate,
1894 and prevents back-end crashes when the aggregate includes a
1895 dynamic "others' association.
1897 2017-09-06 Yannick Moy <moy@adacore.com>
1899 * sem_ch12.adb (Analyze_Instance_And_Renamings):
1900 Set variable to ignore SPARK_Mode in instance before the analysis
1901 of the generated package declaration.
1903 2017-09-06 Yannick Moy <moy@adacore.com>
1905 * sem_res.adb (Resolve_Call): Do not issue a
1906 message for calls inside expression function, unless body was
1907 seen and is candidate for inlining.
1909 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1911 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
1912 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
1913 body. do not freeze the formals of the generic unit.
1915 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1917 * errout.adb (Error_Msg): Separate the
1918 treatment for warning vs. style messages in inlinings and
1919 instantiations. Prevents blowups on calls to Warn_Insertion for
1920 style messages, which should not be called in that case because
1921 Warning_Msg_Char is not set.
1923 2017-09-06 Justin Squirek <squirek@adacore.com>
1925 * sem_prag.adb (Check_VFA_Conflicts): Created
1926 to group all Volatile_Full_Access checks relating to other
1927 representation pragmas (Mark_Component_Or_Object): Created
1928 to centeralize the flagging of attributes for the record type
1929 component case, a pragma applied individually to a component, and
1931 (Process_Atomic_Independent_Shared_Volatile):
1932 Add propagation of certain pragmas to record components and move
1933 evaluation of VFA checks
1935 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1937 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
1938 Do not warn on conditions that are not obeyed for Inline_Always
1939 subprograms, when assertions are not enabled.
1941 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1943 * sem_util.adb (Unique_Entity): For abstract states return their
1946 2017-09-06 Bob Duff <duff@adacore.com>
1948 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
1949 that is a proper body corresponding to a stub, we defer the
1950 adjustment of the sloc until after the correct adjustment has
1951 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
1952 the adjustment, because it will be outside the range in (the old,
1953 incorrect) S_Adjustment.
1954 * inline.adb: Use named notation for readability and uniformity.
1955 * sinput-l.adb: Minor improvements to debugging output printed
1957 * sinput-l.ads (Create_Instantiation_Source): Minor comment
1960 2017-09-06 Vincent Celier <celier@adacore.com>
1962 * make.adb: Do not invoke gprbuild for -bargs -P.
1964 2017-09-06 Sylvain Dailler <dailler@adacore.com>
1966 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
1967 case when Op is of kind N_Qualified_Expression. In this case,
1968 the function is called recursively on the subexpression like in
1970 * make.adb: Minor reformatting
1972 2017-09-06 Justin Squirek <squirek@adacore.com>
1974 * einfo.adb (Set_Linker_Section_Pragma): Modify
1975 Set_Linker_Section_Pragma to be consistant with the "getter"
1976 Linker_Section_Pragma.
1977 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
1978 checking for container loops so that the index cursor is not
1979 directly changable by the user with the use of E_Loop_Parameter.
1980 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
1981 * sem_warn.adb (Check_References): Revert previous change.
1983 2017-09-06 Bob Duff <duff@adacore.com>
1985 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
1988 2017-09-06 Yannick Moy <moy@adacore.com>
1990 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
1991 declarations to only consider valid uses of Global/Depends those on
1992 single concurrent objects.
1994 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1996 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
1997 error as soon as one of the specified components overlaps the
2000 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2002 * sem_prag.ads: minor fix typo in comment.
2004 2017-09-06 Justin Squirek <squirek@adacore.com>
2006 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
2007 from source before checking source references.
2008 * sem_warn.adb (Check_References): Add check for internal block
2011 2017-09-06 Vincent Celier <celier@adacore.com>
2013 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
2014 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
2015 gnatname.adb: Remove the Project Manager from the GNAT tools.
2016 * gcc-interface/Makefile.in: ditto.
2018 2017-09-06 Bob Duff <duff@adacore.com>
2020 * sem_util.ads: Minor comment fix.
2022 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2024 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
2025 Generate a freeze node for the actual of a formal package, if
2026 the actual is declared in the same unit and has a corresponding
2027 body, to prevent the current instance from being frozen before
2030 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2032 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
2034 2017-09-06 Yannick Moy <moy@adacore.com>
2036 * sem_warn.adb: Minor refactoring.
2038 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2040 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
2041 to retrieve the inherited classwide precondition/postcondition
2043 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
2044 freezing a subprogram, to complete the generation of the
2045 corresponding checking code.
2047 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2049 * exp_util.adb (Is_Controlled_Indexing): New routine.
2050 (Is_Displace_Call): Use routine Strip to remove indirections.
2051 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
2052 missing case of controlled generalized indexing.
2053 (Is_Source_Object): Use routine Strip to remove indirections.
2054 (Strip): New routine.
2056 2017-09-06 Bob Duff <duff@adacore.com>
2058 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
2059 we include the proper header. Otherwise, we just declare the necessary
2060 things from the capabilities library. This is so we can build on
2061 machines without that library, while still enabling that library.
2062 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
2063 simply return 0 if the library is not present, or not included
2066 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
2068 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
2069 for renamings that involve function calls in prefix form.
2071 2017-09-06 Bob Duff <duff@adacore.com>
2073 * sem_ch3.adb (Analyze_Subtype_Declaration):
2074 Set Has_Delayed_Freeze on a subtype of an incomplete type.
2076 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
2078 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
2079 has no parameter specification and no entry index, use the entry name
2080 as the end of the generated SCO statement.
2082 2017-09-06 Steve Baird <baird@adacore.com>
2084 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
2085 uses of 'Image and related attributes as having side effects in
2086 order to avoid replicating such uses.
2087 * pprint.ads (Expression_Image) Add new generic formal flag
2088 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
2089 (eventually) override the default.
2090 * pprint.adb (Expression_Image) If the new flag is set, then
2091 suppress the ".all" suffix when displaying a dereference whose
2092 prefix is a use of a value-capturing compiler temp of the sort
2093 generated by Expr_Util.Remove_Side_Effects .
2094 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
2095 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
2097 * inline.adb: Minor wording change.
2099 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2101 * sem_ch7.adb: Update comment.
2103 2017-09-06 Yannick Moy <moy@adacore.com>
2105 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
2106 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
2107 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
2108 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
2109 so that applies to any entity.
2111 2017-09-06 Yannick Moy <moy@adacore.com>
2113 * sem_ch3.adb (Derived_Type_Declaration): Use
2114 Incomplete_Or_Partial_View rather than local Find_Partial_View.
2116 2017-09-06 Javier Miranda <miranda@adacore.com>
2118 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
2121 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2123 * sem_dim.adb (Analyze_Dimension): In an instance, a type
2124 conversion takes its dimensions from the expression, not from
2126 (Dimensions_Of_Operand): Ditto.
2128 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2130 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
2131 null procedures when GNAT coverage is used, so that their (empty)
2132 bodies are properly covered.
2134 2017-09-06 Bob Duff <duff@adacore.com>
2136 * sem_ch13.adb (Resolve_Aspect_Expressions): If
2137 the entity is a type with discriminants, make the discriminants
2138 directly visible in aspect clauses.
2140 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2142 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
2143 Universal_Real and the context is a floating-point type, resolve
2144 both operands to the target type.
2146 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2148 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
2149 sem_ch3.adb, sem_util.adb: Minor reformatting.
2151 2017-09-06 Yannick Moy <moy@adacore.com>
2153 * freeze.adb (Check_Inherited_Conditions): Rewriting
2154 of inherited preconditions and postconditions should only occur
2155 in GNATprove mode, that is, when GNATprove_Mode is True, not to
2156 be confused with SPARK_Mode being On.
2158 2017-09-06 Yannick Moy <moy@adacore.com>
2160 * sem_warn.adb (Check_References): Take into
2161 account possibility of attribute reference as original node.
2163 2017-09-06 Yannick Moy <moy@adacore.com>
2165 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
2168 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2170 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
2171 on the procedure created to encapsulate the body.
2172 * sem_ch7.adb: Add with clause for GNAT.HTable.
2173 (Entity_Table_Size): New constant.
2174 (Entity_Hash): New function.
2175 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
2176 (Is_Subprogram_Ref): Rename into...
2177 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
2178 the table instead of bailing out on them. Scan the value of constants
2179 if it is not known at compile time.
2180 (Contains_Subprograms_Refs): Rename into...
2181 (Scan_Subprogram_Refs): ...this.
2182 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
2183 Is_Public flag on subprograms if they are not actually referenced.
2184 (Hide_Public_Entities): Beef up comment on the algorithm.
2185 Reset the table of subprograms on entry.
2187 2017-09-06 Yannick Moy <moy@adacore.com>
2189 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
2191 2017-09-06 Javier Miranda <miranda@adacore.com>
2193 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
2194 cannot handle a type conversion of an array as an aggregate
2197 2017-09-06 Bob Duff <duff@adacore.com>
2199 * g-comlin.adb (Try_Help): Remove ".exe" so we
2200 get the same results on windows and unix.
2202 2017-09-06 Justin Squirek <squirek@adacore.com>
2204 * exp_imgv.adb (Expand_Image_Attribute),
2205 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
2206 Added case to handle new-style 'Image expansion
2207 (Rewrite_Object_Image): Moved from exp_attr.adb
2208 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2209 attribute cases so that the relevant subprograms in exp_imgv.adb
2210 handle all expansion.
2211 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
2212 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
2213 cases to call common function Analyze_Image_Attribute.
2214 (Analyze_Image_Attribute): Created as a common path for all
2215 image attributes (Check_Object_Reference_Image): Removed
2216 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2217 Removed and refactored into Is_Object_Image (Is_Object_Image):
2218 Created as a replacement for Is_Image_Applied_To_Object
2220 2017-09-06 Yannick Moy <moy@adacore.com>
2222 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
2223 message for missing input.
2225 2017-09-06 Yannick Moy <moy@adacore.com>
2227 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
2228 of protected subprograms and entries.
2229 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
2230 New function to detect when a subprogram of entry is defined
2231 inside a protected object.
2233 2017-09-06 Bob Duff <duff@adacore.com>
2235 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
2236 whether the current process has the CAP_SYS_NICE capability.
2237 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
2238 ceiling priorities if the current process has the CAP_SYS_NICE
2241 2017-09-06 Bob Duff <duff@adacore.com>
2243 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
2244 check back to the body, because SPARK is not yet ready for
2245 "or else raise Constraint_Error".
2247 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2249 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
2250 procedure by a single null statement, after evaluating the
2251 actuals that require it.
2253 2017-09-06 Javier Miranda <miranda@adacore.com>
2255 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
2256 Generating C code improve the code that checks the use of nested
2257 aggregates to initialize object declarations.
2259 2017-09-06 Yannick Moy <moy@adacore.com>
2261 * sem_ch3.adb (Derived_Type_Declaration): Detect
2262 violations of new rule SPARK RM 3.4(1). Also refactor existing
2263 check to use the new function Find_Partial_View.
2265 2017-09-06 Vincent Celier <celier@adacore.com>
2267 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
2268 from the Prj hierarchy has been removed from the GNAT driver.
2270 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2272 * sem_type.adb (Interface_Present_In_Ancestor): Within an
2273 expression function, or within a spec expression (default value,
2274 etc) a reference to an incomplete type is legal: legality of
2275 the operation will be checked when some related entity (type,
2276 object or subprogram) is frozen.
2278 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2280 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
2281 adjustments and a typo fix.
2283 2017-09-06 Yannick Moy <moy@adacore.com>
2285 * sem_res.adb (Resolve_Call): Do not issue info
2286 message about inlining of calls to functions in assertions,
2287 for functions whose body has not been seen yet.
2289 2017-09-06 Bob Duff <duff@adacore.com>
2291 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
2292 we can use modern Ada in this package.
2293 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
2294 Move Ada.Command_Line.Response_File to System.Response_File,
2295 and make Ada.Command_Line.Response_File into a rename of
2296 System.Response_File. This is to avoid having gnatbind depend
2297 Ada.Command_Line, which would damage the bootstrap process now
2298 that Ada.Command_Line contains modern Ada (the raise expression).
2299 * gnatbind.adb: Avoid dependence on
2300 Ada.Command_Line. Depend on System.Response_File instead
2301 of Ada.Command_Line.Response_File. Change one call to
2302 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
2303 to Ada.Command_Line.Argument_Count to use Arg_Count.
2304 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
2306 2017-09-06 Bob Duff <duff@adacore.com>
2308 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
2309 switch, because we've already read gnat.adc by default.
2311 2017-09-06 Bob Duff <duff@adacore.com>
2313 * exp_ch5.adb (Get_Default_Iterator): Replace
2314 "Assert(False)" with "return Iter", because if an iterable
2315 type is derived from a noniterable one, then we won't find an
2316 overriding or inherited default iterator.
2318 2017-09-06 Yannick Moy <moy@adacore.com>
2320 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
2321 literal index used to access a string is null or negative.
2323 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2325 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
2326 allowed on loop parameters.
2327 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
2329 (Write_Field15_Name): Update the output for
2330 Status_Flag_Or_Transient_Decl.
2331 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
2332 to loop parameters. Update the documentation of the attribute
2333 and the E_Loop_Parameter entity.
2334 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
2335 which assumes that cursors can never be controlled.
2336 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
2337 guard which assumes that cursors can never be controlled.
2339 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2341 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
2342 sem_warn.adb: Minor reformatting.
2344 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2346 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
2347 fix and preserve older GNAT warning on overlapping actuals that
2348 are not elementary types.
2350 2017-09-06 Justin Squirek <squirek@adacore.com>
2352 * sem_attr.adb: Comment correction.
2354 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2356 * sem_util.adb: Minor reformatting.
2358 2017-09-06 Yannick Moy <moy@adacore.com>
2360 * a-comlin.ads (Argument): Add precondition for analysis.
2362 2017-09-06 Yannick Moy <moy@adacore.com>
2364 * sem_res.adb (Resolve): Update message for function call as statement.
2366 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2368 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
2369 generated bodies for renamings that are completions, when renamed
2370 procedure is No_Return.
2371 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
2372 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
2373 with No_Return, the renamed entity must be No_Return as well.
2375 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2377 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
2380 2017-09-06 Justin Squirek <squirek@adacore.com>
2382 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2383 attribute cases (Rewrite_Object_Reference_Image): Created to
2384 aid the rewriting of new-style 'Image attributes.
2385 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
2386 (Check_Object_Reference_Image): Created to handle verification of
2387 'Image with object-references as prefixes.
2388 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2389 Create predicate to identify cases where an 'Image attribute's
2390 prefix applies to an object reference.
2392 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2394 * freeze.adb (Freeze_Entity): Do not generate a freeze
2395 node for a generic unit, even if it includes delayed aspect
2396 specifications. Freeze nodes for generic entities must never
2397 appear in the tree that reaches the back-end of the compiler.
2399 2017-09-06 Yannick Moy <moy@adacore.com>
2401 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
2403 2017-09-06 Yannick Moy <moy@adacore.com>
2405 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
2406 to subprograms in other units as possibly inlined.
2408 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2410 * freeze.adb (Freeze_Entity): For a derived type that has no
2411 explicit delayed aspects but may inherit delayed aspects from its
2412 parent type, analyze aspect at freeze point for proper capture
2413 of an inherited aspect.
2415 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2417 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
2418 renamings; also, avoid repeated calls to Renamed_Object when getting
2419 through object renamings.
2421 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2423 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
2424 array type declaration in a private part, when an index is a
2425 subtype indication of a discrete type with a private partial view.
2427 2017-09-06 Javier Miranda <miranda@adacore.com>
2429 * exp_ch4.adb (Expand_Modular_Op): Force generating
2430 temporary to improve the generated code.
2432 2017-09-06 Tristan Gingold <gingold@adacore.com>
2434 * s-fatgen.adb: Minor typo fix in comment.
2436 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2438 * exp_ch5.adb (Make_Field_Assign): If the type
2439 of the right-hand side has stored constraint, use its values
2440 (except for those that are renamings of parent discriminants)
2441 to produce additional assignments for the discriminants of the
2442 left-hand side, which are invisible in the righ-hand side and
2443 not retrievable as selected components.
2445 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2447 * sem_util.adb (Needs_One_Formal): The first formal of such a
2448 function must be a controlling formal, so that Obj.F (X, Y)
2449 can have the interpretation F(Obj)(X, Y).
2450 * sem_util.ads: Clarify documentation.
2452 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2454 * table.ads, table.adb: Restore original implementation.
2455 * namet.h (Names_Ptr): Adjust back.
2456 (Name_Chars_Ptr): Likewise.
2457 * uintp.h (Uints_Ptr): Likewise.
2458 (Udigits_Ptr): Likewise.
2459 * g-table.ads: Remove pragma Compiler_Unit_Warning.
2460 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
2461 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
2462 * spark_xrefs.ads: Likewise.
2463 * scos.h: Undo latest changes.
2465 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2467 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
2468 No_Return flag to instance if pragma applies to generic unit. This
2469 must be done explicitly because the pragma does not appear
2470 directly in the generic declaration (unlike the corresponding
2471 aspect specification).
2473 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2475 * sem_ch7.adb (Has_Referencer): Move up and expand comment
2476 explaining the test used to detect inlining. Use same test
2477 in second occurrence.
2478 (Analyze_Package_Body_Helper): Minor formatting fixes.
2480 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2482 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
2483 derived type with a mixture of renamed and constrained parent
2484 discriminants, the constraint for the target must obtain the
2485 discriminant values from both the operand and from the stored
2486 constraint for it, given that the constrained discriminants are
2487 not visible in the object.
2488 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
2489 side may be derived from that of the left-hand side (as in the
2490 case of an assignment with a change of representation) so the
2491 discriminant to be used in the retrieval of the value of the
2492 component must be the entity in the type of the right-hand side.
2494 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2496 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
2497 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2498 * exp_util.adb (Is_Source_Object): Account for
2499 the cases where the source object may appear as a dereference
2500 or within a type conversion.
2501 * exp_ch6.adb: Fix missing space in error message.
2503 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2505 * sem_prag.adb: Update description of Eliminate.
2507 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2509 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
2510 properly an attribute reference 'Loop_Entry that appears in the
2511 list of indices of an indexed expression, to prevent an infinite
2512 loop in the compiler.
2514 2017-09-06 Bob Duff <duff@adacore.com>
2516 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
2518 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2520 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
2521 in a set membership is an overloaded enumeration literal, and
2522 the type of the alternative is resolved from a previous one,
2523 replace the entity of the alternative as well as the type,
2524 to prevent inconsistencies between the entity and the type.
2526 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2528 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
2529 (No_Component_Reordering_Specified): New switch.
2530 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
2531 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
2532 * bcheck.adb (Check_Consistent_No_Component_Reordering):
2534 (Check_Configuration_Consistency): Invoke it.
2535 * debug.adb (d.r): Toggle the effect of the switch.
2536 (d.v): Change to no-op.
2537 * einfo.ads (Has_Complex_Representation):
2538 Restrict to record types.
2539 (No_Reordering): New alias for Flag239.
2540 (OK_To_Reorder_Components): Delete.
2541 (No_Reordering): Declare.
2542 (Set_No_Reordering): Likewise.
2543 (OK_To_Reorder_Components): Delete.
2544 (Set_OK_To_Reorder_Components): Likewise.
2545 * einfo.adb (Has_Complex_Representation): Expect record types.
2546 (No_Reordering): New function.
2547 (OK_To_Reorder_Components): Delete.
2548 (Set_Has_Complex_Representation): Expect base record types.
2549 (Set_No_Reordering): New procedure.
2550 (Set_OK_To_Reorder_Components): Delete.
2551 (Write_Entity_Flags): Adjust to above change.
2552 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
2553 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
2554 OK_To_Reorder_Components on record types with convention Ada.
2555 * lib-writ.adb (Write_ALI): Deal with NC marker.
2556 * opt.ads (No_Component_Reordering): New flag.
2557 (No_Component_Reordering_Config): Likewise.
2558 (Config_Switches_Type): Add No_Component_Reordering component.
2559 * opt.adb (Register_Opt_Config_Switches): Copy
2560 No_Component_Reordering onto No_Component_Reordering_Config.
2561 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
2562 (Save_Opt_Config_Switches): Save No_Component_Reordering.
2563 (Set_Opt_Config_Switches): Set No_Component_Reordering.
2564 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
2565 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
2566 No_Reordering flag from the default.
2567 (Build_Derived_Private_Type): Likewise.
2568 (Build_Derived_Record_Type): Likewise. Then inherit it
2569 for untagged types and clean up handling of similar flags.
2570 (Record_Type_Declaration): Likewise.
2571 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
2572 remove redundant test on Is_Tagged_Type.
2573 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
2574 (Sig_Flags): Likewise.
2575 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
2576 (Pragma_Id): Add Pragma_No_Component_Reordering value.
2577 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
2578 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
2579 Copy the layout of the parent type only if the No_Reordering
2581 (components_to_record): Reorder record types with
2582 convention Ada by default unless No_Reordering is set or -gnatd.r
2583 is specified and do not warn if No_Reordering is set in GNAT mode.
2585 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2587 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
2588 new predicate to reject declarations that can be completions,
2589 when there is a visible prior homograph that is a null procedure.
2590 * sem_ch6.adb (Analyze_Null_Procedure): use it.
2591 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
2593 2017-09-06 Thomas Quinot <quinot@adacore.com>
2595 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
2596 run of 253 characters or more.
2598 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2600 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
2601 properly incomplete subtypes that may be created by explicit or
2602 implicit declarations.
2603 (Is_Base_Type): Take E_Incomplete_Subtype into account.
2604 (Subtype_Kind): Ditto.
2605 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
2606 Ekind of a subtype of a discriminated incomplete type.
2607 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
2608 incomplete types, to preserve error reporting.
2609 (Process_Incomplete_Dependents): Do not create a subtype
2610 declaration for an incomplete subtype that is created internally.
2611 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
2612 incomplete subtypes that do not require a completion, either
2613 because they are limited views, of they are generic actuals.
2615 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2617 * checks.adb (Insert_Valid_Check): Remove the
2618 suspicious manipulation of the Do_Range_Check flag as ths is
2619 no linger needed. Suppress validity check when analysing the
2620 validation variable.
2622 2017-09-06 Philippe Gil <gil@adacore.com>
2624 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
2627 2017-09-06 Bob Duff <duff@adacore.com>
2629 * sem_elim.adb: Minor comment fix.
2631 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2633 * sem_util.adb (Is_Object_Reference): A function call is an
2634 object reference, and thus attribute references for attributes
2635 that are functions (such as Pred and Succ) as well as predefined
2636 operators are legal in contexts that require an object, such as
2637 the prefix of attribute Img and the Ada2020 version of 'Image.
2639 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2641 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
2642 exp_ch3.adb, xoscons.adb: Minor reformatting.
2644 2017-09-06 Raphael Amiard <amiard@adacore.com>
2646 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
2647 Position parameter. If supplied, use it to provide efficient iteration.
2648 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
2649 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
2652 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2654 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
2655 designated type is class-wide and the expression is an unchecked
2656 conversion, preserve the conversion when checking the tag of the
2657 designated object, to prevent spurious semantic errors when the
2658 expression in the conversion has an untagged type (for example
2659 an address attribute).
2661 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2663 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
2664 operation is subject to a pragma Eliminate.
2666 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2668 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
2670 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2672 * fe.h (Eliminate_Error_Msg): Remove.
2674 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
2676 * gcc-interface/utils.c (make_packable_type): Update call to
2679 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
2681 * gcc-interface/utils2.c (build_load_modify_store):
2682 Use int_mode_for_size.
2684 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2687 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2688 for Itypes that are E_Record_Subtype with a cloned subtype.
2689 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
2691 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2693 * gcc-interface/trans.c (convert_with_check): Use a custom base type
2694 if the base type of the expression has a different machine mode.
2695 Rename a couple of parameters and local variable.
2697 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2699 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
2700 conversions around prefixes that are not references.
2702 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2704 * gcc-interface/utils.c (unchecked_convert): When the result type is a
2705 non-biased integral type with size 0, set the result to 0 directly.
2707 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2709 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
2710 (renaming_from_instantiation_p): ...this.
2711 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
2712 instead of explicit tests on kind of entities. Adjust for renaming.
2713 (gnat_to_gnu_profile_type): Likewise.
2714 (gnat_to_gnu_subprog_type): Likewise.
2715 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
2716 (Case_Statement_to_gnu): Likewise.
2717 (gnat_to_gnu): Likewise.
2718 (process_freeze_entity): Likewise.
2719 (process_type): Likewise.
2720 (add_stmt_with_node): Adjust for renaming.
2721 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
2722 (renaming_from_generic_instantiation_p): Rename to...
2723 (renaming_from_instantiation_p): ...this. Use inline predicate.
2724 (pad_type_hasher::keep_cache_entry): Fold.
2726 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2728 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
2729 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
2730 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
2731 (N_Slice): Likewise.
2732 (N_Selected_Component): Likewise. Do not try again to translate it.
2733 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
2735 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2737 * repinfo.ads: Document new treatment of dynamic values.
2738 (TCode): Bump upper bound to 29.
2739 (Dynamic_Val): New constant set to 29.
2740 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
2741 (Rep_Value) <Dynamic_Val>: Likewise.
2742 * repinfo.h (Dynamic_Val): New macro.
2743 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
2745 <INTEGER_CST>: Set TCODE instead of recursing.
2746 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
2747 <VAR_DECL>: New case.
2748 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
2749 <BIT_AND_EXPR>: Adjust.
2750 <CALL_EXPR>: Do not fall through.
2752 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2754 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
2755 there is no target, do not create a temporary for the return value for
2756 an allocator either.
2758 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2760 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
2761 unconstrained array type.
2763 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2764 Alan Hayward <alan.hayward@arm.com>
2765 David Sherwood <david.sherwood@arm.com>
2767 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
2768 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
2770 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2771 Alan Hayward <alan.hayward@arm.com>
2772 David Sherwood <david.sherwood@arm.com>
2774 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
2775 is_a <scalar_int_mode>.
2776 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
2777 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
2779 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2780 Alan Hayward <alan.hayward@arm.com>
2781 David Sherwood <david.sherwood@arm.com>
2783 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
2784 instead of mode_for_size.
2785 (gnat_to_gnu_subprog_type): Likewise.
2786 * gcc-interface/utils.c (make_type_from_size): Likewise.
2788 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2789 Alan Hayward <alan.hayward@arm.com>
2790 David Sherwood <david.sherwood@arm.com>
2792 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
2793 (fp_size_to_prec): Likewise.
2795 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2796 Alan Hayward <alan.hayward@arm.com>
2797 David Sherwood <david.sherwood@arm.com>
2799 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
2800 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
2802 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2803 Alan Hayward <alan.hayward@arm.com>
2804 David Sherwood <david.sherwood@arm.com>
2806 * gcc-interface/decl.c (validate_size): Update use of
2807 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
2809 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2810 Alan Hayward <alan.hayward@arm.com>
2811 David Sherwood <david.sherwood@arm.com>
2813 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
2814 (fp_size_to_prec): Likewise.
2816 2017-08-29 Martin Liska <mliska@suse.cz>
2819 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
2821 2017-08-08 Martin Liska <mliska@suse.cz>
2823 * gcc-interface/trans.c: Include header files.
2825 2017-07-29 Jakub Jelinek <jakub@redhat.com>
2827 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
2828 as new argument to the imported_module_or_decl debug hook.
2830 2017-07-25 Javier Miranda <miranda@adacore.com>
2832 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
2835 2017-07-19 Jakub Jelinek <jakub@redhat.com>
2837 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
2838 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
2839 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
2841 2017-07-18 Mike Frysinger <vapier@chromium.org>
2843 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
2844 (../../gnatlink$(exeext)): Likewise.
2846 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
2849 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
2850 (Backend_Overflow_Checks): Set to True.
2852 2017-06-23 Jakub Jelinek <jakub@redhat.com>
2854 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
2856 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
2858 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
2860 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
2862 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
2864 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
2865 imported subprograms for the current compilation unit as
2866 definitions. Disable debug info for references to variables.
2867 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
2868 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
2869 not built-in functions to their binding scope.
2870 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
2871 the function as a definition. Update all callers.
2872 (gnat_write_global_declarations): Emit debug info for imported
2873 functions. Filter out external variables for which debug info
2876 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
2879 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
2880 (i[3456]86-pc-gnu): Likewise.
2881 (x86_64 kfreebsd): Likewise.
2883 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2886 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
2888 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2891 * s-interr-hwint.adb: Reinstate.
2892 * gcc-interface/Makefile.in (RTEMS): Use it again.
2894 2017-06-08 Olivier Hainque <hainque@adacore.com>
2896 * vx_crtbegin_auto.c: Update year in copyright notice.
2897 * vx_crtbegin.c: Likewise.
2898 * vx_crtbegin.inc: Likewise.
2899 * vx_crtend.c: Likewise.
2901 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
2903 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
2904 * s-tpopsp-rtems.adb: Delete.
2906 2017-06-02 Olivier Hainque <hainque@adacore.com>
2908 * vx_crtbegin_auto.c: New file.
2909 * vx_crtbegin.c: New file.
2910 * vx_crtbegin.inc: New file.
2911 * vx_crtend.c: New file.
2913 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
2915 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
2916 const qualifiers that cause -Wignored-qualifiers warnings.
2918 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2920 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2921 for Itypes that are E_Access_Subtype.
2922 <E_Access_Subtype>: Use the DECL of the base type directly.
2924 2017-05-22 Ed Schonberg <schonberg@adacore.com>
2925 Eric Botcazou <ebotcazou@adacore.com>
2927 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
2928 limited view may appear in the profile of a function, and a call to
2929 that function in another unit in which the full view is available must
2930 use this full view to spurious type errors at the point of call.
2931 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
2932 of parent body with a with clause for the main unit.
2933 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
2934 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
2935 types declared in external units like types from limited with clauses.
2936 Adjust final processing of defer_limited_with_list accordingly.
2937 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
2938 again to translate the prefix after the field if it is incomplete.
2940 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2942 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
2943 alignment for simple volatile fields and remove associated errors.
2945 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2947 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
2948 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
2950 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
2952 * gcc-interface/utils.c (can_materialize_object_renaming_p):
2953 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
2954 process Original_Node instead of expanded names.
2956 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2958 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
2959 addressability check in the constrained case.
2961 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2963 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
2964 types not coming from a limited context.
2966 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2968 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
2969 the inlined list that are not public.
2970 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
2971 there is a pragma Inline_Always on the subprogram.
2973 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2975 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
2976 <N_Allocator>: Use properly typed constants.
2977 (extract_values): Move around.
2978 (pos_to_constructor): Minor tweaks.
2979 (Sloc_to_locus): Fix formatting.
2980 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
2981 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
2982 (Gigi_Equivalent_Type): Adjust head comment.
2983 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
2985 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2987 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
2988 is a representation clause on an extension, propagate the alignment of
2989 the parent type only if the platform requires strict alignment.
2991 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
2993 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
2994 instead of Word_Size.
2997 2017-03-28 Andreas Schwab <schwab@suse.de>
3000 * system-linux-aarch64-ilp32.ads: New file.
3001 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
3002 from LIBGNAT_TARGET_PAIRS.
3003 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
3004 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
3005 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
3006 or -mabi=ilp32, resp.
3008 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3011 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
3012 instead of Word_Size.
3014 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
3016 * raise-gcc.c (exception_class_eq): Make ec parameter const.
3018 2017-05-02 Richard Biener <rguenther@suse.de>
3020 * gcc-interface/misc.c (gnat_post_options): Do not set
3023 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3025 * gcc-interface/trans.c (assoc_to_constructor): Make sure
3026 Corresponding_Discriminant is only called on discriminants.
3027 Skip the saving of the result only for them.
3028 (gnat_to_gnu) <N_Selected_Component>: Likewise.
3029 <N_Unchecked_Type_Conversion>: Translate the result type first.
3030 (gigi): Set TREE_NOTHROW on Begin_Handler.
3031 (stmt_list_cannot_raise_p): New predicate.
3032 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
3033 a cleanup if the statements of the handler cannot raise.
3034 (process_freeze_entity): Use Is_Record_Type.
3035 (process_type): Likewise.
3037 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3039 * einfo.ads (Corresponding_Record_Component): New alias
3040 for Node21 used for E_Component and E_Discriminant.
3041 * einfo.adb (Corresponding_Record_Component): New function.
3042 (Set_Corresponding_Record_Component): New procedure.
3043 (Write_Field21_Name): Handle Corresponding_Record_Component.
3044 * sem_ch3.adb (Inherit_Component): Set
3045 Corresponding_Record_Component for every component in
3046 the untagged case. Clear it afterwards for non-girder
3048 * gcc-interface/decl.c (gnat_to_gnu_entity)
3049 <E_Record_Type>: For a derived untagged type with discriminants
3050 and constraints, apply the constraints to the layout of the
3051 parent type to deduce the layout.
3052 (field_is_aliased): Delete.
3053 (components_to_record): Test DECL_ALIASED_P directly.
3054 (annotate_rep): Check that fields are present except for
3056 (create_field_decl_from): Add DEBUG_INFO_P
3057 parameter and pass it in recursive and other calls. Add guard
3058 for the manual CSE on the size.
3059 (is_stored_discriminant): New predicate.
3060 (copy_and_substitute_in_layout): Consider only
3061 stored discriminants and check that original fields are present
3062 in the old type. Deal with derived types. Adjust call to
3063 create_variant_part_from.
3065 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3067 * exp_ch6.adb (Expand_Call_Helper): When locating the
3068 accessibility entity created for an access parameter, handle
3069 properly a reference to a formal of an enclosing subprogram. if
3070 the reference appears in an inherited class-wide condition, it
3071 is the rewriting of the reference in the ancestor expression,
3072 but the accessibility entity must be that of the current formal.
3074 2017-05-02 Javier Miranda <miranda@adacore.com>
3076 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
3077 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
3078 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
3079 Call Expand_Non_Binary_Modular_Op.
3081 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3083 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
3084 has discriminants, do not override the Stored_Constraint list of
3085 the full view of the derived type with that of the derived type.
3087 2017-05-02 Bob Duff <duff@adacore.com>
3089 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
3091 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3093 * s-os_lib.ads: Minor typo fix.
3095 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3097 * gnatls.adb: Merge and refactor code from Prj.Env and remove
3098 this deprecated dependency.
3100 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3102 * exp_util.ads: minor comment addition.
3104 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3106 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
3107 pastos in part #3 of the head comment.
3109 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3111 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
3112 procedure body for a local (sub)type declaration within a
3113 predicate function. Invariant checks do not apply to these, and
3114 the expansion of the procedure will happen in the wrong scope,
3115 leading to misplaced freeze nodes.
3117 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3119 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
3120 to analyze generated actions. If the main unit is a body,
3121 the required scope is that of the corresponding unit declaration.
3123 2017-05-02 Arnaud Charlet <charlet@adacore.com>
3125 * einfo.adb (Declaration_Node): flip branches of
3126 an IF statement to avoid repeated negations in its condition;
3127 no change in semantics, only to improve readability.
3129 2017-05-02 Arnaud Charlet <charlet@adacore.com>
3131 * sem_case.adb: Remove extra spaces in parameter declarations.
3133 2017-05-02 Justin Squirek <squirek@adacore.com>
3135 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
3136 in usage line for new -gnatwE switch.
3138 2017-05-02 Claire Dross <dross@adacore.com>
3140 * a-cofuve.ads (Remove): Remove unnecessary
3141 conditions in precondition.
3143 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3145 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
3146 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
3148 2017-05-02 Justin Squirek <squirek@adacore.com>
3150 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3151 alternative expression.
3152 * sem_res.adb (Resolve_Case_Expression): Ditto.
3154 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3156 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
3157 Refine predicate for the case where the primitive operation
3158 is a renaming of equality. An overriding operation that is
3159 a user-defined renaming of predefined equality inherits its
3160 slot from the overridden operation. Otherwise it is treated
3161 as a predefined op and occupies the same predefined slot as
3162 equality. A call to it is transformed into a call to its alias,
3163 which is the predefined equality. A dispatching call thus uses
3164 the proper slot if operation is further inherited and called
3165 with class-wide arguments.
3167 2017-05-02 Justin Squirek <squirek@adacore.com>
3169 * errout.adb (Set_Msg_Text): Add a case to switch the message
3170 type when the character '[' is detected signifying a warning
3171 about a run-time exception.
3172 * opt.ads Add a new Warning_Mode value for new switch
3173 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
3174 to handle new warning mode
3175 * usage.adb (Usage): Add usage entry for -gnatwE
3176 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
3178 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3180 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
3181 declaration that operates on some fixed point type.
3183 2017-05-02 Justin Squirek <squirek@adacore.com>
3185 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
3187 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3189 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
3191 2017-05-02 Justin Squirek <squirek@adacore.com>
3193 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3194 expression (Analyze_If_Expression): Add check for valid condition
3195 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
3197 * sem_res.adb (Resolve_If_Expression): Add check for valid
3198 condition and then-expression.
3200 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3202 * exp_ch3.adb (Build_Initialization_Call): Generate a null
3203 statement if the initialization call is a null procedure, as
3204 can happen with a controlled type with no explicit Initialize
3205 procedure, or an array of such.
3206 * exp_ch7.adb (Process_Object_Declaration): For a type with
3207 controlled components that has a trivial Initialize procedure,
3208 insert declaration for finalization counter after object
3210 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
3211 finalization block and attendant declarations if component has
3212 a trivial Initialize procedure.
3213 (Make_Init_Call): Do not generate a call if controlled type has
3214 a trivial Initialize procedure.
3216 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3218 * g-forstr.ads (Data): Move Format component last.
3219 * g-forstr.adb ("+"): Adjust for above change.
3220 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
3221 * g-sechas.ads (Context): Move Key last.
3222 * g-socket.ads (Service_Entry_Type): Move Aliases last.
3223 * s-fileio.adb (Temp_File_Record): Move Name last.
3224 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
3225 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
3227 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
3229 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
3230 switch introduced recently. finally not needed.
3232 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3234 * sem_ch6.adb (Analyze_Null_Procedure): Set the
3235 Corresponding_Body link for a null procedure declaration.
3237 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3239 * atree.h (Flag290): Add missing terminating parenthesis.
3240 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
3241 (Set_Is_Class_Wide_Clone): Likewise.
3242 * einfo.ads (Is_Class_Wide_Clone): Likewise.
3244 2017-05-02 Gary Dismukes <dismukes@adacore.com>
3246 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
3247 parameter Array_Comp to indicate the case of an array object
3248 with null-excluding components.
3249 * checks.adb (Null_Exclusion_Static_Checks):
3250 Call Compile_Time_Constraint_Error instead of
3251 Apply_Compile_Time_Constraint_Error in the component case. Also
3252 call that when Array_Comp is True, with an appropriate warning for
3253 the array component case. Only create an explicit initialization
3254 by null in the case of an object of a null-excluding access type
3255 (and no longer do that in the component case).
3256 * sem_ch3.adb (Check_Component): Add a Boolean parameter
3257 Array_Comp defaulted to False. Pass Empty for the Comp
3258 actual when calling Null_Exclusion_Static_Checks in the case
3259 where Comp_Decl matches Object_Decl, because we don't have a
3260 component in that case. In the case of an object or component
3261 of an array type, pass True for Array_Comp on the recursive call
3264 2017-05-02 Bob Duff <duff@adacore.com>
3266 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
3267 compute the linux priority from the Ada priority. Call this everywhere
3268 required. In particular, the previous version was not doing this
3269 computation when setting the ceiling priority in various places. It
3270 was just converting to C.int, which results in a ceiling that is off
3273 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3275 * sem_ch3.adb: Comment predicate inheritance.
3277 2017-05-02 Tristan Gingold <gingold@adacore.com>
3279 * s-trasym.ads: Add comment.
3281 2017-05-02 Bob Duff <duff@adacore.com>
3283 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
3284 * sem_ch4.adb: Minor reformatting.
3285 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
3286 * s-taspri-posix-noaltstack.ads: Minor refactoring.
3287 * sinput.ads: Minor typo fix.
3289 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3291 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
3292 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
3293 here from exp_ch9, to recognize objects whose creation requires
3294 dynamic allocation, so that the proper warning can be emitted
3295 when restriction No_Implicit_Heap_Allocation is in effect.
3296 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
3297 to emit proper warning when an object that requires dynamic
3298 allocation is declared.
3300 2017-05-02 Tristan Gingold <gingold@adacore.com>
3302 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
3304 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3306 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
3307 visibility rules for equality operators that apply within an
3308 instantiation apply within an inlined body.
3309 * sem_type.adb (Add_One_Interp): ditto.
3311 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3313 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
3316 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3319 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
3320 Name_No_Tagged_Streams): Move to regular pragmas. Add
3321 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
3322 and Secondary_Stack_Size.
3323 (Pragma_Id): Move Pragma_Assume,
3324 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
3325 Pragma_No_Tagged_Streams to second part.
3327 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3329 * exp_attr.adb: Minor reformatting.
3331 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3333 * sem_ch4.adb (Analyze_Selected_Component): Improve error
3334 detection for illegal references to private components or
3335 operations of a protected type in the body of the type.
3337 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3339 * opt.ads: Add missing GNAT markers in comments.
3340 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
3341 settings of Optimize_Alignment at the end.
3343 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3345 * checks.adb (Apply_Constraint_Check): Do not apply
3346 a discriminant check when the associated type is a constrained
3347 subtype created for an unconstrained nominal type.
3348 * exp_attr.adb: Minor reformatting.
3350 2017-05-02 Bob Duff <duff@adacore.com>
3352 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
3353 the N_Raise_Expression case.
3354 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
3357 2017-05-02 Yannick Moy <moy@adacore.com>
3359 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
3360 optimize length comparison in GNATprove mode.
3361 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
3362 operator /= into negation of operator = when needed.
3363 (Expand_SPARK): Call new
3364 function to expand operator /=.
3366 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3368 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
3369 Simplify the expression for a fixed-fixed division to remove
3370 divisions by constants whenever possible, as an optimization
3371 for restricted targets.
3373 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3375 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
3377 2017-05-02 Bob Duff <duff@adacore.com>
3379 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
3380 to find primitive ops, instead of using an Identifier that will
3381 later be looked up. This is necessary because these ops are not
3382 necessarily visible at all places where we need to call them.
3383 * exp_util.ads: Minor comment fix.
3385 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3387 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
3388 references are fully conformant if they are both expansions
3389 of the discriminant of a protected type, within one of the
3390 protected operations. One occurrence may be expanded into a
3391 constant declaration while the other is an input parameter to
3392 the corresponding generated subprogram.
3394 2017-05-02 Justin Squirek <squirek@adacore.com>
3396 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
3397 recursivly searching composite-types for null-excluding access
3398 types and verifying them.
3399 (Analyze_Object_Declaration): Add a
3400 call to Check_Null_Excluding_Components for static verification
3401 of non-initialized objects.
3402 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
3403 a parameter for a composite-type's component and an extra case
3404 for printing component information.
3406 2017-05-02 Yannick Moy <moy@adacore.com>
3408 * sem_ch10.adb (Analyze_Subunit): Take
3409 configuration pragma into account when restoring appropriate
3410 pragma for analysis of subunit.
3412 2017-05-02 Justin Squirek <squirek@adacore.com>
3414 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
3415 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
3416 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
3417 clauses from the runtime.
3419 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3421 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
3422 array components specially.
3424 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3426 * sem_ch8.adb (Premature_Usage): If the premature usage of
3427 an entity is as the expression in its own object decaration,
3428 rewrite the reference as Any_Id to prevent cascaded errors or
3429 compiler loops when such an entity is used in an address clause.
3431 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3433 * gcc-interface/decl.c (components_to_record): Add missing guard.
3435 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3437 * gcc-interface/decl.c (components_to_record): Add more comments.
3438 Put back pending fields onto the regular list if the misalignment
3439 happens to cancel itself.
3441 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3443 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
3444 controlling actual in a prefixed call, preserve the original node
3445 information if the prefix itself has been rewritten, for ASIS use.
3447 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3449 * exp_ch6.adb (Insert_Post_Call_Actions):
3450 Code clean up. Insert the post-call actions after an enclosing
3451 procedure call when N denotes a function call and appears as an
3452 actual parameter in the procedure call.
3454 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3456 * freeze.adb (Check_Component_Storage_Order): If there is a clause
3457 for the component, also reject the attribute if the component
3458 doesn't end on a byte boundary and its scalar storage order is
3459 different from that of the enclosing record type.
3461 2017-04-28 Javier Miranda <miranda@adacore.com>
3463 * atree.ads (Info_Messages): Removed.
3464 (Warning_Info_Messages): New counter.
3465 (Report_Info_Messages): New counter.
3466 * err_vars.ads Update documentation.
3467 * errout.adb (Delete_Warning_And_Continuations): Update
3468 Info_Message occurrences.
3469 (Error_Msg_Internal): Update Info_Message occurrences.
3470 (Delete_Warning): Update Info_Message occurrences.
3471 (Write_Error_Summary): Update Info_Message occurrences.
3472 (Output_Messages): Update Info_Message occurrences.
3473 (To_Be_Removed): Update Info_Message occurrences.
3474 (Reset_Warnings): Update Info_Message occurrences.
3475 * errutil.adb (Error_Msg): Update Info_Message occurrences.
3476 (Finalize): Update Info_Message occurrences.
3477 (Initialize): Update Info_Message occurrences.
3478 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
3479 (Compilation_Errors): Update Info_Message_Occurences.
3481 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3483 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
3484 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
3485 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
3486 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
3487 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
3488 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
3490 * sem_eval.adb (Why_Not_Static): Initialize Typ.
3491 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
3493 2017-04-28 Bob Duff <duff@adacore.com>
3495 * sem_util.ads, sem_util.adb (Might_Raise): New function
3496 that replaces Is_Exception_Safe, but has the opposite
3497 sense. Is_Exception_Safe was missing various cases -- calls inside
3498 a pragma Debug, calls inside an 'if' or assignment statement,
3499 etc. Might_Raise now walks the entire subtree looking for things
3501 * exp_ch9.adb (Is_Exception_Safe): Remove.
3502 (Build_Protected_Subprogram_Body): Replace call to
3503 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
3504 constants where possible).
3505 * exp_ch7.adb: Rename Is_Protected_Body -->
3506 Is_Protected_Subp_Body. A protected_body is something different
3509 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3511 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
3512 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
3513 (P_Discrete_Choice_List): Initialize Expr_Node variable.
3514 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
3515 (P_Protected): Likewise.
3516 * sem_case.adb (Check_Duplicates):
3517 Add pragma Warnings on variable.
3518 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
3519 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
3520 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
3521 (Analyze_Exit_Statement): Initialize Scope_Id variable.
3522 (Analyze_Iterator_Specification): Initialize Bas variable.
3523 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
3524 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
3525 (Analyze_Accept_Statement): Initialize Task_Nam.
3527 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3529 * checks.adb (Install_Primitive_Elaboration_Check):
3530 Do not generate an elaboration check if all checks have been
3533 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3535 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3536 Interrupt_Handler and Attach_Handler): Generate reference
3537 to protected operation to prevent spurious warnings about
3538 unreferenced entities. Previous scheme failed with style checks
3541 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3543 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
3544 that follows an expression function must not be relocated to
3545 the generated body, because it applies to the code that follows.
3547 2017-04-28 Gary Dismukes <dismukes@adacore.com>
3549 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
3550 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
3551 code that might violate the more stringent checking for 'Access
3552 introduced in Ada 2005.
3554 2017-04-28 Arnaud Charlet <charlet@adacore.com>
3556 * a-cforse.adb: minor style fix in comment.
3558 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3560 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
3561 initialize Block_Decls variable.
3562 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
3563 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
3564 * exp_disp.adb (Expand_Interface_Actuals): Initialize
3565 Formal_DDT and Actual_DDT variables.
3566 (Expand_Interface_Thunk): Initialize Iface_Formal.
3567 (Make_DT): Initialize Size_Comp.
3568 (Make_Select_Specific_Data_Table): Initialize Decls.
3569 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
3570 Also initialize more RPC_Receiver_* variables.
3571 (Build_To_Any_Function): Initialize Cstr_Formal.
3572 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
3574 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3576 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
3577 node between access types, freeze the designated type as well,
3578 so that dispatch table pointers are created in the proper scope,
3579 and not in the constructed body of the expression function.
3581 2017-04-28 Bob Duff <duff@adacore.com>
3583 * alloc.ads (Nodes_Initial): Go back to previous value. The large
3584 value makes large compilations faster, but small compilations slower.
3586 2017-04-28 Arnaud Charlet <charlet@adacore.com>
3588 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
3590 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3592 * erroutc.adb (Compilation_Errors): Do not consider info messages
3593 as suitable warnings when warnings must be treated as errors.
3594 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
3595 internally-generated packages when outputting completion
3597 * errout.adb (Output_Messages): Do not consider info messages as
3598 suitable warnings when warnings must be treated as errors.
3599 * errutil.adb (Finalize): Do not consider info messages as
3600 suitable warnings when warnings must be treated as errors.
3602 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3604 * warnsw.ads: Minor fix for incorrect wording in comment.
3606 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3608 * sem_res.adb (In_Instance_Code): New predicate in
3609 Valid_Conversion, to determine whether a type conversion appears
3610 as (or within) an actual for a formal object. Type conversions
3611 in instances are not rechecked in Valid_Conversion because
3612 visibility changes between generic location andi instance may
3613 lead to spurious errors, but conversions within an actual must be
3614 fully checked, and they are not fully resolved when pre-analyzing
3617 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3619 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
3620 New_Copy_Tree instead of Relocate_Node as any subsequent copies
3621 of the relocated node will have mangled Parent pointers.
3622 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
3623 tables used in conjunction with entity and itype replication.
3624 (Visit_Entity): Rewrite the restriction on which entities
3625 require duplication. The restriction now includes all types.
3627 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3629 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
3630 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
3631 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
3634 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3636 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
3637 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
3639 2017-04-28 Gary Dismukes <dismukes@adacore.com>
3641 * exp_util.adb: Minor reformatting.
3643 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3645 * sem_ch4.adb: Fix copy/pasto.
3647 2017-04-27 Tristan Gingold <gingold@adacore.com>
3649 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
3650 raise-gcc.c. Fix include search path for raise-gcc.c
3652 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3654 * fe.h (Warn_On_Questionable_Layout): Declare.
3655 * warnsw.ads (Warn_On_Record_Holes): Move down.
3656 (Warn_On_Questionable_Layout): New boolean variable.
3657 (Warning_Record): Add Warn_On_Questionable_Layout field.
3658 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
3659 (Restore_Warnings): Likewise.
3660 (Save_Warnings): Likewise.
3661 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
3662 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
3663 components_to_record.
3664 (gnu_field_to_gnat): New function.
3665 (warn_on_field_placement): Likewise.
3666 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
3667 parameters. Rename local variables and adjust recursive call.
3668 Rework final scan of the field list and implement warnings on the
3669 problematic placement of specific sorts of fields.
3671 2017-04-27 Bob Duff <duff@adacore.com>
3673 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
3674 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
3675 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
3676 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
3677 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
3678 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
3679 For efficiency, cache results of Is_Internal_File_Name and
3680 Is_Predefined_File_Name in the Units table. This avoids a lot
3681 of repeated text processing.
3683 2017-04-27 Emmanuel Briot <briot@adacore.com>
3685 * g-comlin.adb (Sort_Sections): remove useless test.
3687 2017-04-27 Claire Dross <dross@adacore.com>
3689 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
3690 allow the use of regular equality over elements in contracts.
3691 (Formal_Model): Ghost package containing model functions that are
3692 used in subprogram contracts.
3693 (Current_To_Last): Removed, model functions should be used instead.
3694 (First_To_Previous): Removed, model functions should be used instead.
3695 (Strict_Equal): Removed, model functions should be used instead.
3696 (No_Overlap): Removed, model functions should be used instead.
3697 (Equivalent_Keys): Functions over cursors are removed. They were
3698 awkward with explicit container parameters.
3699 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
3700 allow the use of regular equality over elements in contracts.
3701 (Formal_Model): Ghost package containing model functions that
3702 are used in subprogram contracts.
3703 (Current_To_Last): Removed, model functions should be used instead.
3704 (First_To_Previous): Removed, model functions should be used instead.
3705 (Strict_Equal): Removed, model functions should be used instead.
3706 (No_Overlap): Removed, model functions should be used instead.
3708 2017-04-27 Yannick Moy <moy@adacore.com>
3710 * gnat1drv.adb: Code cleanup.
3712 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3714 * exp_util.adb (Replace_Entity): The prefix of a 'Result
3715 attribute reference in a post- condition is the subprogram to
3716 which the condition applies. If the condition is inherited
3717 by a type extension, the prefix becomes a reference to the
3718 inherited operation, but there is no need to create a wrapper
3719 for this operation, because 'Result is expanded independently
3720 when elaborating the postconditions.
3722 2017-04-27 Bob Duff <duff@adacore.com>
3724 * sinput.adb: Minor code cleanup.
3725 * namet.adb (Append): Create faster versions of
3726 Append(String) and Append(Name_Id) by using slice assignment
3728 * sem_util.adb (In_Instance): Speed this up by removing
3729 unnecessary tests; Is_Generic_Instance is defined for all
3731 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
3732 Remove unused function.
3733 * alloc.ads (Nodes_Initial): Use a much larger value, because
3734 the compiler was spending a lot of time copying the nodes table
3735 when it grows. This number was chosen in 1996, so is rather out
3736 of date with current memory sizes. Anyway, it's virtual memory.
3737 Get rid of Orig_Nodes_...; use Node_... instead.
3738 * atree.adb (Lock): Do not release the Nodes tables; it's a
3740 Orig_Nodes_ ==> Nodes_
3741 * nlists.adb: Orig_Nodes_ ==> Nodes_
3742 * g-table.adb: Remove unused "with" clause.
3743 * g-table.ads, table.ads: Remove Big_Table_Type, which should
3744 not be used by clients.
3745 * g-dyntab.adb (Last_Allocated): New function
3746 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
3748 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3750 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
3752 (Subtypes_Statically_Match): Remove duplicate check.
3753 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
3755 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3757 * exp_aggr.adb (Replace_Type): Remove the special processing
3758 for selected components.
3759 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
3760 processing for attributes Fixed_Value and Integer_Value.
3761 * exp_util.adb (Side_Effect_Free): Merge the processing for
3762 qualified expressions, type conversions, and unchecked type
3764 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
3766 * par-ch3.adb (P_Declarative_Items): Merge the processing for
3767 tokens function, not, overriding, and procedure.
3768 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
3769 for qualified expressions, type conversions, and unchecked
3771 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
3772 processing for Ada 83 and instances.
3773 (Object_Access_Level): Merge the processing for indexed components
3774 and selected components.
3775 * uname.adb (Add_Node_Name): Merge the processing for stubs.
3777 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3779 * checks.adb (Install_Primitive_Elaboration_Check):
3780 Do not generate the check when restriction No_Elaboration_Code
3783 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3785 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
3786 of Expand_Dispatching_Call. If the denoted subprogram has a
3787 class-wide precondition, this is the only precondition that
3788 applies to the call, rather that the class-wide preconditions
3789 that may apply to the body that is executed. (This is specified
3792 2017-04-27 Yannick Moy <moy@adacore.com>
3794 * gnat1drv.adb (Adjust_Global_Switches): Issue
3795 a warning in GNATprove mode if the runtime library does not
3796 support IEEE-754 floats.
3798 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3800 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
3801 is itself inherited it does not carry any contract information,
3802 so examine its parent operation which is its Alias.
3804 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3806 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
3807 prefix can be an object reference in which case Obj'Image (X)
3808 can only be interpreted as an indexing of the parameterless
3809 version of the attribute.
3810 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
3811 an indexing or a slice operation if the attribute does not require
3812 parameters. In Ada2012 'Image also belongs in this category,
3813 and A'Image (lo .. hi) is legal and must be parsed as a slice.
3815 2017-04-27 Yannick Moy <moy@adacore.com>
3817 * exp_ch4.adb: Minor reformatting.
3818 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
3819 disable the CodePeer and C generation modes. Similar to the
3820 opposite actions done in CodePeer mode.
3822 2017-04-27 Yannick Moy <moy@adacore.com>
3824 * sem_res.adb: Remove duplicate code.
3825 * sem_attr.adb: Delete duplicate code.
3827 2017-04-27 Bob Duff <duff@adacore.com>
3829 * g-dyntab.adb: Reduce the amount of copying in
3830 Release. No need to copy items past Last.
3832 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3834 * checks.adb Add with and use clauses for Sem_Disp.
3835 (Install_Primitive_Elaboration_Check): New routine.
3836 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
3837 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
3838 processing of 'Elaborated.
3839 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
3842 2017-04-27 Bob Duff <duff@adacore.com>
3844 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
3845 If the table grows and then shrinks back to empty, we won't necessarily
3846 point back to the empty array. Code cleanups.
3847 * sinput.ads: Add 'Base to Size clause to match the declared
3850 2017-04-27 Claire Dross <dross@adacore.com>
3852 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
3853 allow the use of regular equality over elements in contracts.
3854 (Formal_Model): Ghost package containing model functions that
3855 are used in subprogram contracts.
3856 (Current_To_Last): Removed, model functions should be used instead.
3857 (First_To_Previous): Removed, model functions should be used instead.
3858 (Strict_Equal): Removed, model functions should be used instead.
3859 (No_Overlap): Removed, model functions should be used instead.
3860 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
3861 Boolean generic parameter to disable contracts for equivalence
3863 (Witness): Create a witness of a key that is used for handling of
3864 equivalence between keys.
3865 (Has_Witness): Check whether a witness is contained in a map.
3866 (W_Get): Get the element associated to a witness.
3867 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
3869 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
3870 Boolean generic parameter to disable contracts for equivalence
3872 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
3873 of equivalence on functional maps.
3874 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
3875 of equivalence on functional maps.
3877 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3879 * exp_ch9.adb (Expand_Entry_Barrier): Code
3880 cleanup. Do not perform the optimization which removes the
3881 declarations of the discriminant and component renamings when
3882 validity checks on operands and attributes are in effect.
3884 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3886 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
3887 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
3888 a-cfhama.ads, a-cofove.ads: Minor reformatting.
3890 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3892 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
3893 pointer dereference.
3894 * g-spipat.adb (Dump): Code clean up. Protect against a possible
3895 null pointer dereference.
3897 2017-04-27 Bob Duff <duff@adacore.com>
3899 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
3900 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
3901 Free renames Init, since they do the same thing.
3902 * g-table.ads: Default for Table_Low_Bound.
3903 * table.ads: Default for Table_Low_Bound, Table_Initial, and
3906 2017-04-27 Bob Duff <duff@adacore.com>
3908 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
3910 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
3911 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
3912 Reorder code so that above assertions do not fail.
3913 * table.ads: Remove obsolete comment on Locked.
3915 2017-04-27 Claire Dross <dross@adacore.com>
3917 * a-cfdlli.ads: Code cleanup.
3919 2017-04-27 Yannick Moy <moy@adacore.com>
3921 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
3922 when needed for proof. (Expand_SPARK): Call the new procedure.
3923 * exp_util.ads Fix typo.
3925 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3927 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
3930 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3932 * sem_elab.adb Add new type Visited_Element
3933 and update the contents of table Elab_Visited. Various code clean up.
3934 (Check_Elab_Call): Determine whether a prior call to
3935 the same subprogram was already examined within the same context.
3936 (Check_Internal_Call_Continue): Register the subprogram being
3937 called as examined within a particular context. Do not suppress
3938 elaboration warnings.
3940 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3942 * xoscons.adb, osint.ads: Minor reformatting.
3944 2017-04-27 Bob Duff <duff@adacore.com>
3946 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
3947 Table_Count_Type --> Table_Last_Type, because the name
3948 was confusing (a "count" usually starts at zero). Add
3949 functionality supported or needed by other tables packages
3950 (Move, Release_Threshold).
3951 * g-table.ads, g-table.adb: This is now just a thin wrapper
3952 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
3953 or needed by other tables packages (Save, Restore).
3954 * table.ads, table.adb: This is now just a thin wrapper around
3955 * g-table.ads/g-table.adb.
3956 * namet.h, scos.h, uintp.h: These files are reaching into the
3957 private data of some instances of g-table, whose names changed,
3958 so the above change requires some adjustment here. It now uses
3961 2017-04-27 Bob Duff <duff@adacore.com>
3963 * namet.adb, namet.ads: Minor: remove unused procedures.
3965 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3967 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
3968 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
3969 Add pragma Warnings on Rtype variable in nested block. *
3970 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
3971 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
3972 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
3973 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
3974 (Process_Component_List_For_Finalize): Initialize Counter_Id.
3975 (Build_Finalize_Statements): Initialize Bod_Stmts.
3976 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
3978 2017-04-27 Claire Dross <dross@adacore.com>
3980 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
3981 allow the use of regular equality over elements in contracts.
3982 (Formal_Model): Ghost package containing model functions that are
3983 used in subprogram contracts.
3984 (Current_To_Last): Removed, model
3985 functions should be used instead.
3986 (First_To_Previous): Removed, model functions should be used instead.
3987 (Strict_Equal): Removed, model functions should be used instead.
3988 (No_Overlap): Removed, model functions should be used instead.
3989 (Equivalent_Keys): Functions over cursors are removed. They were
3990 awkward with explicit container parameters.
3991 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
3992 (proof only) procedure to help GNATprove when equivalence over
3993 keys is not equality.
3995 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3997 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
3998 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
3999 Minor reformatting and code cleanups.
4001 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4003 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
4004 subsidiary of Check_Inherited_Conditions, to build pragmas for an
4005 operation whose ancestor has classwide pre/postconditions. This
4006 is used both to check the legality of the inheritance in Ada
4007 and in SPARK, and to determine whether a wrapper is needed for
4008 an inherited operation.
4009 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
4010 Improve placement of error message for inherited classwide
4011 conditions that become illegal on type derivation.
4013 2017-04-27 Yannick Moy <moy@adacore.com>
4015 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
4016 SPARK_Mode from context on generic package.
4017 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
4020 2017-04-27 Claire Dross <dross@adacore.com>
4022 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
4023 overflows in computations.
4024 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
4025 overflows in computations.
4026 (Insert): Rewrite precondition to avoid overflows in computations.
4027 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
4028 overflows in computations.
4029 (Insert): Rewrite precondition to avoid overflows in computations.
4031 2017-04-27 Steve Baird <baird@adacore.com>
4033 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
4034 flag when it is declared in order to avoid confusing CodePeer about
4035 the possibility of an uninitialized variable read.
4037 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4039 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
4040 no dimensionality error if the subtype of the expression is
4041 identical to the nominal subtype in the declaration, even though
4042 the expression itself may have been constant-folded and lack a
4044 * sem_dim.ads: Add comments on setting of dimension vectors and
4045 its interaction with node rewritings and side-effect removal.
4047 2017-04-27 Bob Duff <duff@adacore.com>
4049 * debug.adb: Minor comment correction.
4050 * sem_dim.ads: Minor reformatting and typo fixes.
4052 2017-04-27 Bob Duff <duff@adacore.com>
4054 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
4055 Last of the tables via function calls, rather than relying on layout
4058 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4060 * exp_util.adb: No wrapper in GNATprove mode.
4062 2017-04-27 Yannick Moy <moy@adacore.com>
4064 * sem_res.adb (Resolve_Comparison_Op): Always
4065 evaluate comparisons between values of universal types.
4067 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4069 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
4070 an elaboration counter nor a check when in GNATprove mode.
4071 * sem_util.adb (Build_Elaboration_Entity): Do not create an
4072 elaboration counter when in GNATprove mode.
4074 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4076 * freeze.adb: copy-paste typo.
4078 2017-04-27 Yannick Moy <moy@adacore.com>
4080 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
4081 Use correct test to detect call in GNATprove mode instead of
4084 2017-04-27 Claire Dross <dross@adacore.com>
4086 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
4087 New property function expressing that the element of a
4088 sequence are contained in the union of two sequences.
4089 (Formal_Model.M_Elements_Included): New property function
4090 expressing that the element of a sequence are another sequence.
4091 (Generic_Sorting): Use new property functions to state that
4092 elements are preserved by Sort and Merge.
4093 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
4094 allow the use of regular equality over elements in contracts.
4095 (Formal_Model): Ghost package containing model functions
4096 that are used in subprogram contracts. (Capacity):
4097 On unbounded containers, return the maximal capacity.
4098 (Current_To_Last): Removed, model functions should be used instead.
4099 (First_To_Previous): Removed, model functions should be used instead.
4100 (Append): Default parameter value replaced
4101 by new wrapper to allow more precise contracts.
4102 (Insert): Subprogram restored, it seems it was useful to users even if
4104 (Delete): Subprogram restored, it seems it was useful to users even if
4106 (Prepend): Subprogram restored, it seems it was useful to users even
4107 if it is inefficient.
4108 (Delete_First): Subprogram restored, it seems it
4109 was useful to users even if it is inefficient. (Delete_Last):
4110 Default parameter value replaced by new wrapper to allow more
4112 (Generic_Sorting.Merge): Subprogram restored.
4113 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
4114 allow the use of regular equality over elements in contracts.
4115 (Formal_Model): Ghost package containing model functions
4116 that are used in subprogram contracts. (Capacity):
4117 On unbounded containers, return the maximal capacity.
4118 (Current_To_Last): Removed, model functions should be used
4120 (First_To_Previous): Removed, model functions should be used instead.
4121 (Append): Default parameter value replaced
4122 by new wrapper to allow more precise contracts.
4123 (Insert): Subprogram restored, it seems it was useful to users even if
4125 (Delete): Subprogram restored, it seems it was useful to users even if
4127 (Prepend): Subprogram restored, it seems it was useful to users even
4128 if it is inefficient.
4129 (Delete_First): Subprogram restored, it seems it
4130 was useful to users even if it is inefficient. (Delete_Last):
4131 Default parameter value replaced by new wrapper to allow more
4133 (Generic_Sorting.Merge): Subprogram restored.
4134 (Vector): Do not reuse formal vectors, as it is no longer possible
4135 to supply them with an equality function over elements.
4137 2017-04-27 Bob Duff <duff@adacore.com>
4139 * g-dyntab.adb (Release): When allocating the new
4140 table, use the correct slice of the old table to initialize it.
4142 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
4144 * einfo.ads: Minor fixes in comments.
4146 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4148 * sem_prag.adb: disable clones in SPARK_Mode.
4150 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4152 * sem_util.ads, contracts.adb: Minor reformatting.
4154 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4156 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
4157 Build body of subprogram that has a class-wide condition that
4158 contains calls to other primitives.
4159 (Build_Class_Wide_Clone_Call); Build a call to the common
4160 class-wide clone of a subprogram with classwide conditions. The
4161 body of the subprogram becomes a wrapper for a call to the
4162 clone. The inherited operation becomes a similar wrapper to which
4163 modified conditions apply, and the call to the clone includes
4164 the proper conversion in a call the parent operation.
4165 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
4166 subprogram that has a classwide condition that contains calls to
4167 other primitives, build an internal subprogram that is invoked
4168 through a type-specific wrapper for all inherited subprograms
4169 that may have a modified condition.
4170 * sem_prag.adb (Check_References): If subprogram has a classwide
4171 condition, create entity for corresponding clone, to be invoked
4172 through wrapper subprograns.
4173 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
4174 message about placement if pragma isi internally generated.
4175 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
4176 a classwide clone, build body of clone as copy of original body,
4177 and rewrite original body as a wrapper as a wrapper for a call to
4178 the clone, so that it incorporates the original pre/postconditions
4180 * freeze.adb (Check_Inherited_Conditions): For an inherited
4181 subprogram that inherits a classwide condition, build spec and
4182 body of corresponding wrapper so that call to inherited operation
4183 gets the modified conditions.
4184 * contracts.adb (Analyze_Contracts): If analysis of classwide
4185 condition has created a clone for a primitive operation, analyze
4186 declaration of clone.
4188 2017-04-27 Steve Baird <baird@adacore.com>
4190 * exp_util.adb (Build_Allocate_Deallocate_Proc):
4191 Add "Suppress => All_Checks" to avoid generating unnecessary
4194 2017-04-27 Yannick Moy <moy@adacore.com>
4196 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
4197 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
4198 inlining body in GNATprove mode when switch -gnatdm used.
4199 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
4200 in GNATprove mode when switch -gnatdm used.
4202 2017-04-27 Arnaud Charlet <charlet@adacore.com>
4204 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
4205 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
4206 clauses, so that we keep an indication of the address clause
4207 before removing it from the tree.
4209 2017-04-27 Yannick Moy <moy@adacore.com>
4211 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
4212 of expression being qualified, when not an object name, or else
4213 evaluate the underlying name.
4215 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
4217 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
4219 2017-04-27 Justin Squirek <squirek@adacore.com>
4221 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
4222 Process_Component_List_For_Finalization as a local variable.
4223 (Process_Component_For_Finalize): Add an extra parameter to avoid
4225 (Process_Component_List_For_Finalization): Correct calls to
4226 Process_Component_For_Finalize to take Num_Comps as a parameter.
4228 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4230 * sem_ch8.adb (Find_Direct_Name): Account for the case where
4231 a use-visible entity is defined within a nested scope of an
4232 instance when giving priority to entities which were visible in
4233 the original generic.
4234 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
4236 2017-04-27 Tristan Gingold <gingold@adacore.com>
4238 * raise-gcc.c: Don't use unwind.h while compiling
4239 for the frontend, but mimic host behavior.
4241 2017-04-27 Javier Miranda <miranda@adacore.com>
4243 * sem_ch3.adb (Build_Discriminated_Subtype):
4244 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
4246 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4248 * sem_prag.adb (Analyze_Global_Item):
4249 Do not consider discriminants because they are not "entire
4250 objects". Remove the discriminant-related checks because they are
4252 (Analyze_Input_Output): Do not consider discriminants
4253 because they are not "entire objects".
4255 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4257 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
4258 perform check if the current scope does not come from source,
4259 as is the case for a rewritten task body, because check has
4260 been performed already, and may not be doable because of changed
4263 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4265 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
4266 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
4269 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4271 * sem_ch4.adb (Analyze_Call): If the return type of a function
4272 is incomplete in an context in which the full view is available,
4273 replace the type of the call by the full view, to prevent spurious
4275 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
4276 abstract subprogram so that compiler does not reject a parameter
4277 of a primitive operation of a tagged type being frozen, when
4278 the untagged type of that parameter cannot be frozen.
4280 2017-04-27 Bob Duff <duff@adacore.com>
4282 * sem_attr.adb (Compute_Type_Key): Don't walk
4283 representation items for irrelevant types, which could be in a
4284 different source file.
4286 2017-04-27 Steve Baird <baird@adacore.com>
4288 * exp_attr.adb (Expand_N_Attribute_Reference):
4289 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
4292 2017-04-27 Yannick Moy <moy@adacore.com>
4294 * exp_unst.ads: Fix typos in comments.
4296 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4298 * sem_eval.adb (Choice_Matches): Handle properly a real literal
4299 whose type has a defined static predicate.
4301 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4303 * exp_ch4.adb (Insert_Dereference_Action):
4304 Do not adjust the address of a controlled object when the
4305 associated access type is subject to pragma No_Heap_Finalization.
4308 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
4310 * gcc-interface/utils.c (gnat_type_for_size): Set
4311 TYPE_ARTIFICIAL on created types.
4313 2017-04-27 Claire Dross <dross@adacore.com>
4315 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4316 modifications in functional containers.
4317 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4318 to improve readablity. Subprograms are separated between basic
4319 operations, constructors and properties. Universally quantified
4320 formulas in contracts are factorized in independant functions
4321 with a name and a comment. Names of parameters are improved.
4323 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4325 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4327 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4329 * sem_res.adb (Resolve_Type_Conversion): Do not
4330 install a predicate check here since this is already done during
4331 the expansion phase. Verify whether the operand satisfies the
4332 static predicate (if any) of the target type.
4333 * sem_ch3.adb (Analyze_Object_Declaration): Do
4334 not install a predicate check if the object is initialized by
4335 means of a type conversion because the conversion is subjected
4338 2017-04-27 Tristan Gingold <gingold@adacore.com>
4340 * raise.c (__gnat_builtin_longjmp): Remove.
4341 (__gnat_bracktrace):
4342 Add a dummy definition for the compiler (__gnat_eh_personality,
4343 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
4344 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
4345 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
4346 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
4347 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
4348 and a-except-2005.adb.
4349 * raise-gcc.c: Allow build in compiler, compiled as a C++
4351 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
4352 (db): Constify msg_format.
4353 (get_call_site_action_for): Don't use void arithmetic.
4354 * system.ads (Frontend_Exceptions): Set to False.
4355 (ZCX_By_Default): Set to True.
4356 (GCC_ZC_Support): Set to True.
4357 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
4359 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
4360 in gnat1 and gnatbind.
4361 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
4362 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
4363 * s-excmac.ads, s-excmac.adb: Copy of variants.
4364 * a-except.o: Adjust preequisites.
4365 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
4367 2017-04-27 Claire Dross <dross@adacore.com>
4369 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4370 modifications in functional containers.
4371 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4372 to improve readablity. Subprograms are separated between basic
4373 operations, constructors and properties. Universally quantified
4374 formulas in contracts are factorized in independant functions
4375 with a name and a comment. Names of parameters are improved.
4377 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4379 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4381 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4383 * sem_res.adb (Resolve_Type_Conversion): Do not
4384 install a predicate check here since this is already done during
4385 the expansion phase. Verify whether the operand satisfies the
4386 static predicate (if any) of the target type.
4387 * sem_ch3.adb (Analyze_Object_Declaration): Do
4388 not install a predicate check if the object is initialized by
4389 means of a type conversion because the conversion is subjected
4392 2017-04-27 Tristan Gingold <gingold@adacore.com>
4394 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
4395 replaced by their variants).
4397 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4399 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
4400 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
4401 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
4403 2017-04-27 Tristan Gingold <gingold@adacore.com>
4405 * s-excmac-gcc.ads, s-excmac-gcc.adb,
4406 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
4409 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4411 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
4412 the loop which detects potential enclosing transient scopes. The
4413 loop now terminates much earlier as transient scopes are bounded
4414 by packages and subprograms.
4416 2017-04-27 Claire Dross <dross@adacore.com>
4418 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
4419 allow the use of regular equality over elements in contracts.
4420 (Cursor): Type is now public so that it can be used in
4422 (Formal_Model): Ghost package containing
4423 model functions that are used in subprogram contracts.
4424 (Current_To_Last): Removed, model functions should be used
4426 (First_To_Previous): Removed, model functions should
4428 (Strict_Equal): Removed, model functions
4429 should be used instead.
4430 (Append): Default parameter value
4431 replaced by new wrapper to allow more precise contracts.
4432 (Insert): Default parameter value replaced by new wrapper to
4433 allow more precise contracts.
4434 (Delete): Default parameter
4435 value replaced by new wrapper to allow more precise contracts.
4436 (Prepend): Default parameter value replaced by new wrapper to
4437 allow more precise contracts.
4438 (Delete_First): Default parameter
4439 value replaced by new wrapper to allow more precise contracts.
4440 (Delete_Last): Default parameter value replaced by new wrapper
4441 to allow more precise contracts.
4443 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4445 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
4446 for object declarations.
4447 (Expand_SPARK_N_Object_Declaration): New routine.
4448 * sem_elab.adb (Check_A_Call): Include calls to the
4449 Default_Initial_Condition procedure of a type under the SPARK
4450 elaboration checks umbrella.
4452 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4454 * sem.adb (Analyze): Diagnose an illegal iterated component
4456 * sem_util.ads, sem_util.adb
4457 (Diagnose_Iterated_Component_Association): New routine.
4459 2017-04-27 Bob Duff <duff@adacore.com>
4461 * adaint.c (__gnat_get_current_dir): Return 0 in length if
4463 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
4464 exception if getcwd failed.
4466 2017-04-27 Yannick Moy <moy@adacore.com>
4468 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
4469 entities with special prefix.
4471 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4473 * debug.adb Change the documentation of switch -gnatd.s.
4474 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
4475 to manage the secondary stack when an enclosing scope already
4476 performs this functionality (aka relaxed management). Switch
4477 -gnatd.s may be used to force strict management in which case
4478 the block will manage the secondary stack unconditionally. Add
4479 a guard to stop the traversal when encountering a package or a
4482 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4484 * sem_res.adb (Resolve_Call): Refine further the handling of
4485 limited views of return types in function calls. If the function
4486 that returns a limited view appears in the current unit,
4487 we do not replace its type by the non-limited view because
4488 this transformation is performed int the back-end. However,
4489 the type of the call itself must be the non-limited view, to
4490 prevent spurious resolution errors.
4492 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4494 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
4495 Removed, proposed implementation using generics for class-wide
4496 preconditions proved impractical.
4497 (Class_Wide_Clone): New attribute of subprogram. Designates
4498 subprogram created for primitive operations with class-wide
4499 pre/postconditions that contain calls to other primitives. The
4500 clone holds the body of the original primitive, but the
4501 pre/postonditions do not apply to it. The original body is
4502 rewritten as a wrapper for a call to the clone.
4503 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
4504 the flag is set, no code for the corresponding pre/postconditions
4505 is inserted into its body.
4507 2017-04-27 Bob Duff <duff@adacore.com>
4509 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
4510 Scalar_Storage_Order if -gnatI is given.
4511 * sem_prag.adb (Analyze_Pragma): Ignore
4512 Default_Scalar_Storage_Order if -gnatI is given.
4514 2017-04-27 Claire Dross <dross@adacore.com>
4516 * a-cofuba.ads (Add): Take as an additional input parameter
4517 the position where the element should be inserted.
4518 (Remove): New function that removes an element from the container.
4519 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
4520 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
4521 (Remove): New function that removes an element from a set.
4522 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
4523 (Remove): New function that removes an element from a sequence.
4524 (Insert): New function that adds anywhere in a sequence.
4526 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4528 * checks.adb (Generate_Range_Check): Revert previous change.
4530 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4532 * sem_util.adb: Minor reformatting/rewording.
4534 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4536 * lib-xref.adb (Generate_Reference): The use
4537 of attribute 'Result is not considered a violation of pragma
4540 2017-04-27 Justin Squirek <squirek@adacore.com>
4542 * cstand.adb (Create_Standard): Correctly set
4543 Directly_Designated_Type for Any_Access.
4544 * sem_type.adb (Covers): Minor grammar fixes.
4546 2017-04-27 Bob Duff <duff@adacore.com>
4548 * sem_attr.adb: Minor cleanup.
4550 2017-04-27 Claire Dross <dross@adacore.com>
4552 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
4553 private child of Ada.Containers used to implement all functional
4555 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
4556 child of Ada.Containers. It provides functional indefinite unbounded
4557 maps which can be used as high level models for specification
4559 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
4560 child of Ada.Containers. It provides functional indefinite unbounded
4561 sets which can be used as high level models for specification
4563 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
4564 child of Ada.Containers. It provides functional indefinite unbounded
4565 vectors which can be used as high level models for specification
4567 * Makefile.rtl: Add new packages.
4568 * impunit.adb: Add new packages.
4570 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4572 * sem_ch4.adb: Minor reformatting.
4574 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4576 * sem_ch12.adb (Analyze_Associations): minor reformatting.
4577 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
4578 point type actual that has user-defined arithmetic primitives,
4579 when there is a previous actual for a formal package that defines
4580 a fixed-point type with the parent user-defined operator.
4582 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4584 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
4585 * sem_attr.adb (Resolve_Attribute): Generate a range check when
4586 the component type allows range checks.
4588 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4590 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
4591 corresponding declaration, because formal derived types are
4592 rewritten as private extensions.
4594 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4596 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
4597 dimensions of operands if node has been analyzed already, because
4598 previous analysis and dimension checking will have removed the
4599 dimension information from the operands.
4601 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4603 * debug.adb: Document the use of switch -gnatd.s.
4604 * einfo.ads Update the documentation on attribute
4605 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
4606 the uses of these attributes from certain entities.
4607 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
4608 which determines whether the block should continue to manage
4609 the secondary stack.
4610 (Manages_Sec_Stack): New routine.
4612 2017-04-27 Bob Duff <duff@adacore.com>
4614 * atree.ads: Minor edit.
4616 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4618 * sinfo.ads: Update the section on Ghost mode. Add
4619 a section on SPARK mode. Update the placement of section on
4620 expression functions.
4622 2017-04-27 Bob Duff <duff@adacore.com>
4624 * sinput.adb (Get_Source_File_Index): Don't
4625 assert that S is in the right range in the case where this is
4626 a .dg file under construction.
4628 2017-04-27 Yannick Moy <moy@adacore.com>
4630 * sem_util.adb (Check_Result_And_Post_State):
4631 Handle more precisely each conjunct in expressions formed by
4632 and'ing sub-expressions.
4634 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4636 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
4638 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4640 * gnat_rm.texi, gnat_ugn.texi,
4641 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4642 doc/gnat_ugn/platform_specific_information.rst,
4643 doc/gnat_ugn/gnat_and_program_execution.rst,
4644 doc/gnat_ugn/gnat_utility_programs.rst,
4645 doc/gnat_ugn/the_gnat_compilation_model.rst,
4646 doc/gnat_rm/implementation_defined_attributes.rst,
4647 doc/gnat_rm/the_gnat_library.rst,
4648 doc/gnat_rm/implementation_defined_pragmas.rst,
4649 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4650 doc/gnat_rm/implementation_of_specific_ada_features.rst,
4651 doc/gnat_rm/implementation_defined_aspects.rst,
4652 doc/gnat_rm/implementation_defined_characteristics.rst: Update
4655 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4657 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
4658 generating C code on complex case expressions.
4660 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4662 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
4663 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
4664 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
4665 Ada_2012 instead of Ada_2005 to be compatible with the above
4667 * bindgen.adb: Silence new warning on pragma Ada_95.
4669 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4671 * checks.adb (Generate_Range_Check): Revert part of previous change.
4673 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4675 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
4676 container indexing operation that appears as a an actual in a
4677 parameter association in a procedure call.
4679 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
4681 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
4682 Fix spelling mistakes.
4684 2017-04-25 Bob Duff <duff@adacore.com>
4686 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
4687 * sinput-p.adb: Use regular fat pointers, with bounds checking,
4688 for source buffers. Fix misc obscure bugs.
4689 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
4690 checking, for source buffers. Modify representation clause for
4691 Source_File_Record as appropriate. Move Source_File_Index_Table
4692 from spec to body, because it is not used outside the body.
4693 Move Set_Source_File_Index_Table into the private part, because
4694 it is used only in the body and in children. Use trickery to
4695 modify the dope in the generic instantiation case. It's ugly,
4696 but not as ugly as the previous method. Fix documentation.
4697 Remove obsolete code.
4698 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
4699 indexing in source buffers.
4700 * fmap.adb: Avoid conversions from one string type to another.
4701 Remove a use of global name buffer.
4702 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
4705 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4707 * exp_util.adb, exp_ch4.adb: Minor reformatting.
4709 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4711 * checks.adb: Code clean up in various routines.
4712 (Generate_Range_Check): Do not generate a range check when the
4713 expander is not active or when index/range checks are suppressed
4715 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
4716 Remove variants that include a Supress parameter. These routines
4717 are never used, and were introduced before the current scope-based
4718 check suppression method.
4720 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
4722 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
4723 code and some subprogram calls that are now noop.
4725 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4727 * exp_ch4.adb (Expand_N_Case_Expression): Take
4728 Minimize_Expression_With_Actions into account when possible.
4730 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4732 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
4733 (Known_Null): Moved to Sem_Util.
4734 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
4735 (Known_Null): Moved to Sem_Util.
4736 * sem_util.adb Add new enumeration type Null_Status_Kind.
4737 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
4738 this routine is now carried out by Null_Status.
4739 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
4740 is now carried out by Null_Status.
4741 (Null_Status): New routine.
4742 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
4743 (Known_Null): Moved from Exp_Util.
4745 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4747 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
4748 error on the return type of an expression function that is a
4749 completion, if the type is derived from a generic formal type.
4751 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4753 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
4754 conversion are those of the target type.
4756 2017-04-25 Bob Duff <duff@adacore.com>
4758 * a-clrefi.adb: Minor cleanup.
4760 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4762 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
4764 2017-04-25 Bob Duff <duff@adacore.com>
4766 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
4767 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
4768 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
4769 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
4770 the Internal_Source buffer. This removes the incorrect call to "="
4771 the customer noticed.
4772 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
4773 eventually need to eliminate them altogether. Or else get rid
4774 of zero-origin addressing.
4776 2017-04-25 Claire Dross <dross@adacore.com>
4778 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
4779 function used in GNATprove to know if an expression contains
4780 non-dispatching calls on primitives of a tagged type.
4782 2017-04-25 Bob Duff <duff@adacore.com>
4784 * rtsfind.adb (Initialize): Initialize
4785 First_Implicit_With. Building the compiler with Normalize_Scalars
4786 and validity checking finds this being used as an uninitialized
4789 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4791 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
4792 Add a warning about SPARK mode management. The routine now
4793 saves and restores both the mode and associated pragma.
4794 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
4795 SPARK mode management. The routine now saves and restores both
4796 the mode and associated pragma.
4797 (Analyze_Object_Contract):
4798 Add a warning about SPARK mode management. The routine
4799 now saves and restores both the mode and associated pragma.
4800 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
4801 management. The routine now saves and restores both the mode
4802 and associated pragma. (Analyze_Package_Contract): Add a warning
4803 about SPARK mode management. The routine now saves and restores
4804 both the mode and associated pragma.
4805 (Analyze_Task_Contract):
4806 Add a warning about SPARK mode management. The routine now saves
4807 and restores both the mode and associated pragma.
4808 * expander.adb (Expand): Change the way the Ghost mode is saved
4810 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
4812 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
4814 * exp_util.adb (Build_DIC_Procedure_Body):
4815 Change the way the Ghost mode is saved and restored.
4816 (Build_DIC_Procedure_Declaration): Change the way the Ghost
4817 mode is saved and restored.
4818 (Build_Invariant_Procedure_Body):
4819 Change the way the Ghost mode is saved and restored.
4820 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
4821 mode is saved and restored.
4822 (Make_Predicate_Call): Change the
4823 way the Ghost mode is saved and restored.
4824 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
4826 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4828 (Mark_And_Set_Ghost_Body): Remove parameter
4829 Mode and its assignment.
4830 (Mark_And_Set_Ghost_Completion):
4831 Remove parameter Mode and its assignment.
4832 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
4834 (Mark_And_Set_Ghost_Instantiation): Remove parameter
4835 Mode and its assignment.
4836 (Mark_And_Set_Ghost_Procedure_Call):
4837 Remove parameter Mode and its assignment.
4839 Remove parameter Mode and its assignment.
4840 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4841 and update the comment on usage.
4842 (Mark_And_Set_Ghost_Body):
4843 Remove parameter Mode and update the comment on usage.
4844 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
4845 update the comment on usage.
4846 (Mark_And_Set_Ghost_Declaration):
4847 Remove parameter Mode and update the comment on usage.
4848 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
4849 update the comment on usage.
4850 (Mark_And_Set_Ghost_Procedure_Call):
4851 Remove parameter Mode and update the comment on usage.
4852 (Set_Ghost_Mode): Remove parameter Mode and update the comment
4854 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
4856 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
4857 of obsolete field SPARK_Mode_Pragma.
4858 (Load_Main_Source): Remove
4859 the assignment of obsolete field SPARK_Mode_Pragma.
4860 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
4861 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
4862 the assignment of obsolete field SPARK_Mode_Pragma.
4863 (Ensure_System_Dependency): Remove the assignment of obsolete
4864 field SPARK_Mode_Pragma.
4865 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
4866 mode management. Change the way Ghost and SPARK modes are saved
4868 * sem.adb (Analyze): Change the way the Ghost mode is saved
4870 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
4871 Ghost mode is saved and restored.
4872 (Process_Full_View): Change
4873 the way the Ghost mode is saved and restored.
4874 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
4875 mode is saved and restored.
4876 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
4877 mode is saved and restored.
4878 (Analyze_Subprogram_Body_Helper):
4879 Change the way the Ghost mode is saved and restored.
4880 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
4881 Ghost mode is saved and restored.
4882 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
4883 management. Save the SPARK mode-related data prior to any changes
4884 to the scope stack and contexts. The mode is then reinstalled
4885 before the subunit is analyzed in order to restore the original
4886 view of the subunit.
4887 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
4888 warning on region management. Change the way the Ghost and
4889 SPARK modes are saved and restored.
4890 (Inline_Instance_Body):
4891 Add a warning about SPARK mode management. Code clean up.
4892 (Analyze_Subprogram_Instantiation): Update the warning on region
4893 management. Change the way the Ghost and SPARK modes are saved
4895 (Instantiate_Package_Body): Update the warning
4896 on region management. Change the way the Ghost and SPARK modes
4897 are saved and restored.
4898 (Instantiate_Subprogram_Body): Update
4899 the warning on region management. Change the way the Ghost and
4900 SPARK modes are saved and restored.
4901 (Set_Instance_Env): Add a
4902 warning about SPARK mode management. Change the way SPARK mode
4903 is saved and restored.
4904 * sem_ch13.adb (Build_Predicate_Functions):
4905 Change the way the Ghost mode is saved and restored.
4906 (Build_Predicate_Function_Declaration): Change the way the Ghost
4907 mode is saved and restored.
4908 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
4909 mode management. Change the way SPARK mode is saved and restored.
4910 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4911 Change the way the Ghost mode is saved and restored.
4912 (Analyze_Initial_Condition_In_Decl_Part): Change the way
4913 the Ghost mode is saved and restored.
4915 Change the way the Ghost mode is saved and restored.
4916 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
4917 Ghost mode is saved and restored.
4918 * sem_util.adb (Install_SPARK_Mode): New routine.
4919 (Restore_SPARK_Mode): New routine.
4920 (Save_SPARK_Mode_And_Set): Removed.
4921 (Set_SPARK_Mode): New routine.
4922 * sem_util.ads (Install_SPARK_Mode): New routine.
4923 (Restore_SPARK_Mode): New routine.
4924 (Save_SPARK_Mode_And_Set): Removed.
4925 (Set_SPARK_Mode): New routine.
4927 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4929 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
4930 to determine whether a type is declared in a local package that
4931 has not yet been frozen.
4932 * freeze.adb (Freeze_Before): Use new predicate to determine
4933 whether a local package must be installed on the scope stack
4934 in order to evaluate in the proper scope actions generated by
4935 aspect specifications, such as Predicate
4936 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
4937 using new predicate.
4939 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4941 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
4942 comparisons between non- scalar expressions expressions because
4943 their values cannot be invalidated.
4944 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
4947 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4949 * par_sco.adb: Minor reformatting.
4951 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4953 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
4954 is a type from an unfrozen local package, install package to
4955 complete the analysis of delayed aspects of the type.
4957 2017-04-25 Tristan Gingold <gingold@adacore.com>
4959 * bingen.adb (System_Version_Control_Used): New variable.
4960 (Resolve_Binder_Options): Set the above variable.
4961 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
4962 (Gen_Elab_Order): Emit blank line before.
4964 2017-04-25 Justin Squirek <squirek@adacore.com>
4966 * sem_cat.adb (Validate_RT_RAT_Component): Added
4967 an extra check to ignore incomplete types.
4969 2017-04-25 Thomas Quinot <quinot@adacore.com>
4971 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
4972 bogus circuitry for the case where Name is Predicate.
4974 2017-04-25 Thomas Quinot <quinot@adacore.com>
4976 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
4977 Create SCOs for Predicate aspects in disabled
4978 state initially, to be enabled later on by...
4979 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
4980 SCO for predicate as enabled.
4982 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4984 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
4985 pragmas Warnings Off / On.
4986 * namet.adb (Finalize): Remove now obsolete pair of pragmas
4988 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
4989 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
4990 consider comparisons between static expressions because their
4991 values cannot be invalidated.
4992 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
4994 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
4995 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
4997 2017-04-25 Bob Duff <duff@adacore.com>
4999 * sem_elab.adb (In_Task_Activation): Trace internal calls in
5002 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5004 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
5007 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5009 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
5010 On/Off to defend against a spurious warning in conditional
5012 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
5013 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
5014 defend against a spurious warning in conditional compilation.
5015 * output.adb Add a pair of pragma Warnings On/Off to defend
5016 against a spurious warning in conditional compilation.
5017 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
5018 (Fold_General_Op): New routine.
5019 (Fold_Static_Real_Op): New routine.
5020 (Test_Comparison): New routine.
5021 * sem_eval.ads (Test_Comparison): New routine.
5022 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
5023 (Warn_On_Constant_Valid_Condition): New routine.
5024 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
5025 to detect a specific case.
5026 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
5027 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
5028 to defend against a spurious warning in conditional compilation.
5029 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
5030 against a spurious warning in conditional compilation.
5031 * usage.adb Add a pair of pragma Warnings On/Off to defend
5032 against a spurious warning in conditional compilation.
5034 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5036 * sinfo.ads, sem_ch13.adb: Update comment.
5038 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5040 * sem_util.adb (Is_Post_State): A reference to a
5041 generic in out parameter is considered a change in the post-state
5044 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5046 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
5047 declaration of a subprogram instance within its wrapper package,
5048 skip over null statements that may result from the rewriting of
5051 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5053 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
5054 If the type is an unchecked_union, replace the attribute with
5055 a Raise_Program_Error (rather than inserting such before the
5056 attribute reference) to handle properly the case where we are
5057 processing a component of a larger record, and we need to prevent
5058 further expansion for the unchecked union.
5059 (Expand_Attribute_Reference, case 'Write): If the type is
5060 an unchecked_union, check whether enclosing scope is a Write
5061 subprogram. Replace attribute with a Raise_Program_Error if the
5062 discriminants of the unchecked_union type have not default values
5063 because such a use is erroneous..
5065 2017-04-25 Tristan Gingold <gingold@adacore.com>
5067 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
5068 Add relative_deadline to task record on edf profile.
5069 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
5070 (Make_Task_Create_Call): Pass relative_deadline value.
5071 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
5072 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
5073 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
5074 * sem_prag.adb (Set_Ravenscar_Profile): Handle
5075 GNAT_Ravenscar_EDF (set scheduling policy).
5076 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
5078 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
5079 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
5081 (Pragma_Deadline_Floor): New pragma.
5082 * targparm.adb (Get_Target_Parameters): Recognize
5083 GNAT_Ravenscar_EDF profile.
5085 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5087 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
5089 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5091 * sem_aux.adb (Nearest_Ancestor): Use original node of type
5092 declaration to locate nearest ancestor, because derived
5093 type declarations for record types are rewritten as record
5095 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
5096 properly derivations that are completions of private types.
5097 (Add_Predicates): If type is private, examine rep. items of full
5098 view, which may include inherited predicates.
5099 (Build_Predicate_Functions): Ditto.
5101 2017-04-25 Javier Miranda <miranda@adacore.com>
5103 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
5104 to generate new entities for subtype declarations located in
5105 Expression_With_Action nodes.
5107 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5109 * sem_elab.adb (Check_A_Call): Remove
5110 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
5111 need for Elaborate_All when SPARK elaboration checks are
5112 required. Update the checks for instances, variables, and calls
5113 to Default_Initial_Condition procedures.
5115 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5117 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
5118 into a boolean aspect, in analogy with the Ada aspect No_Return.
5120 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5122 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
5124 2017-04-25 Bob Duff <duff@adacore.com>
5126 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
5127 Is_True_Constant for an array variable that is passed to a
5128 foreign function as an 'in' parameter.
5129 * debug.adb: Document -gnatd.q.
5131 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5133 * sem_ch6.adb (Analyze_Expression_Function): If expression function
5134 is completion and return type is an access type do not freeze
5135 designated type: this will be done in the process of freezing
5136 the expression if needed.
5137 (Freeze_Expr_Types): Check whether type is complete before
5138 creating freeze node, to provide a better error message if
5139 reference is premature.
5140 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
5141 functions created by type derivations.
5143 2017-04-25 Pascal Obry <obry@adacore.com>
5145 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
5147 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5149 * sem_res.adb (Resolve_Type_Conversion):
5150 When resolving against any fixed type, set the type of the
5151 operand as universal real when the operand is a multiplication
5152 or a division where both operands are of any fixed type.
5153 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
5154 placement of an error message by pointing to the operand of a
5155 type conversion rather than the conversion itself.
5157 2017-04-25 Thomas Quinot <quinot@adacore.com>
5159 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
5160 Needs_Debug_Info when producing SCOs.
5162 2017-04-25 Thomas Quinot <quinot@adacore.com>
5164 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
5165 Always pass a null finalization master for a library level named access
5166 type to which a pragme No_Heap_Finalization applies.
5168 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5172 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
5173 set to A'First(2) and vice versa.
5175 2017-04-25 Yannick Moy <moy@adacore.com>
5177 * freeze.adb (Freeze_Record_Type): Remove obsolete
5178 rule on volatile tagged record restriction on SPARK code.
5180 2017-04-25 Yannick Moy <moy@adacore.com>
5182 * sem_prag.adb (minor) Fix SPARK RM reference.
5184 2017-04-25 Yannick Moy <moy@adacore.com>
5186 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
5187 comment to reflect which entity is chosen as unique entity.
5188 (Unique_Entity): Return full view instead of private spec for
5189 protected type or task type. Fix possible incorrect access when
5192 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5194 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
5195 array types only instead of all packed array types.
5197 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5199 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
5200 dimension system, verify that dimensions of both match.
5201 (Check_Conformance): Add error message in case of dimension
5203 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
5206 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5208 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
5211 2017-04-25 Yannick Moy <moy@adacore.com>
5213 * sem_util.adb: Minor refactoring.
5214 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
5216 2017-04-25 Claire Dross <dross@adacore.com>
5218 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
5219 ultimate alias when accessing overridden operation. Indeed, if the
5220 overridden operation is itself inherited, it won't have any explicit
5223 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5225 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
5226 overlap if the two formals have different types, because formally
5227 the corresponding actuals cannot designate the same objects.
5229 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5231 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
5232 dimensions are present from context, use them. b) If operand is
5233 a static constant rewritten as a literal, obtain the dimensions
5234 from the original declaration, otherwise use dimensions of type
5235 established from context.
5237 2017-04-25 Yannick Moy <moy@adacore.com>
5239 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
5240 of array that is private.
5242 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5244 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
5247 2017-04-25 Yannick Moy <moy@adacore.com>
5249 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
5252 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5254 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
5255 the check that recognizes a call to a private overridding and
5256 replaces the called subprogram with its alias.
5258 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5260 * exp_util.adb: Minor reformatting.
5262 2017-04-25 Justin Squirek <squirek@adacore.com>
5264 * exp_ch3.adb (Freeze_Type): Add condition to always treat
5265 interface types as a partial view of a private type for the
5266 generation of invariant procedure bodies.
5267 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
5268 Add a condition to get the Corresponding_Record_Type for
5269 concurrent types, add condition to return in the absence of a
5270 class in the pragma, remove call to Replace_Type_References,
5271 and add call to Replace_References.
5272 (Add_Interface_Invariatns),
5273 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
5274 to including the working type T.
5275 (Add_Own_Invariants): Remove
5276 legacy condition for separate units, remove dispatching for ASIS
5277 and save a copy of the expression in the pragma expression.
5278 (Build_Invariant_Procedure_Body): Default initalize vars,
5279 remove return condition on interfaces, always use the
5280 private type for interfaces, and move the processing of types
5281 until after the processing of invariants for the full view.
5282 (Build_Invariant_Procedure_Declaration): Remove condition
5283 to return if an interface type is encountered and add
5284 condition to convert the formal parameter to its class-wide
5285 counterpart if Work_Typ is abstract.
5286 (Replace_Type): Add call to Remove_Controlling_Arguments.
5287 (Replace_Type_Ref): Remove class-wide dispatching for the current
5288 instance of the type.
5289 (Replace_Type_References): Remove parameter "Derived"
5290 (Remove_Controlling_Arguments): Created in order to removing
5291 the controlliong argument from calls to primitives in the case
5292 of the formal parameter being an class-wide abstract type.
5293 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
5294 to the change made to Freeze_Type in exp_ch3. Add a condition
5295 to treat interface types as a partial view.
5296 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
5297 to Build_Invariant_Procedure_Declaration to properly generate a
5298 "partial" invariant procedure when Typ is an interface.
5300 2017-04-25 Bob Duff <duff@adacore.com>
5302 * a-numeri.ads: Go back to using brackets encoding for the Greek
5305 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5307 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
5308 (10-15): if derived type T with progenitors is abstract,
5309 and primitive P of this type inherits non-trivial classwide
5310 preconditions from both a parent operation and from an interface
5311 operation, then the inherited operation is abstract if the parent
5312 operation is not null.
5313 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
5314 with Covered_Interface_Op to yield the actual interface operation
5315 that is implemented by a given inherited operation.
5317 2017-04-25 Javier Miranda <miranda@adacore.com>
5319 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
5320 and right operands after performing the validity checks. Required
5321 because validity checks may remove side effects from the operands.
5323 2017-04-25 Javier Miranda <miranda@adacore.com>
5325 * exp_attr.adb (Attribute_Unrestricted_Access):
5326 Do not disable implicit type conversion. Required to generate
5327 code that displaces the pointer to reference the secondary
5330 2017-04-25 Pascal Obry <obry@adacore.com>
5332 * prj-attr.adb, snames.ads-tmpl: Add package Install's
5333 Required_Artifacts attribute.
5335 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5337 * sem_util.adb (Same_Value): String literals are compile-time
5338 values, and comparing them must use Expr_Value_S.
5340 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5342 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
5343 dereference is introduced for the object, and the object is
5344 overloaded, do not check whether it is aliased, because it may
5345 include an implicit dereference.
5346 * sem_type.adb (Disambiguate): If two interpretations are access
5347 attribute types with the same designated type keep either of
5348 them and do not report an ambiguity. A true ambiguity will be
5351 2017-04-25 Bob Duff <duff@adacore.com>
5353 * a-numeri.ads: Change the encoding of Greek letter Pi from
5354 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
5355 to indicate the encoding. We considered using a byte order mark
5356 (BOM), but that causes various trouble (misc software eats the
5357 BOM, if you have a patch with a BOM, then it's not at the start
5358 of the patch, so it's not a BOM, the BOM affects with-ing files,
5360 * scng.adb, s-wchcnv.adb: Minor.
5362 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5364 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
5365 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5367 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
5368 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
5369 Improve error message on operations that inherit non-conforming
5370 classwide preconditions from ancestor and progenitor.
5371 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
5372 moved here from sem_ch3.
5373 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5374 check given in RM 6.1.1 (17) concerning renamings of overriding
5375 operations that inherits class-wide preconditions from ancestor
5378 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5380 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
5381 (Build_Adjust_Statements): Code cleanup.
5382 (Build_Finalizer): Update the initialization of
5384 (Build_Finalize_Statements): Code cleanup.
5385 (Build_Initialize_Statements): Code cleanup.
5386 (Make_Deep_Array_Body): Update the initialization of
5388 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
5389 (Process_Object_Declaration): Generate a null exception handler only
5390 when exceptions are allowed.
5391 (Process_Transients_In_Scope): Update the initialization of
5393 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
5395 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
5396 restrictions when the handler is internally generated and the
5399 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5401 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
5402 enforce legality rule on classwide preconditions inherited from
5403 both an ancestor and a progenitor (RM 6.1.1 (10-13).
5404 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
5405 subprogram need not be dispatching if it appears in a precondition
5406 for an abstract or null subprogram.
5408 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5410 * sem_ch10.adb: Minor typo fix.
5412 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5414 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
5416 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5418 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
5419 have a length which is a power of 2.
5420 (Is_Predefined_File_Name): Likewise. Adjust comment.
5422 2017-04-25 Bob Duff <duff@adacore.com>
5424 * exp_aggr.adb (Component_Count): Protect the
5425 arithmetic from attempting to convert a value >= 2**31 to Int,
5426 which would otherwise raise Constraint_Error.
5428 2017-04-25 Bob Duff <duff@adacore.com>
5430 * opt.ads (Locking_Policy): Fix incorrect documentation. The
5431 first character of the policy name is not unique.
5433 2017-04-25 Bob Duff <duff@adacore.com>
5435 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
5436 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
5437 about this flag not being used. It was already used, and it is
5440 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5442 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
5443 (Ignore_SPARK_Mode_Pragmas): New routine.
5444 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
5445 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
5446 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
5448 (Ignore_SPARK_Mode_Pragmas): New routine
5449 along with pragma Inline.
5450 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
5451 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
5452 Ignore_SPARK_Mode_Pragmas_In_Instance.
5453 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
5454 Save and restore the value of global flag
5455 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
5456 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
5457 the corresponding spec or the body must ignore all SPARK_Mode
5458 pragmas found within.
5459 (Analyze_Subprogram_Declaration): Mark
5460 the spec when it needs to ignore all SPARK_Mode pragmas found
5461 within to allow the body to infer this property in case it is
5462 instantiated or inlined later.
5463 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
5464 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5465 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5466 when the corresponding spec also ignored all SPARK_Mode pragmas
5468 (Analyze_Package_Declaration): Mark the spec when
5469 it needs to ignore all SPARK_Mode pragmas found within to allow
5470 the body to infer this property in case it is instantiated or
5472 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
5473 Save and restore the value of flag
5474 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5475 formal spec when it needs to ignore all SPARK_Mode
5476 pragmas found within to allow the body to infer this
5477 property in case it is instantiated or inlined later.
5478 (Analyze_Package_Instantiation): Save and restore the value
5479 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
5480 the instance spec when it needs to ignore all SPARK_Mode
5481 pragmas found within to allow the body to infer this
5482 property in case it is instantiated or inlined later.
5483 (Analyze_Subprogram_Instantiation): Save and restore the value
5484 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5485 instance spec and anonymous package when they need to ignore
5486 all SPARK_Mode pragmas found within to allow the body to infer
5487 this property in case it is instantiated or inlined later.
5488 (Instantiate_Package_Body): Save and restore the value of global
5489 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
5490 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
5491 corresponding instance spec also ignored all SPARK_Mode pragmas
5493 (Instantiate_Subprogram_Body): Save and restore the
5494 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5495 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5496 when the corresponding instance spec also ignored all SPARK_Mode
5497 pragmas found within.
5498 * sem_prag.adb (Analyze_Pragma): Update the reference to
5499 Ignore_Pragma_SPARK_Mode.
5500 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
5501 all SPARK_Mode pragmas defined within yields mode "off".
5503 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5505 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
5507 2017-04-25 Bob Duff <duff@adacore.com>
5509 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
5510 All_Checks" to avoid generating unnecessary checks.
5511 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
5513 * sem.ads: Fix comment.
5514 * expander.ads: Fix comment.
5515 * exp_atag.ads: Fix comment: "Index = 0" should be
5518 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5520 * s-taprop-linux.adb: Minor editorial fixes.
5522 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5524 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
5525 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
5526 variable and set it to True whenever the main hash table is
5527 populated. Short- circuit the Assoc function if it is false
5528 and add associated guards.
5530 2017-04-25 Olivier Hainque <hainque@adacore.com>
5532 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
5533 specs without elaboration code that have an elaboration counter
5534 nevertheless, e.g. when compiled with -fpreserve-control-flow.
5535 * sem_ch10.adb (Analyze_Compilation_Unit):
5536 Set_Elaboration_Entity_Required when requested to preserve
5537 control flow, to ensure the unit elaboration is materialized at
5538 bind time, resulting in the inclusion of the unit object file
5539 in the executable closure at link time.
5541 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5543 * exp_dbug.adb: In Debug_Renaming_Declaration,
5544 when dealing with indexed component, accept to produce a renaming
5545 symbol when the index is an IN parameter or when it is a name
5546 defined in an outer scope.
5548 2017-04-25 Yannick Moy <moy@adacore.com>
5550 * errout.adb (Error_Msg): Adapt continuation
5551 message in instantiations and inlined bodies for info messages.
5553 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5555 * fname.adb (Has_Internal_Extension): Add pragma Inline.
5556 Use direct 4-character slice comparisons.
5558 pragma Inline. (Has_Suffix): Delete.
5559 (Is_Internal_File_Name):
5560 Test Is_Predefined_File_Name first.
5561 (Is_Predefined_File_Name):
5562 Use direct slice comparisons as much as possible and limit all
5563 comparisons to at most 8 characters.
5565 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5567 * checks.adb (Insert_Valid_Check): Code cleanup.
5568 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
5569 (Expand_Actuals): Generate proper copy-back for a validation
5570 variable when it acts as the argument of a type conversion.
5571 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
5572 predicate to operate on type qualifications.
5574 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5576 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
5579 2017-04-25 Bob Duff <duff@adacore.com>
5581 * sem_prag.adb (No_Return): Give an error if the pragma applies
5582 to a body. Specialize the error for the specless body case,
5583 as is done for (e.g.) pragma Convention.
5584 * debug.adb: Add switch -gnatd.J to disable the above legality
5585 checks. This is mainly for use in our test suite, to avoid
5586 rewriting a lot of illegal (but working) code. It might also
5587 be useful to customers. Under this switch, if a pragma No_Return
5588 applies to a body, and the procedure raises an exception (as it
5589 should), the pragma has no effect. If the procedure does return,
5590 execution is erroneous.
5592 2017-04-25 Bob Duff <duff@adacore.com>
5594 * exp_ch6.adb (Expand_Actuals): This is the
5595 root of the problem. It took N as an 'in out' parameter, and in
5596 some cases, rewrote N, but then set N to Original_Node(N). So
5597 the node returned in N had no Parent. The caller continued
5598 processing of this orphaned node. In some cases that caused a
5599 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
5600 and trips over the Empty Parent). The solution is to make N an
5601 'in' parameter. Instead of rewriting it, return the list of
5602 post-call actions, so the caller can do the rewriting later,
5603 after N has been fully processed.
5604 (Expand_Call_Helper): Move most of Expand_Call here. It has
5605 too many premature 'return' statements, and we want to do the
5606 rewriting on return.
5607 (Insert_Post_Call_Actions): New procedure to insert the post-call
5608 actions in the appropriate place. In the problematic case,
5609 that involves rewriting N as an Expression_With_Actions.
5610 (Expand_Call): Call the new procedures Expand_Call_Helper and
5611 Insert_Post_Call_Actions.
5613 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5615 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
5616 properly type derived from generic formal types, to handle
5617 properly modified version of ACATS 4.1B B611017.
5619 2017-04-25 Javier Miranda <miranda@adacore.com>
5621 * exp_unst.adb (Subp_Index): Adding missing
5622 support for renamings and functions that return a constrained
5623 array type (i.e. functions for which the frontend built a
5624 procedure with an extra out parameter).
5626 2017-04-25 Pascal Obry <obry@adacore.com>
5628 * s-string.adb: Minor code clean-up.
5630 2017-04-25 Bob Duff <duff@adacore.com>
5632 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
5634 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
5635 function for Non_Blocking_Wait_Process.
5637 2017-04-25 Bob Duff <duff@adacore.com>
5639 * prep.adb (Preprocess): Remove incorrect
5640 Assert. Current character can be ASCII.CR.
5642 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5644 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
5645 convention Stdcall, which has a number of exceptions. Convention
5646 is legal on a component declaration whose type is an anonymous
5647 access to subprogram.
5649 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5651 * sem_ch4.adb: sem_ch4.adb Various reformattings.
5652 (Try_One_Prefix_Interpretation): Use the base type when dealing
5653 with a subtype created for purposes of constraining a private
5654 type with discriminants.
5656 2017-04-25 Javier Miranda <miranda@adacore.com>
5658 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
5659 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
5660 dispatching primitives (Restore_Warnings): Restore warning on
5661 late dispatching primitives (Save_Warnings): Save warning on late
5662 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
5663 to enable/disable this warning.
5664 (WA_Warnings): Set warning on late dispatching primitives.
5665 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
5666 that its parent type has a private extension.
5667 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
5669 * usage.adb: Document -gnatw.j and -gnatw.J.
5671 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5673 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
5676 2017-04-25 Bob Duff <duff@adacore.com>
5678 * binde.adb (Validate): Do not pass dynamic strings
5679 to pragma Assert, because older compilers do not support that.
5681 2017-04-25 Bob Duff <duff@adacore.com>
5683 * s-fileio.adb (Close): When a temp file is
5684 closed, delete it and clean up its Temp_File_Record immediately,
5685 rather than waiting until later.
5686 (Temp_File_Record): Add File
5687 component, so Close can know which Temp_File_Record corresponds
5688 to the file being closed.
5689 (Delete): Don't delete temp files,
5690 because they are deleted by Close.
5691 (Open): Set the File component
5692 of Temp_File_Record. This requires moving the creation of the
5693 Temp_File_Record to the end, after the AFCB has been created.
5695 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5697 * checks.adb (Insert_Valid_Check): Do not generate
5698 a validity check when inside a generic.
5700 2017-04-25 Yannick Moy <moy@adacore.com>
5702 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
5704 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5706 * snames.ads-tmpl (Snames): More names for detecting predefined
5707 potentially blocking subprograms.
5709 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5711 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
5712 concerning inheritance of class-wide preconditions do not apply
5715 2017-04-25 Bob Duff <duff@adacore.com>
5717 * s-ficobl.ads: Minor comment fix.
5719 2017-04-25 Yannick Moy <moy@adacore.com>
5721 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
5722 conversions from float to integer in GNATprove mode.
5723 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
5724 to call Apply_Type_Conversion_Checks, so that range checks
5725 are properly positioned when needed on conversions, including
5726 when converting from float to integer. (Determine_Range): In
5727 GNATprove mode, take into account the possibility of conversion
5728 from float to integer.
5729 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
5730 check on conversions from fixed-point to integer, not anymore
5731 on conversions from floating-point to integer, when in GNATprove
5734 2017-04-25 Yannick Moy <moy@adacore.com>
5736 * checks.adb (Determine_Range_R): Special case type conversions
5737 from integer to float in order to get bounds in that case too.
5738 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
5739 mode, for computations involved in interval checking.
5741 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5743 * checks.adb (Insert_Valid_Check): Partially reimplement validity
5745 * einfo.adb Node36 is now used as Validated_Object.
5746 (Validated_Object): New routine.
5747 (Set_Validated_Object): New routine.
5748 (Write_Field36_Name): Add an entry for Validated_Object.
5749 * einfo.ads Add new attribute Validated_Object along with
5751 (Validated_Object): New routine along with pragma Inline.
5752 (Set_Validated_Object): New routine along with pragma Inline.
5753 * exp_attr.adb (Make_Range_Test): Add processing for validation
5754 variables to avoid extra reads and copies of the prefix.
5755 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
5756 variables in order to reflect any changes done in the variable
5757 back into the original object.
5758 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
5759 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
5761 2017-04-25 Steve Baird <baird@adacore.com>
5763 * exp_ch7.adb (Build_Array_Deep_Procs,
5764 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
5765 generate Finalize_Address routines for CodePeer.
5767 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5769 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
5770 Analyze_Pre_Post_Condition, to implement the legality checks
5771 mandated by AI12-0131: Pre'Class shall not be specified for an
5772 overriding primitive subprogram of a tagged type T unless the
5773 Pre'Class aspect is specified for the corresponding primitive
5774 subprogram of some ancestor of T.
5776 2017-04-25 Bob Duff <duff@adacore.com>
5778 * sem_ch8.adb (Use_One_Type): If a use_type_clause
5779 is redundant, set its Used_Operations to empty. This is only
5780 necessary for use clauses that appear in the parent of a generic
5781 child unit, because those use clauses get reanalyzed when we
5782 instantiate the generic, and we don't want the Used_Operations
5783 carried over from the original context (where it was probably
5786 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5788 * exp_ch6.adb: Minor reformatting.
5790 2017-04-25 Bob Duff <duff@adacore.com>
5792 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5793 Use Source_Index (Current_Sem_Unit) to find the correct casing.
5794 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
5795 (Current_Sem_Unit) to find the correct casing.
5796 * par.adb (Par): Null out Current_Source_File, to ensure that
5797 the above bugs won't rear their ugly heads again.
5799 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5801 * sem_ch8.adb (Find_Type): For an attribute reference
5802 'Class, if prefix type is synchronized and previous errors
5803 have suppressed the creation of the corresponding record type,
5804 create a spurious class-wide for the synchonized type itself,
5805 to catch other misuses of the attribute
5807 2017-04-25 Steve Baird <baird@adacore.com>
5809 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
5810 is True, then don't generate the accessibility check for the
5811 tag of a tagged result.
5812 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
5813 if CodePeer_Mode is True, then don't generate the
5814 tag checks for the result of call to an instance of
5815 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
5816 descendant of" check and the accessibility check).
5818 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5820 * sem_ch13.adb: Code cleanups.
5821 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
5822 * sem_ch8.ads: Minor comment fix.
5824 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5826 * exp_ch4.adb (Library_Level_Target): New function.
5827 (Expand_Concatenate): When optimization is enabled, also expand
5828 the operation out-of-line if the concatenation is present within
5829 the expression of the declaration of a library-level object and
5830 not only if it is the expression of the declaration.
5832 2017-04-25 Bob Duff <duff@adacore.com>
5834 * freeze.adb (Freeze_Object_Declaration): Do
5835 not Remove_Side_Effects if there is a pragma Linker_Section,
5836 because in that case we want static initialization in the
5837 appropriate section.
5839 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5841 * exp_dbug.adb: Minor rewording and reformatting.
5843 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5845 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
5846 handle the proposed changes to rules concerning potentially
5847 unevaluated expressions, to include selected components that
5848 do not depend on discriminants, and indexed components with
5850 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
5851 predicate in quantified expression, and fix bugs in the handling
5852 of case expressions and membership test.
5853 (Analyze_Attribute_Old_Result): use new predicate.
5854 (Analyze_Attribute, case Loop_Entry): ditto.
5856 2017-04-25 Bob Duff <duff@adacore.com>
5858 * s-secsta.adb (SS_Info): Add a comment
5859 explaining why we don't need to walk all the chunks in order to
5860 compute the total size.
5862 2017-04-25 Bob Duff <duff@adacore.com>
5864 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
5865 of the global name buffer to 4*Max_Line_Length.
5867 2017-04-25 Javier Miranda <miranda@adacore.com>
5869 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
5870 renaming entity for debug information, mark the entity as needing debug
5871 info if it comes from sources.
5873 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5875 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
5876 restriction converning the use of 'Address where the prefix is
5877 of a controlled type.
5879 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5881 * exp_dbug.adb: In Debug_Renaming_Declaration,
5882 skip slices that are made redundant by an indexed component
5884 * atree.h: New definition for Original_Node.
5886 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5888 * sem_prag.adb, sem_prag.ads: Minor reformatting.
5890 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5892 * sem_ch3.adb (Check_Entry_Contract): Call
5893 Preanalyze_Spec_Expression so that resolution takes place as well.
5894 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
5895 internal calls that appear in preconditions of protected
5896 operations, in default values for same, and in contract guards
5897 for contract cases in SPARK.
5899 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5901 * a-numaux.ads: Fix description of a-numaux-darwin
5903 (Double): Define to Long_Float.
5904 * a-numaux-vxworks.ads (Double): Likewise.
5905 * a-numaux-darwin.ads
5907 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
5908 * a-numaux-x86.ads: Fix package description.
5909 * a-numaux-x86.adb (Is_Nan): Minor tweak.
5910 (Reduce): Adjust and complete description. Call Is_Nan instead of
5911 testing manually. Use an integer temporary to hold rounded value.
5912 * a-numaux-darwin.adb (Reduce): Likewise.
5913 (Is_Nan): New function.
5915 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5917 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
5918 on analysis of prefix whose type is a current instance of a
5919 synchronized type, but where the prefix itself is an entity that
5922 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5924 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
5925 the identity of callable entities therein, because they have been
5926 properly resolved, and prefixed calls may have been rewritten
5929 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
5931 * exp_ch3.adb (Build_Init_Statements): Convert
5932 the expression of the pragma/aspect Secondary_Stack_Size to
5933 internal type System.Parameters.Size_Type before assigning
5934 it to the Secondary_Stack_Size component of the task type's
5935 corresponding record.
5937 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5939 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
5940 (etc) optimizations when the type is modular and the offsets
5943 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5945 * s-osinte-freebsd.ads: Minor comment tweaks
5947 2017-04-25 Javier Miranda <miranda@adacore.com>
5949 * urealp.adb (UR_Write): Reverse previous patch
5950 adding documentation on why we generate multiplications instead
5951 of divisions (needed to avoid expressions whose computation with
5952 large numbers may cause division by 0).
5954 2017-04-25 Bob Duff <duff@adacore.com>
5956 * erroutc.adb (Set_Specific_Warning_Off,
5957 Set_Warnings_Mode_Off): Use the correct source file for
5958 Stop. Was using Current_Source_File, which is only valid during
5959 parsing. Current_Source_File will have a leftover value from
5960 whatever file happened to be parsed last, because of a with_clause
5963 2017-04-25 Bob Duff <duff@adacore.com>
5965 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
5966 to In_Predefined_Unit, but including GNAT units.
5967 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
5968 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
5969 because Should_Ignore_Pragma was not working reliably outside
5970 the parser, because Current_Source_File is not valid.
5971 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
5972 * par-prag.adb: Call Should_Ignore_Pragma_Par.
5974 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5976 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
5979 2017-04-25 Javier Miranda <miranda@adacore.com>
5981 * urealp.adb (UR_Write): Fix output of constants with a base other
5984 2017-04-25 Justin Squirek <squirek@adacore.com>
5986 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
5987 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
5988 Add extra parameter for Process_Interface_Name.
5989 (Process_Interface_Name): Add parameter for pragma to analyze
5990 corresponding aspect.
5991 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
5994 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5996 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
5999 2017-04-25 Yannick Moy <moy@adacore.com>
6001 * sem_res.adb (Resolve_Comparison_Op): Do not
6002 attempt evaluation of relational operations inside assertions.
6004 2017-04-25 Justin Squirek <squirek@adacore.com>
6006 * exp_util.adb (Add_Interface_Invariants):
6007 Restored, code moved back from Build_Invariant_Procedure_Body.
6008 (Add_Parent_Invariants): Restored, code moved back from
6009 Build_Invariant_Procedure_Body.
6010 (Build_Invariant_Procedure_Body):
6011 Remove refactored calls and integrated code from
6012 Add_Parent_Invariants and Add_Interface_Invariants.
6014 2017-04-25 Johannes Kanig <kanig@adacore.com>
6016 * errout.adb (Output_Messages): Adjust computation of total
6018 * erroutc.adb (Error_Msg): In statistics counts, deal
6019 correctly with informational messages that are not warnings.
6020 * errutil.adb (Finalize): adjust computation of total errors.
6022 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6024 * terminals.c (__gnat_terminate_pid): New.
6025 * g-exptty.ads (Terminate_Process): New. Update comments.
6027 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6029 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
6031 2017-04-25 Justin Squirek <squirek@adacore.com>
6033 * sem_ch3.adb (Analyze_Declarations): Minor
6034 correction to comments, move out large conditional and scope
6035 traversal into a predicate.
6036 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
6039 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6041 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
6042 of prefix whose type is a current instance of a synchronized
6043 type. If the prefix is an object this is an external call (or
6044 requeue) that can only access public operations of the object. The
6045 previous predicate was too restrictive, and did not allow public
6046 protected operations, only task entries.
6048 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6050 * sem_ch5.adb, fname.adb: Minor reformatting.
6052 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6054 * einfo.adb (Is_Anonymous_Access_Type): New routine.
6055 * einfo.ads Update the placement of
6056 E_Anonymous_Access_Subprogram_Type along with all subtypes that
6058 (Is_Anonymous_Access_Type): New routine.
6059 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
6060 master for an access type subject to pragma No_Heap_Finalization.
6061 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
6062 allocated or deallocated does not finalization actions if the
6063 associated access type is subject to pragma No_Heap_Finalization.
6064 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
6065 * par-prag.adb Pragma No_Heap_Finalization does not need special
6066 processing from the parser.
6067 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
6068 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
6069 * sem_prag.adb Add an entry in table Sig_Flags for pragma
6070 No_Heap_Finalization.
6071 (Analyze_Pragma): Add processing for
6072 pragma No_Heap_Finalization. Update various error messages to
6073 use Duplication_Error.
6074 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
6075 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
6076 and corresponding pragma id.
6078 2017-04-25 Bob Duff <duff@adacore.com>
6080 * freeze.adb (Freeze_Record_Type): Use the
6081 underlying type of the component type to determine whether it's
6082 elementary. For representation clause purposes, a private type
6083 should behave the same as its full type.
6084 * fname.ads, fname.adb (Is_Predefined_File_Name):
6085 Make sure things like "system.ali" are recognized as predefined.
6087 2017-04-25 Javier Miranda <miranda@adacore.com>
6089 * debug.adb: Update documentation of -gnatd.6.
6091 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6093 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
6094 element iterator when the name is an overloaded function call,
6095 one of whose interpretations yields an array.
6097 2017-04-25 Bob Duff <duff@adacore.com>
6099 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
6100 Is_Internal_Unit_Name): New functions for operating on unit
6101 names, as opposed to file names. There's some duplicated code
6102 with fname.adb, which is unfortunate, but it seems like we don't
6103 want to add dependencies here.
6104 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
6105 to Is_Predefined_Unit_Name; the former was wrong, because Uname
6106 is not a file name at all.
6107 * fname.ads, fname.adb: Document the fact that
6108 Is_Predefined_File_Name and Is_Internal_File_Name can be called
6109 for ALI files, and fix the code so it works properly for ALI
6110 files. E.g. these should return True for "system.ali".
6112 2017-04-25 Justin Squirek <squirek@adacore.com>
6114 * exp_util.adb (Add_Invariant): Removed,
6115 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
6116 and Add_Own_Invariant. (Add_Invariant_Check): Used
6117 for adding runtime checks from any kind of invariant.
6118 (Add_Inherited_Invariant): Generates invariant checks for
6119 class-wide invariants (Add_Interface_Invariants): Removed, code
6120 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
6121 Create a types own invariant procedure (Add_Parent_Invariants):
6122 Removed, code moved to Build_Invariant_Procedure_Body
6123 (Build_Invariant_Procedure_Body): Add refactored calls
6124 and integrated code from Add_Parent_Invariants and
6125 Add_Interface_Invariants.
6126 (Process_Type): Removed, the
6127 relavant code was inlined into both Add_Own_Invariant and
6128 Add_Inherited_Invariant.
6130 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6132 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
6133 scn.adb, osint.adb, fname.adb: Minor reformatting.
6135 2017-04-25 Pascal Obry <obry@adacore.com>
6137 * s-taprop-mingw.adb: Do not check for CloseHandle in
6140 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6142 * sem_util.adb (Check_Part_Of_Reference):
6143 Continue to examine the context if the reference appears within
6144 an expression function.
6146 2017-04-25 Justin Squirek <squirek@adacore.com>
6148 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
6149 and Build_Invariant_Procedure_Declaration.
6150 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
6151 and Build_Invariant_Procedure_Declaration from exp_ch7
6152 and break-out Is_Untagged_Private_Derivation from
6153 Build_Invariant_Procedure_Body.
6154 (Replace_Type_References):
6155 Append an extra parameter to allow for dispatching replacements
6156 and add the corrasponding logic.
6157 (Type_Invariant): Remove
6158 Replace_Typ_Refs and replace its references with calls to
6159 Replace_Type_References.
6160 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
6162 2017-04-25 Bob Duff <duff@adacore.com>
6164 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
6165 that returns True when appropriate.
6166 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
6167 when compiling predefined files.
6168 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
6169 "gnat.adc" should not be considered a predefined file name.
6170 That required (or at least encouraged) a lot of cleanup of global
6171 variable usage. We shouldn't be communicating information via
6172 the global name buffer.
6173 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
6174 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
6175 required by the above-mentioned cleanup.
6177 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6179 * osint.adb (Find_File): Handle properly a request for a
6180 configuration file whose name is a directory.
6182 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6184 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
6186 2017-04-25 Bob Duff <duff@adacore.com>
6188 * types.ads: Minor: Fix '???' comment.
6189 * sem_ch8.adb: Minor comment fix.
6191 2017-04-25 Bob Duff <duff@adacore.com>
6193 * sem_prag.adb: Remove suspicious uses of Name_Buf.
6194 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
6195 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
6196 Add String_To_Name with no side effects.
6198 2017-04-25 Justin Squirek <squirek@adacore.com>
6200 * sem_ch3.adb (Analyze_Declarations): Add
6201 additional condition for edge case.
6203 2017-04-25 Bob Duff <duff@adacore.com>
6205 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
6206 reserved words inside pragmas. This is necessary to allow the
6207 pragma name Interface to be used in pragma Ignore_Pragma.
6208 * par.adb: Minor comment fix.
6210 2017-04-25 Javier Miranda <miranda@adacore.com>
6212 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
6213 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
6214 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
6215 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
6216 occurrences of RE_Type_Is_Abstract
6218 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6220 * exp_util.adb (Build_Chain): Account for ancestor
6221 subtypes while traversing the derivation chain.
6223 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6225 * sem_attr.adb: minor reformatting.
6227 2017-04-25 Doug Rupp <rupp@adacore.com>
6229 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
6231 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6233 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
6234 the first pass over an assignment statement with target names,
6235 to prevent the generation of subtypes (such as discriminated
6236 record components)that may carry the target name outside of the
6237 tree for the assignment. The subtypes will be generated when
6238 the assignment is reanalyzed in full.
6239 (Analyze_Target_Name): Handle properly class-wide types.
6241 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6243 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
6244 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6245 the purposes of freezing.
6246 * exp_util.adb Update the documentation and structure of the
6247 type map used in class-wide semantics of assertion expressions.
6248 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6249 and resolve the triaged expression because all substitutions
6250 refer to the proper entities. Update the replacement of
6252 (Build_DIC_Procedure_Body): Add formal parameter
6253 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6254 are now only processed when freezing occurs. Build a body only
6256 (Entity_Hash): Removed.
6257 (Map_Types): New routine.
6258 (Replace_Object_And_Primitive_References): Removed.
6259 (Replace_References): New routine.
6260 (Replace_Type_References): Moved to the library level of Exp_Util.
6261 (Type_Map_Hash): New routine.
6262 (Update_Primitives_Mapping): Update the mapping call.
6263 (Update_Primitives_Mapping_Of_Types): Removed.
6264 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6265 parameter For_Freeze and update the comment on usage.
6266 (Map_Types): New routine.
6267 (Replace_References): New routine.
6268 (Replace_Type_References): Moved to the library level of Exp_Util.
6269 (Update_Primitives_Mapping_Of_Types): Removed.
6270 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6271 properties of the private type to the full view in case the full
6272 view derives from a parent type and inherits a DIC pragma.
6273 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6274 DIC pragma is placed at the top of a declarative region.
6276 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6278 * a-tasatt.adb: Complete previous change and use an unsigned
6279 int to avoid overflow checks.
6281 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6283 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
6284 the error message when the attribute reference is an actual in
6285 a call to a subprogram inherited from a generic formal type with
6286 unknown discriminants, which makes the subprogram and its formal
6287 parameters intrinsic (see RM 6.3.1 (8) and (13)).
6289 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6291 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
6292 sem_prag.adb: Minor reformatting.
6294 2017-04-25 Bob Duff <duff@adacore.com>
6296 * sem_attr.adb (Type_Key): Add code in the
6297 recursive Compute_Type_Key to protect against fetching the source
6298 code for Standard, in case a component of the type is declared
6299 in Standard. There was already code to do this for the original
6300 type, but not for its components.
6302 2017-04-25 Javier Miranda <miranda@adacore.com>
6304 * exp_ch3.adb (Build_Initialization_Call): Handle
6305 subtypes of private types when searching for the underlying full
6306 view of a private type.
6308 2017-04-25 Javier Miranda <miranda@adacore.com>
6310 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
6311 real conditional expression can appear in a fixed-type context
6312 and must be resolved with that context to facilitate the code
6313 generation to the backend.
6315 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6317 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
6318 to indicate whether during inline processing, when some unit U1
6319 appears in the context of a unit U2 compiled for instantiation
6320 or inlining purposes, the body of U1 needs to be compiled as well.
6321 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
6322 context is a package declaration.
6323 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
6324 Analyze_Generic_Package_Declaration): ditto.
6325 * inline.adb (Analyze_Inlined_Bodies): Check
6326 Body_Needed_For_Inlining.
6328 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6330 * par.adb (Current_Assign_Node): Global variable use to record
6331 the presence of a target_name in the right hand side of the
6332 assignment being parsed.
6333 * par-ch4.adb (P_Name): If the name is a target_name, mark the
6334 enclosing assignment node accordingly.
6335 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
6337 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
6338 analyzing RHS if the statement has target_names.
6339 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
6340 properly choices that are subtype marks.
6341 * exp_ch5.adb: Code cleanup.
6343 2017-04-25 Bob Duff <duff@adacore.com>
6345 * s-memory.adb: Add a comment regarding efficiency.
6346 * atree.adb: Fix the assertion, and combine 2 assertions into one,
6347 "the source has an extension if and only if the destination does."
6348 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
6350 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6352 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
6355 2017-04-25 Doug Rupp <rupp@adacore.com>
6357 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
6358 handling for ppc64-vx7.
6359 * sigtramp-vxworks-target.inc
6360 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
6362 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6364 * ada_get_targ.adb: New file.
6366 2017-04-25 Bob Duff <duff@adacore.com>
6368 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
6369 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
6370 (UI_GCD): Remove ??? comment involving possible efficiency
6371 improvements. This just isn't important after all these years.
6373 * uintp.ads: Minor cleanup.
6375 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6377 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
6378 Revert previous changes.
6379 * scng.adb: Minor reformatting.
6380 * s-stratt.ads: Fix unbalanced parens in comment.
6382 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6384 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
6387 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6389 * scng.adb (Scan): Handle '@' appropriately.
6390 * sem_ch5.adb: Code cleanup.
6392 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6394 * freeze.adb (Check_Expression_Function): Do not check for the
6395 use of deferred constants if the freezing of the expression
6396 function is triggered by its generated body, rather than a
6399 2017-04-25 Javier Miranda <miranda@adacore.com>
6401 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
6402 subtypes of private types when performing the view conversion.
6404 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6406 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6407 the purposes of freezing.
6408 * exp_util.adb Update the documentation and structure of the
6409 type map used in class-wide semantics of assertion expressions.
6410 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6411 and resolve the triaged expression because all substitutions
6412 refer to the proper entities. Update the replacement of
6414 (Build_DIC_Procedure_Body): Add formal parameter
6415 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6416 are now only processed when freezing occurs. Build a body only
6418 (Entity_Hash): Removed.
6419 (Map_Types): New routine.
6420 (Replace_Object_And_Primitive_References): Removed.
6421 (Replace_References): New routine.
6422 (Replace_Type_References): Moved to the library level of Exp_Util.
6423 (Type_Map_Hash): New routine.
6424 (Update_Primitives_Mapping): Update the mapping call.
6425 (Update_Primitives_Mapping_Of_Types): Removed.
6426 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6427 parameter For_Freeze and update the comment on usage.
6428 (Map_Types): New routine.
6429 (Replace_References): New routine.
6430 (Replace_Type_References): Moved to the library level of Exp_Util.
6431 (Update_Primitives_Mapping_Of_Types): Removed.
6432 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6433 properties of the private type to the full view in case the full
6434 view derives from a parent type and inherits a DIC pragma.
6435 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6436 DIC pragma is placed at the top of a declarative region.
6438 2017-04-25 Tristan Gingold <gingold@adacore.com>
6440 * s-mmap.ads (Data): Add pragma Inline.
6442 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6444 * checks.adb (Insert_Valid_Check): Do not use
6445 a renaming to alias a volatile name because this will lead to
6446 multiple evaluations of the volatile name. Use a constant to
6447 capture the value instead.
6449 2017-04-25 Doug Rupp <rupp@adacore.com>
6451 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
6453 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6455 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
6456 Add out parameter to indicate to caller that a wrapper must
6457 be constructed for an inherited primitive whose inherited
6458 pre/postcondition has called to overridden primitives.
6459 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
6460 for inherited primitive that requires it.
6461 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
6462 legal primitive operations and belong to the list of bodies
6463 generated after the freeze point of a type.
6464 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
6465 of Build_Class_Wide_Expression.
6466 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
6467 to construct the specification of the wrapper subprogram created
6468 for an inherited operation.
6470 2017-04-25 Bob Duff <duff@adacore.com>
6472 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
6473 pthread_mutexattr_setprioceiling): Add new interfaces for these
6475 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
6476 protocols as appropriate for Locking_Policy 'C' and 'I'.
6477 * s-taprop-posix.adb: Minor reformatting to make it more similar
6478 to s-taprop-linux.adb.
6480 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6482 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
6483 Handle properly a multi- level derivation involving both renamed
6484 and constrained parent discriminants, when the type to be
6485 constrained has fewer discriminants that the ultimate ancestor.
6487 2017-04-25 Bob Duff <duff@adacore.com>
6489 * sem_util.adb (Is_Object_Reference): In the
6490 case of N_Explicit_Dereference, return False if it came from a
6491 conditional expression.
6493 2017-04-25 Bob Duff <duff@adacore.com>
6495 * par-ch4.adb (P_Case_Expression): If a semicolon
6496 is followed by "when", assume that ";" was meant to be ",".
6498 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6500 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
6503 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6505 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
6506 loading of an entity.
6507 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
6508 previously repeated in the analysis.
6509 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
6510 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
6511 use new procedure SPARK_Implicit_Load.
6512 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
6513 SPARK_Implicit_Load.
6515 2017-04-25 Javier Miranda <miranda@adacore.com>
6517 * sem_util.adb (New_Copy_Tree): By default
6518 copying of defining identifiers is prohibited because
6519 this would introduce an entirely new entity into the
6520 tree. This patch introduces an exception to this general
6521 rule: the declaration of constants and variables located in
6522 Expression_With_Action nodes.
6523 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
6524 (In_Map): New subprogram.
6525 (Visit_Entity): New subprogram.
6526 (Visit_Node): Handle EWA_Level,
6527 EWA_Inner_Scope_Level, and take care of defining entities defined
6528 in Expression_With_Action nodes.
6530 2017-04-25 Thomas Quinot <quinot@adacore.com>
6532 * exp_ch6.adb: minor comment edit.
6533 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
6534 procedure specifications that come from source.
6535 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
6536 Null_Statement attribute.
6537 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
6538 procedure, generate statement SCO for the generated NULL statement.
6539 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
6540 parser, if available.
6542 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6544 * system-linux-s390.ads: Use Long_Integer'Size to define
6547 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
6549 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
6551 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6553 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
6554 * g-socket.adb (To_Host_Entry): Fix typo in comment.
6555 * gnat_ugn.texi: Fix typo.
6556 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
6557 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
6558 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
6559 * sem_util.adb (Mark_Coextensions): Likewise.
6560 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
6562 2017-03-28 Andreas Schwab <schwab@suse.de>
6565 * system-linux-aarch64-ilp32.ads: New file.
6566 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6567 from LIBGNAT_TARGET_PAIRS.
6568 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6569 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6570 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6571 or -mabi=ilp32, resp.
6573 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
6575 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
6577 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
6580 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
6582 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
6585 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
6587 * system-linux-arm.ads (Default_Bit_Order): Likewise.
6588 * system-linux-mips.ads (Default_Bit_Order): Likewise.
6589 * system-linux-armeb.ads: Delete.
6590 * system-linux-mipsel.ads: Likewise.
6591 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
6592 (ARM/Linux): Likewise.
6594 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6597 * gcc-interface/misc.c (gnat_handle_option): Pass true to
6598 handle_generated_option GENERATED_P.
6600 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6602 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
6603 around a justified modular type if it doesn't have the same scalar
6604 storage order as the enclosing record type.
6606 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6608 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
6609 of boolean rvalues to function calls.
6611 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6613 * gcc-interface/utils.c (fold_bit_position): New function.
6614 (rest_of_record_type_compilation): Call it instead of bit_position to
6615 compute the field position and remove the call to remove_conversions.
6616 (compute_related_constant): Factor out the multiplication in both
6617 operands, if any, and streamline the final test.
6619 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6621 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
6623 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6625 * gcc-interface/decl.c: Include demangle.h.
6626 (is_cplusplus_method): Return again true for a primitive operation
6627 only if it is dispatching. For a subprogram with an interface name,
6628 call the demangler to get the number of C++ parameters and compare it
6629 with the number of Ada parameters.
6631 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6633 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
6634 there is no end label, put the location of the At_End procedure on
6635 the call to the procedure.
6637 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6639 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
6640 value for array types with TYPE_INDEX_TYPE set on their domain type.
6641 * gcc-interface/utils.c (max_size): For operations and expressions, do
6642 not build a new node if the operands have not changed or are missing.
6644 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6646 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
6647 argument when recursing on TRUTH_NOT_EXPR.
6649 2017-02-12 John Marino <gnugcc@marino.st>
6651 * system-freebsd-x86.ads: Rename into...
6652 * system-freebsd.ads: ...this.
6653 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
6654 * gcc-interface/Makefile.in: Support aarch64-freebsd.
6655 (x86-64/FreeBSD): Adjust to above renaming.
6656 (i386/FreeBSD): Likewise.
6658 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
6660 * comperr.adb: Update FSF bug reporting URL.
6662 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
6663 Jakub Jelinek <jakub@redhat.com>
6666 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
6668 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
6671 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
6672 to build_translation_unit_decl.
6674 2017-01-23 Javier Miranda <miranda@adacore.com>
6676 * sem_util.adb (New_Copy_Tree): Code cleanup:
6677 removal of the internal map (ie. variable Actual_Map, its
6678 associated local variables, and all the code handling it).
6679 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
6680 force loading of the System package when processing a task type.
6681 (Analyze_Protected_Type_Declaration): in GNATprove mode force
6682 loading of the System package when processing a protected type.
6683 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
6684 force loading of the System package when processing compilation
6685 unit with a main-like subprogram.
6686 * frontend.adb (Frontend): remove forced loading of the System
6689 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6691 * sem_prag.adb (Default_Initial_Condition): If the desired type
6692 declaration is a derived type declaration with discriminants,
6693 it is rewritten as a private type declaration.
6694 * sem_ch13.adb (Replace_Type_References_Generic,
6695 Visible_Component): A discriminated private type with descriminnts
6696 has components that must be rewritten as selected components
6697 if they appear as identifiers in an aspect expression such as
6698 a Default_Initial_Condition.
6699 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
6702 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6704 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
6705 * gnat1drv.adb Generate an empty object file for an ignored
6706 Ghost compilation unit.
6707 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
6709 2017-01-23 Yannick Moy <moy@adacore.com>
6711 * sem_ch4.adb (Analyze_Indexed_Component_Form):
6712 Adapt to inlined prefix with string literal subtype.
6713 * inline.adb (Expand_Inlined_Call): Keep unchecked
6714 conversion inside inlined call when formal type is constrained.
6716 2017-01-23 Javier Miranda <miranda@adacore.com>
6718 * sem_util.adb (New_Copy_Tree): Code cleanup:
6719 removal of global variables. All the global variables, global
6720 functions and tables of this subprogram are now declared locally.
6722 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6724 * exp_strm.ads: Minor reformatting and typo fixes.
6726 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6728 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
6729 exp_aggr.adb: Minor reformatting.
6730 * g-diopit.adb: minor grammar/punctuation fix in comment.
6731 * g-byorma.ads: minor fix of unbalanced parens in comment.
6733 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6735 * par.adb: Update the documentation of component Labl.
6736 * par-ch6.adb (P_Return_Statement): Set the expected label of
6737 an extended return statement to Error.
6739 2017-01-23 Tristan Gingold <gingold@adacore.com>
6741 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
6743 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6745 * expander.adb: Handle N_Delta_Aggregate.
6747 2017-01-23 Javier Miranda <miranda@adacore.com>
6749 * exp_ch6.adb (Expand_Call): Improve the code that
6750 checks if some formal of the called subprogram is a class-wide
6751 interface, to handle subtypes of class-wide interfaces.
6753 2017-01-23 Javier Miranda <miranda@adacore.com>
6755 * checks.adb (Apply_Parameter_Aliasing_Checks):
6756 Remove side effects of the actuals before generating the overlap
6759 2017-01-23 Justin Squirek <squirek@adacore.com>
6761 * exp_strm.ads, exp_strm.ads
6762 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
6763 as to avoid getting the underlying type by default.
6764 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
6765 underlying type in the Iiput and output attribute cases when
6766 building their respective functions.
6768 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6770 * scng.adb: Minor reformatting of error message.
6772 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6774 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
6775 to freeze the return type of an expression funxtion that is a
6776 completion, if the type is a limited view and the non-limited
6779 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6781 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
6782 aggregate construct.
6783 (P_Record_Or_Array_Component_Association): An array aggregate
6784 can start with an Iterated_Component_Association.
6785 * scng.adb: Modify error message on improper use of @ in earlier
6786 versions of the language.
6787 * sinfo.ads: New node kind N_Delta_Aggregate.
6788 * sinfo.adb: An N_Delta_Aggregate has component associations and
6790 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
6791 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
6792 Create a new index for each one of the choices in the association,
6793 to prevent spurious homonyms in the scope.
6794 (Resolve_Delta_Aggregate): New.
6795 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
6796 * exp_util.adb (Insert_Actions): Take into account
6798 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
6799 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
6800 and local procedures Expand_Delta_Array_Aggregate and
6801 expand_Delta_Record_Aggregate.
6802 * sprint.adb: Handle N_Delta_Aggregate.
6804 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6806 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
6807 empty name when the exception declaration is subject to pragma
6809 (Null_String): New routine.
6811 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6813 * par-ch9.adb (P_Protected_Definition): Parse
6814 any optional and potentially illegal pragmas which appear in
6815 a protected operation declaration list.
6816 (P_Task_Items): Parse
6817 any optional and potentially illegal pragmas which appear in a
6820 2017-01-23 Pascal Obry <obry@adacore.com>
6822 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
6823 is needed when a foreign thread call a Win32 API using a thread handle
6824 like GetThreadTimes() for example.
6826 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6828 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6829 allow an 'Address clause to be specified on a prefix of a
6832 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6834 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6835 attribute 'Valid is a renaming of the original expression when
6836 the expression denotes a name. For all other kinds of expression,
6837 use a constant to capture the value.
6838 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6839 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6841 2017-01-23 Justin Squirek <squirek@adacore.com>
6843 * sem_eval.adb (Eval_Integer_Literal): Add special
6844 case to avoid optimizing out check if the literal appears in
6847 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6849 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6850 allow an 'Address clause to be specified on a prefix of a
6853 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6855 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6856 attribute 'Valid is a renaming of the original expression when
6857 the expression denotes a name. For all other kinds of expression,
6858 use a constant to capture the value.
6859 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6860 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6862 2017-01-23 Justin Squirek <squirek@adacore.com>
6864 * sem_eval.adb (Eval_Integer_Literal): Add special
6865 case to avoid optimizing out check if the literal appears in
6868 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6870 * sem_ch4.adb (Try_Primitive_Operations,
6871 Is_Valid_First_Argument_Of): argument is valid if it is a derived
6872 type with unknown discriminants that matches its underlying
6874 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
6875 expression if its type is derived from a limited type with
6876 unknown discriminants, because the expansion (which is a call)
6877 must be expanded in the enclosing context to add the proper build-
6878 in-place parameters to the call.
6879 * lib.ads, exp_ch9.adb: Minor fixes in comments.
6881 2017-01-23 Yannick Moy <moy@adacore.com>
6883 * frontend.adb (Frontend): Do not load runtime
6884 unit for GNATprove when parsing failed.
6885 * exp_ch9.adb: minor removal of extra whitespace
6886 * exp_ch6.adb: minor typo in comment
6887 * sem_util.adb: Code cleanup.
6888 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
6889 * a-ngcefu.adb: minor style fix in whitespace
6891 2017-01-23 Thomas Quinot <quinot@adacore.com>
6893 * scos.ads: Document usage of 'd' as default SCO kind for
6895 * par_sco.adb (Traverse_Declarations_Or_Statements.
6896 Traverse_Degenerate_Subprogram): New supporting routine for expression
6897 functions and null procedures.
6898 (Traverse_Declarations_Or_Statements.Traverse_One): Add
6899 N_Expression_Function to the subprogram case; add required
6900 support for null procedures and expression functions.
6902 2017-01-23 Bob Duff <duff@adacore.com>
6904 * namet.ads (Bounded_String): Decrease the size of type
6905 Bounded_String to avoid running out of stack space.
6906 * namet.ads (Append): Don't ignore buffer overflow; raise
6907 Program_Error instead.
6909 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6911 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
6912 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
6914 * exp_ch9.adb: minor style fix in comment.
6916 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6918 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
6919 for a limited record extension with unknown discriminants whose
6920 full view has no discriminants.
6922 2017-01-23 Yannick Moy <moy@adacore.com>
6924 * exp_spark.adb: Alphabetize with clauses.
6926 2017-01-23 Yannick Moy <moy@adacore.com>
6928 * sem_util.adb (Has_Enabled_Property): Treat
6929 protected objects and variables differently from other variables.
6931 2017-01-23 Thomas Quinot <quinot@adacore.com>
6933 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
6934 Split original Ada 95 part off into new subprogram
6935 below. Call that subprogram (instead of proceeding with
6936 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
6937 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
6938 * debug.adb Document new switch -gnatd.p
6939 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
6940 record for reverse bit order if an error has already been posted
6941 on the record type. This avoids generating extraneous "info:"
6942 messages for illegal code.
6944 2017-01-23 Justin Squirek <squirek@adacore.com>
6946 * sem_ch3.adb (Analyze_Declarations): Correct comments
6947 * freeze.adb (Find_Constant): Add detection of deferred constants
6948 so they are not incorrectly flagged as premature.
6950 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6952 * scans.ads: New token At_Sign. Remove '@' from list of illegal
6953 characters for future version of the language. '@' is legal name.
6954 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
6955 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
6956 denotes a Target_Name.
6957 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
6958 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
6959 (Has_Target_Names): New flag on N_Assignment_Statement, to
6960 indicate that RHS has occurrences of N_Target_Name.
6961 * sem.adb: Call Analyze_Target_Name.
6962 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
6963 (urrent_LHS): Global variable that denotes LHS of assignment,
6964 used in the analysis of Target_Name nodes.
6965 * sem_res.adb (Resolve_Target_Name): New procedure.
6966 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
6967 N is an assignment statement whose RHS contains occurences of @
6968 that designate the value of the LHS of the assignment. If the
6969 LHS is side-effect free the target names can be replaced with
6970 a copy of the LHS; otherwise the semantics of the assignment
6971 is described in terms of a procedure with an in-out parameter,
6972 and expanded as such.
6973 (Expand_N_Assignment_Statement): Call
6974 Expand_Assign_With_Target_Names when needed.
6975 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
6976 * sprint.adb: Handle N_Target_Name.
6978 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
6980 * checks.adb: Minor fix in comment.
6982 2017-01-23 Philippe Gil <gil@adacore.com>
6984 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
6985 count in Sort = Memory_Usage or Allocations_Count
6987 2017-01-23 Justin Squirek <squirek@adacore.com>
6989 * sem_ch3.adb: Code cleanup.
6991 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6993 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
6994 variables to the local variable section. Update the profile
6995 of various nested routine that previously had visibility
6996 of those globals. One the matching phase has completed,
6997 remove certain classes of clauses which are considered noise.
6998 (Check_Dependency_Clause): Properly detect a match between two
6999 'Result attributes. Update the various post-match cases to use
7000 Is_Already_Matched as this routine now automatically recognizes
7001 a previously matched 'Result attribute.
7002 (Is_Already_Matched): New routine.
7003 (Remove_Extra_Clauses): New routine.
7004 (Report_Extra_Clauses): Remove the detection of ... => null
7005 clauses as this is now done in Remove_Extra_Clauses.
7007 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7009 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
7010 report on spurious overlaps between values involving a subtype
7011 with a static predicate, because the expansion of such a subtype
7012 into individual ranges in inhibited in ASIS mode.
7014 2017-01-23 Justin Squirek <squirek@adacore.com>
7016 * sem_ch3.adb (Analyze_Declarations): Add detection
7017 of an edge case and delay freezing if it is present.
7019 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7021 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
7022 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
7024 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7026 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
7027 access-to-subprogram types inherit the convention of the
7028 associated subprogram. (Set_Profile_Convention): New routine.
7029 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
7030 of the two entities directly, use Conventions_Match to account
7031 for anonymous access-to-subprogram and subprogram types.
7032 (Conventions_Match): New routine.
7034 2017-01-23 Claire Dross <dross@adacore.com>
7036 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
7037 which return Universal_Integer, force the overflow check flag for
7038 Length and Range_Length for types as big as Long_Long_Integer.
7040 2017-01-23 Claire Dross <dross@adacore.com>
7042 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
7043 attributes which return Universal_Integer, introduce a conversion
7044 to the expected type with the appropriate check flags set.
7045 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
7046 base type if the range is null. It may still be invalid if it
7047 is higher than the lower bound. This is checked later in the
7048 context in which the range appears.
7050 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
7052 * scos.ads: Introduce a constant to represent ignored
7053 dependencies in SCO_Unit_Table_Entry.
7055 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7057 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
7058 spaces from error messages.
7060 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7062 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
7063 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
7064 an object declaration for an array type with a modular index type
7065 with the size of Long_Long_Integer. Special processing is needed
7066 in this case to compute reliably the size of the object, and
7067 eventually to raise Storage_Error, when wrap-around arithmetic
7068 might compute a meangingless size for the object.
7070 2017-01-23 Justin Squirek <squirek@adacore.com>
7072 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
7073 sem_type.adb: Code cleanups.
7075 2017-01-23 Bob Duff <duff@adacore.com>
7077 * sem_res.adb (Resolve_Call): In the part of the code where
7078 it is deciding whether to turn the call into an indexed
7079 component, avoid doing so if the call is to an instance of
7080 Unchecked_Conversion. Otherwise, the compiler turns it into an
7081 indexed component, and resolution of that turns it back into a
7082 function call, and so on, resulting in infinite recursion.
7083 * sem_util.adb (Needs_One_Actual): If the first formal has a
7084 default, then return False.
7086 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
7088 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
7089 optimizations when the type is modular and the offsets are equal.
7091 2017-01-20 Thomas Quinot <quinot@adacore.com>
7093 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
7096 2017-01-20 Nicolas Roche <roche@adacore.com>
7098 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
7100 2017-01-20 Bob Duff <duff@adacore.com>
7102 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
7103 (etc) optimizations when the type is modular.
7105 2017-01-20 Yannick Moy <moy@adacore.com>
7107 * sem_ch6.adb (Move_Pragmas): move some pragmas,
7108 but copy the SPARK_Mode pragma instead of moving it.
7109 (Build_Subprogram_Declaration): Ensure that the generated spec
7110 and original body share the same SPARK_Pragma aspect/pragma.
7111 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
7112 procedure to copy SPARK_Mode aspect.
7114 2017-01-20 Bob Duff <duff@adacore.com>
7116 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
7118 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
7119 Empty even in ASIS mode.
7121 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7123 * exp_ch9.adb: minor style fixes in comments.
7124 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
7125 relative statement introduces an implicit dependency on
7126 Ada.Real_Time.Clock_Time.
7127 * sem_util.adb: Minor reformatting.
7129 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7131 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
7132 must be treated as delayed aspect even if the expression is
7133 a literal, because the aspect affects the freezing and the
7134 elaboration of the object to which it applies.
7136 2017-01-20 Tristan Gingold <gingold@adacore.com>
7138 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
7140 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7142 * lib-xref.adb (Generate_Reference): Do not warn about the
7143 presence of a pragma Unreferenced if the entity appears as the
7144 actual in a procedure call that does not come from source.
7146 2017-01-20 Pascal Obry <obry@adacore.com>
7148 * expect.c, terminals.c: Fix some warnings about unused variables.
7149 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
7152 2017-01-20 Bob Duff <duff@adacore.com>
7154 * exp_attr.adb (Constrained): Apply an access check (check that
7155 the prefix is not null) when the prefix denotes an object of an
7156 access type; that is, when there is an implicit dereference.
7158 2017-01-20 Gary Dismukes <dismukes@adacore.com>
7160 * s-rident.ads (constant Profile_Info): Remove
7161 No_Calendar from GNAT_Extended_Ravenscar restrictions.
7163 2017-01-20 Tristan Gingold <gingold@adacore.com>
7165 * s-maccod.ads: Add pragma No_Elaboration_Code_All
7167 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7169 * ghost.adb (Mark_Ghost_Clause): New routine.
7170 (Prune_Node): Do not prune compilation unit nodes.
7171 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
7172 This does not touch the node itself, but does prune all its fields.
7173 * ghost.ads (Mark_Ghost_Clause): New routine.
7174 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
7175 package clause mentions Ghost and non-Ghost packages. Mark a
7176 use package clause as Ghost when it mentions a Ghost package.
7177 (Analyze_Use_Type): Emit an error when a use type clause mentions
7178 Ghost and non-Ghost types. Mark a use type clause as Ghost when
7179 it mentions a Ghost type.
7180 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
7181 Ghost when it withs a Ghost unit.
7183 2017-01-20 Javier Miranda <miranda@adacore.com>
7185 * sem_res.adb (Resolve_Call): If a function call
7186 returns a limited view of a type and at the point of the call the
7187 function is not declared in the extended main unit then replace
7188 it with the non-limited view, which must be available. If the
7189 called function is in the extended main unit then no action is
7190 needed since the back-end handles this case.
7192 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
7194 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
7195 (Contains_Subprograms_Refs): ...this. Adjust comment
7196 for constants. (Is_Subp_Or_Const_Ref): Rename into...
7197 (Is_Subprogram_Ref): ...this.
7198 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
7199 Has_Non_Subprograms_Referencer and adjust comment. Remove
7200 incorrect shortcut for package declarations and bodies.
7202 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7204 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
7205 base type differs from that of the completion and the private
7206 subtype is an itype (created for a constraint on an access
7207 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
7210 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7212 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7213 When inheriting the SPARK_Mode of a prior expression function,
7214 look at the properly resolved entity rather than the initial
7215 candidate which may denote a homonym.
7217 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7219 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
7220 Precondition or Postcondition, and the context is pragma
7221 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
7222 and suggest the standard names Assertion_Policy /Pre /Post
7225 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7227 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
7229 2017-01-20 Javier Miranda <miranda@adacore.com>
7231 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
7233 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
7234 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
7237 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7239 * sem_ch13.adb (Analyze_Aspect_Specification, case
7240 Dynamic_Predicate): If the entity E is a subtype that inherits
7241 a static predicate for its parent P,, the inherited and the
7242 new predicate combine in the generated predicate function,
7243 and E only has a dynamic predicate.
7245 2017-01-20 Tristan Gingold <gingold@adacore.com>
7247 * s-boustr.ads, s-boustr.adb: New package.
7248 * Makefile.rtl: Add s-boustr.
7250 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7252 * inline.adb (Process_Formals): Qualify the
7253 expression of a return statement when it yields a universal type.
7255 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7257 * freeze.adb (Freeze_All): Freeze the default
7258 expressions of all eligible formal parameters that appear in
7259 entries, entry families, and protected subprograms.
7261 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7263 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
7264 for illegal inherited Implicit_Dereference aspects with renamed
7267 2017-01-20 Javier Miranda <miranda@adacore.com>
7269 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
7270 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
7271 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
7272 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
7273 Set_Prev, Tree_Read): Adding assertion.
7274 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
7275 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
7276 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
7277 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
7278 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
7279 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
7280 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
7281 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
7282 Set_ListN_With_Parent): Adding assertion.
7284 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7286 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
7287 import that applies to several homograph subprograms. when one
7288 of them is declared by a subprogram body.
7290 2017-01-20 Justin Squirek <squirek@adacore.com>
7292 * exp_ch6.adb (Expand_Call): Remove optimization
7293 that nulls out calls to null procedures.
7295 2017-01-20 Yannick Moy <moy@adacore.com>
7297 * inline.adb (Expand_Inlined_Call): Keep more
7298 precise type of actual for inlining whenever possible. In
7299 particular, do not switch to the formal type in GNATprove mode in
7300 some case where the GNAT backend might require it for visibility.
7302 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7304 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
7305 aspect Implicit_Dereference can be inherited by a full view if
7306 the partial view has no discriminants, because there is no way
7307 to apply the aspect to the partial view.
7308 (Build_Derived_Record_Type): If derived type renames discriminants
7309 of the parent, the new discriminant inherits the aspect from
7311 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
7312 call through an access discriminant designating a subprogram.
7313 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
7314 properly a parameterless call through an access discriminant on
7315 the left-hand side of an assignment.
7316 * sem_res.adb (resolve): If an interpreation involves a
7317 discriminant with an implicit dereference and the expression is an
7318 entity, resolution takes place later in the appropriate routine.
7319 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
7320 access discriminants that designate a subprogram type.
7322 2017-01-20 Pascal Obry <obry@adacore.com>
7324 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
7326 2017-01-20 Yannick Moy <moy@adacore.com>
7328 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
7329 on implicitly with'ed units in GNATprove mode.
7330 * sinfo.ads (Implicit_With): Document use of flag for implicitly
7331 with'ed units in GNATprove mode.
7333 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7335 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
7336 unit Do not report an error on a non-static entity that appears
7337 in the context of a spec expression, such as an aspect expression.
7339 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7341 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
7342 (Is_Underlying_Full_View): New routine.
7343 (Set_Is_Underlying_Full_View): New routine.
7344 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
7345 * einfo.ads Add new attribute Is_Underlying_Full_View.
7346 (Is_Underlying_Full_View): New routine along with pragma Inline.
7347 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
7348 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
7349 class-wide types and underlying full views. The first subtype
7350 is used as the working type for all Itypes, not just array base types.
7351 (Build_DIC_Procedure_Declaration): Do not consider
7352 class-wide types and underlying full views. The first subtype
7353 is used as the working type for all Itypes, not just array
7355 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
7356 view or an underlying full view without clobbering the attributes
7357 of a previous freeze node.
7358 (Inherit_Freeze_Node): New routine.
7359 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
7361 (Build_Underlying_Full_View): Mark an underlying full view as such.
7362 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
7365 2017-01-20 Yannick Moy <moy@adacore.com>
7367 * sinfo.ads: Document lack of Do_Division_Check flag
7368 on float exponentiation.
7370 2017-01-19 Javier Miranda <miranda@adacore.com>
7372 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
7373 identifier attribute of a block-statement node. Required to avoid
7374 assertion failure when building the new containers library.
7376 2017-01-19 Bob Duff <duff@adacore.com>
7378 * exp_ch3.adb: Update comment.
7380 2017-01-19 Vincent Celier <celier@adacore.com>
7382 * gprep.adb (Gnatprep): Parse the definition file without
7383 "replace in comments" even when switch -C is used.
7385 2017-01-19 Justin Squirek <squirek@adacore.com>
7387 * exp_ch9.adb (Is_Pure_Barrier): Create function
7388 Is_Count_Attribute to identify an expansion of the 'Count
7391 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7393 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
7394 statements within an element iterator loop are only analyzed
7395 agter the loop is rewritten. Within a generic the analysis must
7396 be performed in any case to complete name capture.
7398 2017-01-19 Bob Duff <duff@adacore.com>
7400 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
7401 before checking for unrecognized pragmas.
7402 Initialize Pname on its declarations; that's always good style.
7404 2017-01-19 Claire Dross <dross@adacore.com>
7406 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
7407 body into the tree for GNATprove by setting its Parent field. The
7408 components invariants of composite types are not checked by
7409 the composite type's invariant procedure in GNATprove mode.
7410 (Build_Invariant_Procedure_Declaration): Semi-insert the
7411 declaration into the tree for GNATprove by setting its Parent
7413 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
7414 the component invariants to the array type invariant procedure
7415 so that the procedure can be used to check the array type
7417 (Freeze_Record_Type): In GNATprove mode, do
7418 not add the component invariants to the record type invariant
7419 procedure so that the procedure can be used to check the record
7420 type invariants if any.
7422 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7424 * lib-xref-spark_specific.adb: Minor reformatting.
7425 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
7427 2017-01-19 Javier Miranda <miranda@adacore.com>
7429 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
7430 Build_Back_End_Aggregate.
7431 (Generate_Aggregate_For_Derived_Type): Code cleanup.
7432 (Prepend_Stored_Values): Code cleanup.
7434 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7436 * sem_ch6.adb (Analyze_Expression_Function): Check for an
7437 incomplete return type after attempting to freeze it, so that
7438 other freeze actiona are generated in the proper order.
7440 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7442 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
7443 type, ie. a type whose component is a character type, and the
7444 aggregate is positional, do not convert into a string literal
7445 if the index type is not an integer type, because the original
7446 type may be required in an enclosing operation.
7448 2017-01-19 Bob Duff <duff@adacore.com>
7450 * binde.adb, debug.adb: Enable new elaboration order algorithm
7451 by default. -dp switch reverts to the old algorithm.
7453 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7455 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
7456 (Analyze_Declarations): Create the DIC and Invariant
7457 procedure bodies s after all freezing has taken place.
7458 (Build_Assertion_Bodies): New routine.
7459 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
7461 (Analyze_Package_Specification): Remove the
7462 generation of the DIC and Invariant procedure bodies. This is
7463 now done by Analyze_Declarations.
7464 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
7465 procedures are never treated as primitives.
7467 2017-01-19 Yannick Moy <moy@adacore.com>
7469 * frontend.adb: Analyze inlined bodies and check elaboration
7470 rules in GNATprove mode too.
7471 * sem_elab.adb (Delay_Element): Add Boolean component to save
7472 indication that call is in SPARK code. (Check_Elab_Calls):
7473 Check elaboration rules in GNATprove mode, and correctly set
7474 the current value of SPARK_Mode.
7475 * lib-xref-spark_specific.adb
7476 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
7478 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7480 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
7481 checks on the expression for the high bound of concatenation
7482 when checks are disabled, to suppress warnings about potential
7483 constraint errors in restricted runtimes.
7485 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7487 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
7488 representation-to-position function as inlined.
7489 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
7490 the purity of an internally generated entity if it has been
7491 explicitly marked as pure for optimization purposes.
7492 * exp_aggr.adb: Minor reformatting.
7494 2017-01-19 Javier Miranda <miranda@adacore.com>
7496 * exp_ch6.adb (Expand_Call): Remove side effects on
7497 actuals that are allocators with qualified expression since the
7498 initialization of the object is performed by means of individual
7499 statements (and hence it must be done before the call).
7501 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7503 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
7504 (Build_Derived_Enumeration_Type): If the derived type inherits a
7505 dynamic predicate from its parent, the bounds of the type must
7506 freeze because an explicit constraint is constructed for the
7507 type and the corresponding range is elaborated now.
7509 2017-01-19 Arnaud Charlet <charlet@adacore.com>
7511 * sem_attr.ads: minor fix of inconsistent casing in comment
7512 * lib-writ.ads: minor align comments in columns
7513 * sem_ch3.adb: Minor reformatting.
7514 * spark_xrefs.ads: minor fix typo in SPARK-related comment
7515 * table.ads: minor style fix in comment
7516 * lib-xref-spark_specific.adb
7517 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
7518 * sem_ch12.adb: minor whitespace fix
7519 * freeze.adb: Add comment.
7520 * sem_util.adb (Unique_Name): for instances of
7521 generic subprograms ignore the name of the wrapper package.
7523 2017-01-19 Javier Miranda <miranda@adacore.com>
7525 * exp_aggr.adb (Resolve_Record_Aggregate):
7526 Factorize code needed for aggregates of limited and unlimited
7527 types in a new routine.
7528 (Pass_Aggregate_To_Back_End): New subprogram.
7530 2017-01-19 Yannick Moy <moy@adacore.com>
7532 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
7534 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7536 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
7537 public, for use elsewhere.
7538 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
7539 an Inlined_body, recognize a call that uses object notation
7540 and has not been rewritten as a regular call because regular
7541 expansion has not taken place.
7543 2017-01-19 Bob Duff <duff@adacore.com>
7545 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
7546 in case of generic formal discrete types, because it causes crashes in
7547 the compiler when built with assertions on.
7549 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7551 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
7552 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
7554 2017-01-19 Bob Duff <duff@adacore.com>
7556 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
7557 Increment Warnings_Detected. It was decrementing, which is
7558 wrong since we just issued a warning message.
7559 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
7560 these variables to be of subtype Nat instead of Int, because
7561 they should never be negative.
7563 2017-01-19 Javier Miranda <miranda@adacore.com>
7565 * contracts.adb (Build_Postconditions_Procedure): Replace
7566 Generate_C_Code by Modify_Tree_For_C.
7567 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
7568 Replace Generate_C_Code by Modify_Tree_For_C.
7569 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
7571 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
7572 Generate_C_Code by Modify_Tree_For_C.
7573 * exp_ch4.adb (Expand_Allocator_Expression): Replace
7574 Generate_C_Code by Modify_Tree_For_C.
7575 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
7576 by Modify_Tree_For_C.
7577 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
7578 Generate_C_Code by Modify_Tree_For_C.
7579 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
7580 by Modify_Tree_For_C.
7581 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
7583 2017-01-19 Javier Miranda <miranda@adacore.com>
7585 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
7587 (Is_Inlinable_Expression_Function): New subprogram.
7588 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
7590 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
7592 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7594 * sem_ch4.adb (Diagnose_Call): Improve error message when a
7595 selected component has a prefix that might be interpreted
7596 as a parameterless function call, but none of the candidate
7597 interpretations is parameterless, and there is a hidden homonym
7598 of the prefix that is a package.
7599 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
7600 interpreted as a parameterless function call and its analysis
7601 fails, do not call Analyze_Selected_Component.
7603 2017-01-19 Steve Baird <baird@adacore.com>
7605 * sem_util.ads: Add new Use_Full_View Boolean parameter to
7607 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
7608 calls to a newly-defined Scalar_Range_Of_Right_View function.
7610 2017-01-19 Arnaud Charlet <charlet@adacore.com>
7612 * gnat1drv.adb: minor fix of unbalanced parens in comment
7613 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
7614 to visible part of the package to allow re-use in GNATprove.
7615 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
7616 from repeated code of Traverse_Compilation_Unit.
7617 (Traverse_Declaration_Or_Statement): fixed detection of
7618 generic subprograms and packages; also, iteration over case
7619 statement alternatives rewritten to avoid testing if the first
7620 alternative is present (since it must be present due to Ada
7621 syntax restrictions).
7623 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7625 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
7626 returning by reference not just for subprogram body stubs,
7627 but for all subprogram cases.
7628 * sem_util.adb: Code reformatting.
7629 (Requires_Transient_Scope): Update the call to Results_Differ.
7630 (Results_Differ): Update the parameter profile and the associated
7633 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7635 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
7636 identifier nodes that do not come from source, to handle properly
7637 dimensionality check within an inlined body which inclddes both
7638 original operands and rewritten operands. This removes spurious
7639 dimensionality errors in the presence of front-end inlining,
7640 as well as in SPARK mode.
7642 2017-01-16 Jakub Jelinek <jakub@redhat.com>
7645 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
7647 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7649 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
7651 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7653 * doc/gnat_ugn/getting_started_with_gnat.rst,
7654 doc/gnat_ugn/inline_assembler.rst,
7655 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7656 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
7657 doc/gnat_ugn/about_this_guide.rst,
7658 doc/gnat_ugn/platform_specific_information.rst,
7659 doc/gnat_ugn/example_of_binder_output.rst,
7660 doc/gnat_ugn/gnat_and_program_execution.rst,
7661 doc/gnat_ugn/gnat_utility_programs.rst,
7662 doc/gnat_ugn/the_gnat_compilation_model.rst,
7663 doc/gnat_rm/implementation_defined_attributes.rst,
7664 doc/gnat_rm/compatibility_and_porting_guide.rst,
7665 doc/gnat_rm/standard_library_routines.rst,
7666 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
7667 doc/gnat_rm/implementation_defined_pragmas.rst,
7668 doc/gnat_rm/the_gnat_library.rst,
7669 doc/gnat_rm/obsolescent_features.rst,
7670 doc/gnat_rm/about_this_guide.rst,
7671 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
7672 doc/gnat_rm/implementation_of_ada_2012_features.rst,
7673 doc/gnat_rm/interfacing_to_other_languages.rst,
7674 doc/gnat_rm/implementation_defined_aspects.rst,
7675 doc/gnat_rm.rst: Update documentation.
7676 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
7678 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7680 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
7681 * scil_ll.adb: Minor style fix in comment.
7682 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
7683 even if entity is already set, because the node may be renalyzed
7684 after inlining transformations.
7686 2017-01-13 Javier Miranda <miranda@adacore.com>
7688 * sem_res.adb (Resolve_Call): Do not establish a transient scope
7689 for a call to inlinable expression function (since the call will
7690 be replaced by its returned object).
7691 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
7692 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
7693 (Expand_Call): For inlinable expression function call replace the
7694 call by its returned object.
7695 (Is_Inlinable_Expression_Function): New subprogram.
7697 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7699 * checks.adb: Minor typo fix and reformatting.
7701 2017-01-13 Javier Miranda <miranda@adacore.com>
7703 * contracts.adb (Contract_Only_Subprograms): Remove formal.
7704 (Copy_Original_Specification): Removed.
7705 (Skip_Contract_Only_Subprogram): Move here checks previously
7706 located in the caller of this routine (to leave the code more clean).
7707 (Build_Contract_Only_Subprogram): Code cleanup.
7708 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
7709 (Get_Contract_Only_Missing_Body_Name): Removed.
7711 2017-01-13 Javier Miranda <miranda@adacore.com>
7713 * sem_ch6.adb (Cloned_Expression): New subprogram.
7714 (Freeze_Expr_Types): Complete previous patch since the expression
7715 of an expression-function may have iterators and loops with
7716 defining identifiers which, as part of the preanalysis of the
7717 expression, may be left decorated with itypes that will not be
7718 available in the tree passed to the backend.
7720 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7722 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
7723 conversion to Integer of an expression that is an attribute
7724 reference 'Pos on an enumeration type.
7726 2017-01-13 Bob Duff <duff@adacore.com>
7728 * atree.ads: Minor comment fix.
7730 2017-01-13 Justin Squirek <squirek@adacore.com>
7732 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
7733 calls in accessibility check on return statement.
7735 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7737 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7738 Ensure that the input body is a subprogram body before trying to
7739 determine whether it denoted an expression function. Note that
7740 subprogram body stubs cannot denote expression functions.
7742 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7744 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
7747 2017-01-13 Javier Miranda <miranda@adacore.com>
7749 * einfo.ads (Component_Bit_Offset): Fix documentation.
7750 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
7751 on record holes for components with unknown compile-time offsets.
7753 2017-01-13 Bob Duff <duff@adacore.com>
7755 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
7756 * g-locfil.ads: Minor comment fix.
7758 2017-01-13 Bob Duff <duff@adacore.com>
7760 * binde.adb (Elab_New): New elaboration order algorithm
7761 that is expected to cause fewer ABE issues. This is a work in
7762 progress. The new algorithm is currently disabled, and can be
7763 enable by the -dp switch, or by modifying the Do_Old and Do_New
7764 etc. flags and rebuilding. Experimental code is included to
7765 compare the results of the old and new algorithms.
7766 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
7767 can have multiple of these tables, so the old and new algorithms
7769 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
7770 parameter of type array. This avoids the global variable, and
7771 allows bounds checking (which is normally defeated by the tables
7772 packages). It also ensures that the Elab_Order is read-only
7774 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
7775 subprograms that need it, as above.
7776 * debug.adb: Document new -dp switch. Modify doc of old -do
7778 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
7779 and Bindgen. Move writing of closure (-R and -Ra switches)
7780 to Binde; that's more convenient.
7782 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7784 * sem_ch6.adb (Analyze_Expression_Function): If the expression
7785 function is a completion, all entities referenced in the
7786 expression are frozen. As a consequence, a reference to an
7787 uncompleted private type from an enclosing scope is illegal.
7789 2017-01-13 Javier Miranda <miranda@adacore.com>
7791 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
7792 (Analyze_Subprogram_Body_Helper): At the occurrence of an
7793 expression function declaration that is a completion, its
7794 expression causes freezing (AI12-0103).
7796 2017-01-13 Vadim Godunko <godunko@adacore.com>
7798 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
7799 Reference functions of Ada.Containers.Indefinite_Holders.
7801 2017-01-13 Bob Duff <duff@adacore.com>
7803 * s-os_lib.ads: Minor comment fixes.
7805 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7807 * exp_ch3.adb (Default_Initialize_Object): Do not default
7808 initialize an object when it is of a task type and restriction
7809 No_Tasking is in effect because the initialization is obsolete.
7810 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
7811 restriction No_Tasking is in effect.
7812 (Build_Master_Renaming): Do not rename a master when restriction
7813 No_Tasking is in effect.
7815 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7817 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
7818 the legality of An others clause applies as well to a choice in
7819 an Iterated_component_ association.
7820 (Resolve_Iterated_Component_Association): An others choice
7822 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
7823 Iterated_Component_Association is not static.
7825 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7827 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
7828 control is passed to the expresion handler before the new mode
7830 * sem_ch12.adb (Analyze_Package_Instantiation,
7831 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
7832 in case control is passed to the expresion handler before the
7835 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7837 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
7838 exp_aggr.adb: Minor reformatting.
7840 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7842 * inline.adb: Minor reformatting and typo fix.
7844 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7846 * sem_util.ads, sem_util.adb (Choice_List): Move function here
7847 from sem_aggr.adb, for use elsewhere.
7848 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
7849 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
7850 Iterated_Component_Present.
7851 * exp_aggr.adb: Use Choice_List throughout, to handle
7852 Iterated_Component_Associations.
7853 (Gen_Loop): Generate proper loop for an
7854 Iterated_Component_Association: loop variable has the identifier
7855 of the original association. Generate a loop even for a single
7856 component choice, in order to make loop parameter visible in
7858 (Flatten): An Iterated_Component_Association is not static.
7860 2017-01-13 Yannick Moy <moy@adacore.com>
7862 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
7863 float exponentiation for statically known small negative values
7864 is the reciprocal of the exponentiation for the opposite value
7866 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
7867 Ensure that the value of float exponentiation for negative values
7868 is the reciprocal of the exponentiation for the opposite value
7870 * inline.adb (Expand_Inlined_Call): Fix the count
7871 for the number of generated gotos.
7873 2017-01-13 Yannick Moy <moy@adacore.com>
7875 * inline.adb: Code cleanup.
7876 * sem_util.adb (Is_OK_Volatile_Context): Add
7877 expression in delay statement as OK for volatile context.
7879 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7881 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
7882 mode a choice that is a subtype with a static predicate is
7883 replaced by the values it covers. This transformation must not
7884 be performed in ASIS mode, to preserve the source for analysis.
7886 2017-01-13 Justin Squirek <squirek@adacore.com>
7888 * nlists.ads: Correct minor typo.
7890 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7892 * sem_ch13.adb: Minor reformatting and typo fix.
7894 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7896 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
7897 Iterated_Component_Association is a named association in an
7899 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
7900 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
7901 and resolve the discrete choices and the expression of the
7903 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
7904 Loop_Actions and Box_Present are attributes of
7905 N_Iterated_Component_Association nodes. Box_Present is always
7907 * sprint.adb (Sprint_Node): An Iterated_Component_Association
7908 has a Discrete_Choices list, as specified in the RM. A
7909 Component_Association for aggregate uses instead a Choices list.
7910 We have to live with this small inconsistency because the new
7911 construct also has a defining identifier, and there is no way
7912 to merge the two node structures.
7914 2017-01-13 Yannick Moy <moy@adacore.com>
7916 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
7917 list of pragmas to remove. Remove pragmas from the list of
7918 statements in the body to inline.
7919 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
7921 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7923 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
7924 Analyze_Declarations, to analyze and resolve the expressions of
7925 aspect specifications in the current declarative list, so that
7926 the expressions have proper entity and type info. This is needed
7927 for ASIS when there is no subsequent expansion to generate this
7928 semantic information.
7929 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
7930 original expression, to suppress cascaded errors when expression
7931 has been constant-folded.
7932 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
7933 ASIS mode, because there is no subsequent expansion to decorate
7936 2017-01-13 Yannick Moy <moy@adacore.com>
7938 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
7939 New function to detect when a call may be inlined or not in
7941 (Expand_Inlined_Call): Ensure that a temporary
7942 is always created in the cases where a type conversion may be
7943 needed on an input parameter in GNATprove mode, so that GNATprove
7944 sees the check to perform.
7945 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
7946 when not applicable due to actual requiring type conversion
7947 with possible check but no temporary value can be copied for
7948 GNATprove to see the check.
7950 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7952 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
7953 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
7954 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
7955 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
7956 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
7957 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
7958 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
7959 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
7960 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
7961 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
7962 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
7963 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
7964 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
7965 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
7966 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
7967 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
7968 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
7969 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
7970 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
7971 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
7972 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
7973 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
7974 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
7975 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
7976 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
7977 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
7978 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
7979 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
7980 statements to reflect the new style for case alternatives. Various
7981 code clean up and reformatting.
7983 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7985 * exp_util.adb: Minor reformatting.
7987 2017-01-13 Yannick Moy <moy@adacore.com>
7989 * exp_spark.adb: Code cleanup.
7990 * sem_ch9.adb (Analyze_Delay_Until): Resolve
7991 expression so that calls are identified as such inside delay
7994 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7996 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
7997 * par-ch3.adb (P_Discrete_Choice_List): An
7998 Iterated_Component_Association is an array aggregate component.
7999 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
8000 (Is_Quantified_Expression): New function that performs a lookahead
8001 to distinguish quantified expressions from iterated component
8003 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
8005 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
8006 * sem.adb (Analyze): Handle Iterated_Component_Association.
8007 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
8008 component associations.
8009 * sinfo.ads, sinfo.adb: Entries for for
8010 N_Iterated_Component_Association and its fields.
8011 * sprint.adb (Sprint_Node_Actual): Handle
8012 N_Iterated_Component_Association.
8014 2017-01-13 Justin Squirek <squirek@adacore.com>
8016 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
8017 of the style check until after preanalysis of acutals.
8019 2017-01-13 Yannick Moy <moy@adacore.com>
8021 * sem_ch13.adb: Minor reformatting.
8022 * par-ch11.adb: minor style fix in whitespace
8023 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
8024 reduced to Add_Artificial_ALI_File; style fix in declaration of
8025 Text; grammar fix in comment.
8026 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
8027 * freeze.adb: Cleanup to pass pragma instead of
8029 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
8030 replace System'To_Address by equivalent call.
8032 2017-01-13 Arnaud Charlet <charlet@adacore.com>
8034 * bindusg.adb: Improve usage output for -f switch.
8036 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8038 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
8041 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8043 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
8044 treat comparisons on strings as legal in a Static_Predicate.
8045 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
8046 a function call that is the expansion of a string comparison.The
8047 function call is built when compiling the corresponding predicate
8048 function, but the expression has been found legal as a static
8049 predicate during earlier analysis.
8050 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
8051 properly a function call that is the expansion of a string
8052 comparison operation, in order to recover the Static_Predicate
8053 expression and apply it to a static argument when needed.
8055 2017-01-13 Tristan Gingold <gingold@adacore.com>
8057 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
8058 (Open_Read): Re-implement using Open_Read_No_Exception.
8059 (Open_Write): Raise exception in case of error.
8060 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
8061 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
8063 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
8065 2017-01-13 Yannick Moy <moy@adacore.com>
8067 * checks.adb: Code cleanup.
8069 2017-01-13 Yannick Moy <moy@adacore.com>
8071 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
8072 expression instead of unanalyzed aspect expression for checking
8073 the validity of inheriting an operation. Also copy the expression
8074 being passing it to Build_Class_Wide_Expression, as this call
8075 modifies its argument.
8076 * sem_util.ads Fix comment to reference correct function name
8079 2017-01-13 Javier Miranda <miranda@adacore.com>
8081 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
8082 when we propagate information about the indexes back to the original
8083 indexing mode and the prefix of the index is a function call, do not
8084 remove any parameter from such call.
8086 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8088 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
8089 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
8090 a build-in-place function whose result type is tagged.
8092 2017-01-13 Yannick Moy <moy@adacore.com>
8094 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
8095 Do not generate a wrapper when the only candidate is a class-wide
8097 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
8098 inside a generic context.
8100 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8102 * exp_util.adb (Add_Inherited_Tagged_DIC):
8103 Pass the object parameters of both the parent and the derived
8104 type DIC procedure to the reference replacement circuitry.
8105 (Find_DIC_Type): Modify the circuitry to present the partial
8106 view of a private type in case the private type defines its own
8108 (Replace_Object_And_Primitive_References): Add two
8109 optional formal parameters. Update the comment on usage. Update
8110 the replacement of references to object parameters.
8112 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8114 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
8116 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8118 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
8119 an out parameter that is a type conversion, independently of th
8120 range check that may apply to the expression of the conversion,
8121 for use in GNATProve.
8123 2017-01-13 Yannick Moy <moy@adacore.com>
8125 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
8126 GNATprove_Mode here to Frontend.
8127 * frontend.adb (Frontend): Move the implicit with for System
8128 in GNATprove_Mode here as it ismore correct this way; the old
8129 place only worked by chance, since there were no overloaded names.
8130 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
8131 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
8132 four attributes identified in SRM 9(18), add an implicit with
8133 to Ada.Task_Identification.
8134 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
8135 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
8137 * checks.adb (Apply_Discriminant_Check,
8138 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
8139 In GNATprove mode, we do not apply the checks, but we still
8140 analyze the expression to possibly issue errors on SPARK
8141 code when a run-time error can be detected at compile time.
8142 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
8145 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8147 * expander.adb (Expand): Add a warning about using return
8148 statements in Ghost management code.
8149 * exp_ch3.adb (Freeze_Type): Add a warning about using return
8150 statements in Ghost management code.
8151 * exp_ch7.adb (Build_Invariant_Procedure_Body,
8152 Build_Invariant_Procedure_Declaration): Add a warning about
8153 using return statements in Ghost management code.
8154 * exp_disp.adb (Make_DT): Add a warning about using return
8155 statements in Ghost management code.
8156 * exp_util.adb (Build_DIC_Procedure_Body,
8157 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
8158 warning about using return statements in Ghost management code.
8159 * freeze.adb (Freeze_Entity): Add a warning about using return
8160 statements in Ghost management code.
8161 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
8162 statements in Ghost management code.
8163 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
8164 a warning about using return statements in Ghost management code.
8165 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
8166 return statements in Ghost management code.
8167 * sem_ch6.adb (Analyze_Procedure_Call,
8168 Analyze_Subprogram_Body_Helper): Add a warning about using return
8169 statements in Ghost management code.
8170 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
8171 using return statements in Ghost management code.
8172 * sem_ch12.adb (Analyze_Package_Instantiation,
8173 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
8174 Instantiate_Subprogram_Body): Add a warning about using return
8175 statements in Ghost management code.
8176 * sem_ch13.adb (Build_Predicate_Functions,
8177 Build_Predicate_Function_Declarations): Add a warning about
8178 using return statements in Ghost management code.
8179 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
8180 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
8181 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
8182 using return statements in Ghost management code.
8184 2017-01-13 Tristan Gingold <gingold@adacore.com>
8186 * s-mmosin-mingw.adb: Fix pragma import.
8188 2017-01-13 Arnaud Charlet <charlet@adacore.com>
8190 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
8193 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8195 * atree.adb (Allocate_Initialize_Node): A newly created node is
8196 no longer marked as Ghost at this level.
8197 (Mark_New_Ghost_Node): New routine.
8198 (New_Copy): Mark the copy as Ghost.
8199 (New_Entity): Mark the entity as Ghost.
8200 (New_Node): Mark the node as Ghost.
8201 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
8202 apply to unanalyzed entities.
8203 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
8205 (Set_Is_Checked_Ghost_Entity): This attribute now
8206 applies to all entities as well as unanalyzed entities.
8207 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
8208 all entities as well as unanalyzed entities.
8209 * expander.adb Add with and use clauses for Ghost.
8210 (Expand): Install and revert the Ghost region associated with the node
8212 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
8213 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
8214 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
8215 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
8216 (Freeze_Type): Install and revert the Ghost region associated
8217 with the type being frozen.
8218 * exp_ch5.adb Remove with and use clauses for Ghost.
8219 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
8220 * exp_ch6.adb Remove with and use clauses for Ghost.
8221 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
8222 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
8223 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
8224 Ghost region of the working type.
8225 (Build_Invariant_Procedure_Declaration): Install and revert
8226 the Ghost region of the working type.
8227 (Expand_N_Package_Body): Remove all Ghost-related code.
8228 * exp_ch8.adb Remove with and use clauses for Ghost.
8229 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
8231 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
8232 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
8233 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
8235 * exp_ch13.adb Remove with and use clauses for Ghost.
8236 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
8237 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
8238 the tagged type. Move the generation of various entities within
8239 the Ghost region of the type.
8240 * exp_prag.adb Remove with and use clauses for Ghost.
8241 (Expand_Pragma_Check): Remove all Ghost-related code.
8242 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
8243 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
8244 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
8245 * exp_util.adb (Build_DIC_Procedure_Body): Install
8246 and revert the Ghost region of the working types.
8247 (Build_DIC_Procedure_Declaration): Install and revert the
8248 Ghost region of the working type.
8249 (Make_Invariant_Call): Install and revert the Ghost region of the
8251 (Make_Predicate_Call): Reimplemented. Install and revert the
8252 Ghost region of the associated type.
8253 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
8254 of the entity being frozen.
8255 (New_Freeze_Node): Removed.
8256 * ghost.adb Remove with and use clauses for Opt.
8257 (Check_Ghost_Completion): Update the parameter profile
8258 and all references to formal parameters.
8259 (Ghost_Entity): Update the comment on usage.
8260 (Install_Ghost_Mode): New routines.
8261 (Is_Ghost_Assignment): New routine.
8262 (Is_Ghost_Declaration): New routine.
8263 (Is_Ghost_Pragma): New routine.
8264 (Is_Ghost_Procedure_Call): New routine.
8265 (Is_Ghost_Renaming): Removed.
8266 (Is_OK_Declaration): Reimplemented.
8267 (Is_OK_Pragma): Reimplemented.
8268 (Is_OK_Statement): Reimplemented.
8269 (Is_Subject_To_Ghost): Update the comment on usage.
8270 (Mark_And_Set_Ghost_Assignment): New routine.
8271 (Mark_And_Set_Ghost_Body): New routine.
8272 (Mark_And_Set_Ghost_Completion): New routine.
8273 (Mark_And_Set_Ghost_Declaration): New routine.
8274 (Mark_And_Set_Ghost_Instantiation): New routine.
8275 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8276 (Mark_Full_View_As_Ghost): Removed.
8277 (Mark_Ghost_Declaration_Or_Body): New routine.
8278 (Mark_Ghost_Pragma): New routine.
8279 (Mark_Ghost_Renaming): New routine.
8280 (Mark_Pragma_As_Ghost): Removed.
8281 (Mark_Renaming_As_Ghost): Removed.
8282 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
8283 (Prune_Node): Freeze nodes no longer need special pruning, they
8284 are processed by the general ignored Ghost code mechanism.
8285 (Restore_Ghost_Mode): New routine.
8286 (Set_Ghost_Mode): Reimplemented.
8287 (Set_Ghost_Mode_From_Entity): Removed.
8288 * ghost.ads Add with and use clauses for Ghost.
8289 (Check_Ghost_Completion): Update the parameter profile
8290 along with the comment on usage.
8291 (Install_Ghost_Mode): New routine.
8292 (Is_Ghost_Assignment): New routine.
8293 (Is_Ghost_Declaration): New routine.
8294 (Is_Ghost_Pragma): New routine.
8295 (Is_Ghost_Procedure_Call): New routine.
8296 (Mark_And_Set_Ghost_Assignment): New routine.
8297 (Mark_And_Set_Ghost_Body): New routine.
8298 (Mark_And_Set_Ghost_Completion): New routine.
8299 (Mark_And_Set_Ghost_Declaration): New routine.
8300 (Mark_And_Set_Ghost_Instantiation): New routine.
8301 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8302 (Mark_Full_View_As_Ghost): Removed.
8303 (Mark_Ghost_Pragma): New routine.
8304 (Mark_Ghost_Renaming): New routine.
8305 (Mark_Pragma_As_Ghost): Removed.
8306 (Mark_Renaming_As_Ghost): Removed.
8307 (Restore_Ghost_Mode): New routine.
8308 (Set_Ghost_Mode): Redefined.
8309 (Set_Ghost_Mode_From_Entity): Removed.
8310 * sem.adb (Analyze): Install and revert the Ghost region of the
8311 node being analyzed.
8312 (Do_Analyze): Change the way a clean Ghost
8313 region is installed and reverted.
8314 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
8315 all Ghost-related code.
8316 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
8317 (Analyze_Number_Declaration): Remove all Ghost-related code.
8318 (Analyze_Object_Declaration): Install and revert the Ghost region of
8319 a deferred object declaration's completion.
8320 (Array_Type_Declaration): Remove all Ghost-related code.
8321 (Build_Derived_Type): Update the comment on
8322 the propagation of Ghost attributes from a parent to a derived type.
8323 (Derive_Subprogram): Remove all Ghost-related code.
8324 (Make_Class_Wide_Type): Remove all Ghost-related code.
8325 (Make_Implicit_Base): Remove all Ghost-related code.
8326 (Process_Full_View): Install and revert the Ghost region of
8327 the partial view. There is no longer need to check the Ghost
8329 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
8330 region of the left hand side.
8331 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
8332 all Ghost-related code.
8333 (Analyze_Expression_Function): Remove all Ghost-related code.
8334 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
8335 (Analyze_Procedure_Call): Install and revert the Ghost region of
8336 the procedure being called.
8337 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
8338 region of the spec or body.
8339 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
8340 (Build_Subprogram_Declaration): Remove all Ghost-related code.
8341 (Find_Corresponding_Spec): Remove all Ghost-related code.
8342 (Process_Formals): Remove all Ghost-related code.
8343 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
8344 the Ghost region of the spec.
8345 (Analyze_Package_Declaration): Remove all Ghost-related code.
8346 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
8347 Ghost when it aliases a Ghost entity.
8348 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
8350 (Analyze_Object_Renaming): Mark a renaming as Ghost when
8351 it aliases a Ghost entity.
8352 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
8354 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
8355 aliases a Ghost entity.
8356 * sem_ch11.adb Remove with and use clauses for Ghost.
8357 (Analyze_Exception_Declaration): Remove all Ghost-related code.
8358 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
8360 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
8362 (Analyze_Package_Instantiation): Install and revert the Ghost region
8363 of the package instantiation.
8364 (Analyze_Subprogram_Instantiation): Install
8365 and revert the Ghost region of the subprogram instantiation.
8366 (Instantiate_Package_Body): Code clean up. Install and revert the
8367 Ghost region of the package body.
8368 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
8369 Ghost region of the subprogram body.
8370 * sem_ch13.adb (Build_Predicate_Functions): Install
8371 and revert the Ghost region of the related type.
8372 (Build_Predicate_Function_Declaration): Code clean up. Install
8373 and rever the Ghost region of the related type.
8374 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8375 Install and revert the Ghost region of the pragma.
8376 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
8377 Ghost region of the pragma.
8378 (Analyze_Pragma): Install and revert the Ghost region of various
8379 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
8380 or encloses a Ghost entity.
8381 (Analyze_Pre_Post_Condition): Install and revert the Ghost
8382 region of the pragma.
8383 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
8384 Ghost region of the pragma.
8385 * sem_res.adb (Resolve): Remove all Ghost-related code.
8386 * sem_util.adb (Is_Declaration): Reimplemented.
8387 (Is_Declaration_Other_Than_Renaming): New routine.
8388 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
8389 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
8390 (Is_Ghost_Pragma): Removed.
8391 (Is_Ignored_Ghost_Pragma): New routine.
8392 (Set_Is_Checked_Ghost_Pragma): New routine.
8393 (Set_Is_Ghost_Pragma): Removed.
8394 (Set_Is_Ignored_Ghost_Pragma): New routine.
8395 * sinfo.ads: Update the documentation on Ghost mode and
8396 Ghost regions. New attributes Is_Checked_Ghost_Pragma
8397 and Is_Ignored_Ghost_Pragma along with usages in nodes.
8398 Remove attribute Is_Ghost_Pragma along with usages in nodes.
8399 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8400 (Is_Ghost_Pragma): Removed along with pragma Inline.
8401 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8402 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8403 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
8404 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8406 2017-01-12 Tristan Gingold <gingold@adacore.com>
8408 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
8409 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
8411 2017-01-12 Yannick Moy <moy@adacore.com>
8413 * errout.adb, errout.ads (Initialize): Factor common treatment
8415 (Reset_Warnings): New procedure to reset counts related to warnings.
8416 (Record_Compilation_Errors): New variable to store the presence of an
8417 error, used in gnat2why to allow changing the Warning_Mode.
8418 (Compilation_Errors): Use new variable Record_Compilation_Errors to
8419 store the presence of an error.
8421 2017-01-12 Javier Miranda <miranda@adacore.com>
8423 * sem_ch13.adb (Analyze_Aspect_Specifications):
8424 For Interrupt_Handler and Attach_ Handler aspects, decorate the
8425 internally built reference to the protected procedure as coming
8426 from sources and force its analysis.
8428 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8430 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
8431 inherit predicates if any from the first_subtype of the parent,
8432 not from the anonymous parent type.
8433 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
8434 predicate is not a static subtype.
8436 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8438 * freeze.adb (Check_Suspicious_Convention): New procedure
8439 performing a warning check on discriminated record types with
8440 convention C or C++. Factored out of procedure Freeze_Record_Type,
8441 and changed to only apply to base types (to avoid spurious
8442 warnings on subtypes). Minor improvement of warning messages
8443 to refer to discriminated rather than variant record types.
8444 (Freeze_Record_Type): Remove code for performing a suspicious
8446 (Freeze_Entity): Only call Freeze_Record_Type
8447 on types that aren't declared within any enclosing generic units
8448 (rather than just excluding the type when the innermost scope
8449 is generic). Call Check_Suspicious_Convention whether or not
8450 the type is declared within a generic unit.
8451 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
8452 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
8455 2017-01-12 Tristan Gingold <gingold@adacore.com>
8457 * sysdep.c, adaint.c, rtinit.c, ming32.h:
8458 (__gnat_current_codepage): Renamed from CurrentCodePage
8459 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
8461 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8463 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
8464 quantified expressions, following AI12-050: the loop parameters
8465 of two quantified expressions are conformant if they have the
8468 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8470 * gcc-interface/Makefile.in: Clean up VxWorks targets.
8472 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8474 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
8475 Hnadle properly the attribute reference when it appears as part
8476 of an expression in another loop aspect.
8478 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8480 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
8481 subsidiary of Build_Initialization_Call, to complete generation
8482 of predicate checks on discriminants whose (sub)types have
8483 predicates, and to add checks on variants that do not have an
8485 * sem_util.adb (Gather_Components): A missing Others alternative is
8486 not an error when the type of the discriminant is a static predicate
8487 (and coverage has been checked when analyzing the case statement). A
8488 runtime check is generated to verify that a given discriminant
8489 satisfies the predicate (RM 3.8.1. (21.1/2)).
8491 2017-01-12 Yannick Moy <moy@adacore.com>
8493 * gnat1drv.adb (Adjust_Global_Switches): Only
8494 perform checking of exception mechanism when generating code.
8496 2017-01-12 Justin Squirek <squirek@adacore.com>
8498 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
8499 Remove handling of access component with invariant.
8500 (Build_Invariant_Procedure_Declaration): Remove return on class
8502 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
8503 conditional exception for component or array so Has_Own_Invariants
8504 flag is not falsly set.
8505 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
8506 wide type to have no invariant flags.
8508 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8510 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
8511 sem_ch13.adb: Minor reformatting.
8513 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8515 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
8516 adjustment primitive when the ancestor type was not properly frozen.
8517 (Gen_Assign): Guard against a missing initialization
8518 primitive when the component type was not properly frozen.
8519 (Initialize_Array_Component): Guard against a missing adjustment
8520 primitive when the component type was not properly frozen.
8521 (Initialize_Record_Component): Guard against a missing adjustment
8522 primitive when the component type was not properly frozen.
8523 (Process_Transient_Component_Completion): The transient object may
8524 not be finalized when its associated type was not properly frozen.
8525 * exp_ch3.adb (Build_Assignment): Guard against a missing
8526 adjustment primitive when the component type was not properly frozen.
8527 (Build_Initialization_Call): Guard against a missing
8528 initialization primitive when the associated type was not properly
8530 (Expand_N_Object_Declaration): Guard against a missing
8531 adjustment primitive when the base type was not properly frozen.
8532 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
8533 body when there is no adjustment primitive available. Create an
8534 empty Deep_Finalize body when there is no finalization primitive
8536 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
8537 missing finalization primitive when the designated type was
8538 not properly frozen.
8539 (Expand_N_Allocator): Guard against a missing initialization primitive
8540 when the designated type was not properly frozen.
8541 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
8542 only when the corresponding adjustment primitive is available.
8543 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
8544 adjustment/finalization statements only when there is an available
8545 primitive to carry out the action.
8546 (Build_Initialize_Statements): Generate the initialization/finalization
8547 statements only when there is an available primitive to carry out the
8549 (Make_Adjust_Call): Do not generate a call when the underlying
8550 type is not present due to a possible missing full view.
8551 (Make_Final_Call): Do not generate a call when the underlying
8552 type is not present due to a possible missing full view.
8553 (Make_Finalize_Address_Stmts): Generate an empty body when the
8554 designated type lacks a finalization primitive.
8555 (Make_Init_Call): Do not generate a call when the underlying type is
8556 not present due to a possible missing full view.
8557 (Process_Component_For_Adjust): Add the adjustment call only when the
8558 corresponding adjustment primitive is available.
8559 (Process_Component_For_Finalize): Add the finalization call only when
8560 the corresponding finalization primitive is available.
8561 (Process_Object_Declaration): Use a null statement to emulate a
8562 missing call to the finalization primitive of the object type.
8563 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
8564 (Make_Final_Call): Update the comment on usage.
8565 (Make_Init_Call): Update the comment on usage.
8566 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
8568 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8570 * einfo.ads: Update documentation of Address_Taken.
8571 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
8572 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
8573 for subprograms when setting Address_Taken flag.
8575 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
8577 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
8578 Configurable_Run_Time_Mode off when analysing with'ed predefined
8581 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8583 * sem_prag.adb: Minor reformatting.
8584 * sem_util.adb (Unique_Entity): fix result for
8585 bodies of entry families.
8587 2017-01-12 Justin Squirek <squirek@adacore.com>
8589 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
8590 Resolve_Suppressible in the pragma Assertion_Policy case.
8591 (Resolve_Suppressible): Created this function to factor out
8592 common code used to resolve Suppress to either Ignore or Check
8593 * snames.ads-tmpl: Add name for Suppressible.
8595 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8597 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
8599 * debug.adb: Minor comment fixes.
8601 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8603 * sem_util.adb (Unique_Entity): For concurrent
8604 bodies that are defined with stubs and complete a declaration
8605 of a single concurrent object return the entity of an implicit
8606 concurrent type, not the entity of the anonymous concurrent
8608 * debug.adb: -gnatd.J is no longer used.
8609 * make.adb (Globalize): Removed, no longer used.
8610 * sem_ch9.adb: minor typo in comment for entry index
8612 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
8614 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8615 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8616 the value record of a task, set its _Secondary_Stack_Size field
8618 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8619 a _Secondary_Stack_Size field in the value record of
8620 the task if a Secondary_Stack_Size rep item is present.
8621 (Make_Task_Create_Call): Include secondary stack size
8622 parameter. If No_Secondary_Stack restriction is in place, passes
8624 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8625 Secondary_Stack_Size.
8626 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8627 function to define the overhead of the secondary stack.
8628 * s-tarest.adb (Create_Restricted_Task,
8629 Create_Restricted_Task_Sequential): Functions now include
8630 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8631 * s-tarest.adb (Create_Restricted_Task,
8632 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
8633 include Secondary_Stack_Size parameter.
8634 (Task_Wrapper): Secondary stack now allocated to the size specified by
8635 the Secondary_Stack_Size parameter in the task's ATCB.
8636 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
8637 Secondary_Stack_Size component.
8638 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8639 Create_Restricted_Task_Sequential): Function now include
8640 Secondary_Stack_Size parameter.
8641 (Task_Wrapper): Secondary stack now allocated to the size
8642 specified by the Secondary_Stack_Size parameter in the task's
8644 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
8645 to include Secondary_Stack_Size parameter.
8646 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
8647 Secondary_Stack_Size aspect, turning the aspect into its corresponding
8649 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
8650 * snames.adb-tmpl, snames.ads-tmpl: Added names
8651 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8652 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8654 2017-01-12 Yannick Moy <moy@adacore.com>
8656 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
8659 2017-01-12 Justin Squirek <squirek@adacore.com>
8661 * exp_attr.adb (Expand_N_Attribute_Reference):
8662 Fix Finalization_Size case by properly resolving the type after
8663 rewritting the node.
8665 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8667 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
8669 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
8670 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
8671 exp_sel.ads: Minor reformatting.
8673 2017-01-12 Justin Squirek <squirek@adacore.com>
8675 * exp_ch6.adb (Expand_Call): Add guard to prevent
8676 invariant checks from being created for internally generated
8679 2017-01-12 Bob Duff <duff@adacore.com>
8681 * lib-writ.ads: Remove incorrect comment.
8683 2017-01-12 Javier Miranda <miranda@adacore.com>
8685 * debug.adb (-gnatd.K): Enable generation of contract-only
8686 procedures in CodePeer mode.
8687 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
8689 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
8691 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
8693 (Get_Contract_Only_Missing_Body_Name): New subprogram.
8694 (Get_Contract_Only_Body): New subprogram.
8695 (Set_Contract_Only_Body): New subprogram.
8696 (Is_Contract_Only_Body): New subprogram.
8697 (Set_Is_Contract_Only_Body): New subprogram.
8698 (SCIL_Nodes): Replace table by hash-table.
8700 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8702 * exp_ch6.adb: Minor reformatting.
8703 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
8705 2017-01-12 Bob Duff <duff@adacore.com>
8707 * binde.adb (Forced): New reason for a dependence.
8708 (Force_Elab_Order): Implementation of the new switch.
8709 * binde.ads: Minor comment fixes.
8710 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
8711 long ago that is no longer supported; removed comment about that.
8712 * opt.ads (Force_Elab_Order_File): Name of file specified for
8714 * switch-b.adb: Parse -f switch.
8716 2017-01-12 Justin Squirek <squirek@adacore.com>
8718 * exp_ch6.adb (Check_View_Conversion): Created this function
8719 to properly chain calls to check type invariants that may be
8720 present in a subprogram call after the subprogram.
8721 (Expand_Call): Add a conditional to identify when a view conversion
8722 needs to be checked.
8723 * nlists.adb, nlists.ads (Prepend_New): New routine.
8724 (Prepend_New_To): New routine.
8726 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8728 * sinfo.ads: Minor reformatting.
8730 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8732 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
8735 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8737 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
8738 variable Definite. Create a local object and pass its 'Access to the
8739 BIP function when the result type is either definite or it does not
8740 require any finalization or secondary stack management.
8742 2017-01-12 Bob Duff <duff@adacore.com>
8744 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
8745 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
8746 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
8747 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
8748 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
8749 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
8750 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8751 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
8752 Change name to Pragma_Name_Unmapped.
8753 (Pragma_Name_Mapped): Change name to Pragma_Name.
8754 This is because the "mapped" version should be the usual case.
8756 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
8758 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
8759 Is_Default_Init_Cond_Procedure, and
8760 Has_Inherited_Default_Init_Cond. Add uses of flags
8761 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
8762 (Default_Init_Cond_Procedure): Removed.
8763 (DIC_Procedure): New routine.
8764 (Has_Default_Init_Cond): Removed.
8765 (Has_DIC): New routine.
8766 (Has_Inheritable_Invariants): The attribute applies to the base type.
8767 (Has_Inherited_Default_Init_Cond): Removed.
8768 (Has_Inherited_DIC): New routine.
8769 (Has_Inherited_Invariants): The attribute applies to the base type.
8770 (Has_Own_DIC): New routine.
8771 (Has_Own_Invariants): The attribute applies to the base type.
8772 (Is_Default_Init_Cond_Procedure): Removed.
8773 (Is_DIC_Procedure): New routine.
8774 (Set_Default_Init_Cond_Procedure): Removed.
8775 (Set_DIC_Procedure): New routine.
8776 (Set_Has_Default_Init_Cond): Removed.
8777 (Set_Has_Inheritable_Invariants): The attribute applies
8779 (Set_Has_Inherited_Default_Init_Cond): Removed.
8780 (Set_Has_Inherited_DIC): New routine.
8781 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
8782 (Set_Has_Own_DIC): New routine.
8783 (Set_Has_Own_Invariants): The attribute applies to the base type.
8784 (Set_Is_Default_Init_Cond_Procedure): Removed.
8785 (Set_Is_DIC_Procedure): New routine.
8786 (Write_Entity_Flags): Update the output of all flags related to
8787 default initial condition.
8788 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
8789 of the call to the DIC procedure.
8790 (Freeze_Type): Generate the body of the DIC procedure.
8791 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
8792 all occurrences of Create_Append with Append_New_To. Do
8793 not generate an invariant procedure for a class-wide type.
8794 The generated body acts as a freeze action of the working type.
8795 (Build_Invariant_Procedure_Declaration): Do not generate an
8796 invariant procedure for a class-wide type.
8797 (Create_Append): Removed.
8798 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
8799 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
8800 class-wide pre/postcondition description and data structures from
8802 (Build_Class_Wide_Expression): Moved from Sem_Prag.
8803 (Build_DIC_Call): New routine.
8804 (Build_DIC_Procedure_Body): New routine.
8805 (Build_DIC_Procedure_Declaration): New routine.
8806 (Entity_Hash): Moved from Sem_Prag.
8807 (Find_DIC_Type): New routine.
8808 (Update_Primitives_Mapping): Reimplemented.
8809 (Update_Primitives_Mapping_Of_Types): New routine.
8810 * exp_util.ads (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 (Update_Primitives_Mapping): Moved from Sem_Prag.
8815 (Update_Primitives_Mapping_Of_Types): New routine.
8816 * nlists.adb (Append_New): New routine.
8817 (Append_New_To): New routine.
8818 * nlists.ads (Append_New): New routine.
8819 (Append_New_To): New routine.
8820 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
8821 of DIC procedures here. This is now done at the end of the
8822 visible declarations, private declarations, and at the freeze
8824 (Analyze_Private_Extension_Declaration):
8825 A private extension inherits the DIC pragma of a parent type.
8826 (Analyze_Subtype_Declaration): No need to propagate invariant
8827 attributes to a subtype as those apply to the base type.
8828 (Build_Derived_Record_Type): No need to inherit invariants here
8829 as this is now done in Build_Derived_Type.
8830 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
8832 (Process_Full_View): Update the propagation of DIC attributes.
8833 (Propagate_Default_Init_Cond_Attributes): Removed.
8834 * sem_ch7.adb Add with and use clauses for Exp_Util.
8835 (Analyze_Package_Specification): Create the body of the DIC
8836 procedure at the end of the visible and private declarations.
8837 (Preserve_Full_Attributes): Propagate DIC attributes.
8838 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
8840 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
8841 * sem_elab.adb (Check_A_Call): Update the call to
8842 Is_Nontrivial_Default_Init_Cond_Procedure.
8843 * sem_prag.adb Remove the with and use clauses for
8844 GNAT.HTable. Move the handling of class- wide pre/postcondition
8845 description and data structures to Exp_Util.
8846 (Analyze_Pragma): Create the declaration of the DIC procedure. There
8847 is no need to propagate invariant-related attributes at this point
8848 as this is done in Build_Invariant_Procedure_Declaration.
8849 (Build_Class_Wide_Expression): Moved to Exp_Util.
8850 (Entity_Hash): Moved to Exp_Util.
8851 (Update_Primitives_Mapping): Moved to Exp_Util.
8852 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
8853 (Update_Primitives_Mapping): Moved to Exp_Util.
8854 * sem_util.adb: Remove with and use clauses for Ghost
8856 (Build_Default_Init_Cond_Call): Removed.
8857 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8858 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8859 (Get_Views): Reimplemented.
8860 (Has_Full_Default_Initialization): Reimplement the section on DIC.
8861 (Inherit_Default_Init_Cond_Procedure): Removed.
8862 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8863 (Is_Nontrivial_DIC_Procedure): New routine.
8864 (Is_Verifiable_DIC_Pragma): New routine.
8865 (Propagate_DIC_Attributes): New routine.
8866 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
8867 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8868 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
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_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
8876 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
8878 (Expression_Copy): New routine along with pragma Inline.
8879 (Set_Expression_Copy): New routine along with pragma Inline.
8881 2017-01-06 Bob Duff <duff@adacore.com>
8883 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
8884 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
8885 we won't generate the call to s_stalib_adafinal when the main
8886 is not written in Ada.
8888 2017-01-06 Bob Duff <duff@adacore.com>
8890 * sem_prag.adb: Minor: remove pragma Warnings.
8892 2017-01-06 Tristan Gingold <gingold@adacore.com>
8894 * Makefile.rtl: Do not compile s-stchop by default.
8896 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8898 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
8899 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
8900 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
8901 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
8902 Reverted previous change for now.
8904 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8906 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
8907 check to default discriminant value if checks are enabled.
8908 (Build_Assignment): If type of component has static predicate,
8909 apply check to its default value, if any.
8911 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8913 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8914 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8915 the value record of a task, set its _Secondary_Stack_Size field
8917 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8918 a _Secondary_Stack_Size field in the value record of
8919 the task if a Secondary_Stack_Size rep item is present.
8920 (Make_Task_Create_Call): Include secondary stack size
8921 parameter. If No_Secondary_Stack restriction is in place, passes
8923 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8924 Secondary_Stack_Size.
8925 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8926 function to define the overhead of the secondary stack.
8927 * s-tarest.adb (Create_Restricted_Task,
8928 Create_Restricted_Task_Sequential): Functions now include
8929 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8930 * s-tarest.adb (Create_Restricted_Task,
8931 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
8932 now include Secondary_Stack_Size parameter.
8934 Secondary stack now allocated to the size specified by the
8935 Secondary_Stack_Size parameter in the task's ATCB.
8936 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
8937 Secondary_Stack_Size component.
8938 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8939 Create_Restricted_Task_Sequential): Function now include
8940 Secondary_Stack_Size parameter.
8941 (Task_Wrapper): Secondary stack
8942 now allocated to the size specified by the Secondary_Stack_Size
8943 parameter in the task's ATCB.
8944 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
8945 for Secondary_Stack_Size aspect, turning the aspect into its
8946 corresponding internal attribute.
8947 (Analyze_Attribute_Definition):
8948 Process Secondary_Stack_Size attribute.
8949 * snames.adb-tmpl, snames.ads-tmpl: Added names
8950 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8951 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8953 2017-01-06 Pascal Obry <obry@adacore.com>
8955 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
8956 Sequential_IO and Direct_IO.
8958 2017-01-06 Bob Duff <duff@adacore.com>
8960 * snames.ads-tmpl (Renamed): New name for the pragma argument.
8961 * par-ch2.adb: Allow the new pragma (with analysis deferred
8963 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
8964 Keep a mapping from new pragma names to old names.
8965 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
8966 implement it by calling Map_Pragma_Name.
8967 * checks.adb, contracts.adb, einfo.adb, errout.adb,
8968 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
8969 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
8970 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
8971 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
8972 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8973 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
8976 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8978 * exp_ch9.adb: Minor reformatting.
8980 2017-01-06 Tristan Gingold <gingold@adacore.com>
8982 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
8983 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
8984 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
8986 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
8987 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
8988 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
8989 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
8991 2017-01-06 Bob Duff <duff@adacore.com>
8993 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
8994 dummy implementation of Map_Pragma_Name.
8996 2017-01-06 Tristan Gingold <gingold@adacore.com>
8998 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
8999 entry_body variable constant.
9000 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
9001 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
9003 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
9004 now access to constant.
9006 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9008 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
9009 reformatting and typo fixes.
9011 2017-01-06 Bob Duff <duff@adacore.com>
9013 * snames.ads-tmpl: New names for pragma renaming.
9014 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
9015 * par-prag.adb: Add new pragma name to case statement.
9016 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
9018 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
9019 Dummy implementation of Pragma_Name_Mapped.
9021 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9023 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
9024 better detect call within an entry_wrapper.
9025 * sem_res.adb (Resolve_Call): A protected call within an
9026 entity_wrapper is analyzed in the context of the protected
9027 object but corresponds to a pre-analysis and is not an access
9029 * sem_attr.adb: Minor reformatting.
9031 2017-01-06 Justin Squirek <squirek@adacore.com>
9033 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
9034 Finalization_Size to allow a prefix of any non-class-wide type.
9035 * sem_attr.ads Modify comment for Finalization_Size to include
9036 definite type use case.
9038 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9040 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
9041 on procedures that are wrappers created for entries that have
9043 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
9044 body is an entry_wrapper, compile it in the context of the
9045 synchronized type, because a precondition may refer to funtions
9047 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
9049 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
9050 within an Entry_Wrapper this is an external call whose target
9051 is the synchronized object that is the actual in the call to
9054 2017-01-06 Yannick Moy <moy@adacore.com>
9056 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
9057 in tree, which means not analyzing the previous prefix if the node has
9058 been rewritten into its prefix.
9060 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9062 * s-tpobop.adb: Minor reformatting.
9064 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9066 * checks.adb (Ensure_Valid): Do not generate a validity check
9067 within a generated predicate function, validity checks will have
9068 been applied earlier when required.
9070 2017-01-06 Tristan Gingold <gingold@adacore.com>
9072 * s-tpoben.ads (Protection_Entries): Add comment and reorder
9073 components for performances.
9074 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
9077 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9079 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
9080 If expression is compile-time known and obeys a static predicate
9081 it must be labelled as static, to prevent spurious warnings and
9082 run-time errors, e.g. in case statements. This is relevant when
9083 the expression is the result of constant-folding a type conversion
9084 whose expression is a variable with a known static value.
9086 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9088 * exp_attr.adb, sem_attr.ads: Minor reformatting.
9090 2017-01-06 Justin Squirek <squirek@adacore.com>
9092 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
9093 expansion of Finalization_Size attribute.
9094 * sem_attr.adb (Analyze_Attribute): Add entry to check the
9095 semantics of Finalization_Size.
9096 (Eval_Attribute): Add null entry for Finalization_Size.
9097 * sem_attr.ads: Add Finalization_Size to the implementation
9098 dependent attribute list.
9099 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
9101 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9103 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
9104 iterator specification with a serious syntactic error, transform
9105 construct into an infinite loop in order to continue analysis
9106 and prevent a compiler abort.
9108 2017-01-06 Tristan Gingold <gingold@adacore.com>
9110 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
9111 max_queue_lengths_array if unused.
9113 2017-01-06 Bob Duff <duff@adacore.com>
9115 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
9116 array access, in case "\" is at the end of Text.
9117 * stylesw.adb (Set_Style_Check_Options): Don't include input
9118 characters in the error message template, because they could
9119 be control characters such as "\", which Errout will try to
9122 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9124 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
9125 For a private type examine the visible declarations that follow
9126 the partial view, not just the private declarations that follow
9129 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9131 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
9134 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9136 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
9137 alias of the inherited op is the parent iterator, no need to
9138 examine dispatch table positions which might not be established
9139 yet if type is not frozen.
9140 * sem_disp.adb (Check_Controlling_Formals): The formal of a
9141 predicate function may be a subtype of a tagged type.
9142 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
9143 of representation items for the completion of a type extension
9144 where a predicate applies to the partial view.
9145 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
9146 parameter that designates function whose actual receives a
9147 predicate check, to improve warning message when the check will
9148 lead to infinite recursion.
9149 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
9150 Apply_Predicate_Check.
9152 2017-01-06 Tristan Gingold <gingold@adacore.com>
9154 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
9155 Gnat_Extended_Ravenscar.
9156 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
9158 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9160 * sem_util.ads: Minor typo fix and reformatting.
9162 2017-01-06 Yannick Moy <moy@adacore.com>
9164 * ghost.adb Minor fixing of references to SPARK RM.
9165 (Check_Ghost_Context): Check whether reference is to a lvalue
9166 before issuing an error about violation of SPARK RM 6.9(13)
9167 when declaration has Ghost policy Check and reference has Ghost
9169 * sem_util.adb Minor indentation.
9170 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
9171 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
9172 * sem_util.ads (Unique_Defining_Entity): Document the result
9173 for package body stubs.
9175 2017-01-06 Tristan Gingold <gingold@adacore.com>
9177 * raise-gcc.c (abort): Macro to call Abort_Propagation.
9178 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
9180 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
9181 Do not generate the Entry_Max_Queue_Lengths_Array if all default
9183 * exp_util.adb (Corresponding_Runtime_Package): Consider
9184 Max_Queue_Length pragma.
9186 2017-01-06 Justin Squirek <squirek@adacore.com>
9188 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
9189 Remove declaration generation in the case of
9190 System_Tasking_Protected_Objects_Single_Entry being used,
9191 and add a warning message when this is detected to occur.
9192 (Make_Initialize_Protection): Remove reference pass in the case
9193 of System_Tasking_Protected_Objects_Single_Entry.
9194 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
9195 * s-tposen.adb (Initialize_Protection_Entry): Remove
9196 Entry_Queue_Max parameter.
9197 * s-tposen.ads: Remove the types use to store the entry queue
9199 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
9201 2017-01-06 Yannick Moy <moy@adacore.com>
9203 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
9204 behavior of function, to also accept out of range positions
9205 and raise Constraint_Error in such case, and to copy sloc from
9206 literal if No_Location passed as location.
9207 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
9208 of functions to raise Constraint_Error in case of value not in
9211 2017-01-06 Tristan Gingold <gingold@adacore.com>
9213 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
9214 Invalidate_Stack_Cache.
9216 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
9218 * s-os_lib.adb: Minor fix to the signature of Readlink.
9220 2017-01-06 Javier Miranda <miranda@adacore.com>
9222 * sem_ch6.adb (Conforming_Types): Handle another
9223 confusion between views in a nested instance with an actual
9224 private type whose full view is not in scope.
9226 2017-01-06 Arnaud Charlet <charlet@adacore.com>
9228 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
9229 mark a rewritten if statement as explicit (Comes_From_Source).
9231 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9233 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
9235 2017-01-06 Tristan Gingold <gingold@adacore.com>
9237 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
9239 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9241 * sem_case.adb: Minor reformatting.
9243 2017-01-06 Thomas Quinot <quinot@adacore.com>
9245 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
9247 2017-01-06 Justin Squirek <squirek@adacore.com>
9249 * aspects.adb: Register aspect in Canonical_Aspect.
9250 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
9251 into respective tables.
9252 * einfo.ads, einfo.adb: Add a new attribute for
9253 handling the parameters for Pragma_Max_Entry_Queue
9254 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
9255 for accessing and setting were added as well.
9256 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
9257 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
9258 declaration for pramga arguments and store them in the protected
9260 (Make_Initialize_Protection): Pass a reference to
9261 the Entry_Max_Queue_Lengths_Array in the protected type node to
9263 * rtsfind.adb: Minor grammar fix.
9264 * rtsfind.ads: Register new types taken from the
9265 runtime libraries RE_Protected_Entry_Queue_Max and
9266 RE_Protected_Entry_Queue_Max_Array
9267 * s-tposen.adb, s-tpoben.adb
9268 (Initialize_Protection_Entry/Initialize_Protection_Entries):
9269 Add extra parameter and add assignment to local object.
9270 * s-tposen.ads, s-tpoben.ads: Add new types to
9271 store entry queue maximums and a field to the entry object record.
9272 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
9273 for Aspect_Max_Queue_Length.
9274 (Check_Aspect_At_Freeze_Point):
9275 Add aspect to list of aspects that don't require delayed analysis.
9276 * sem_prag.adb (Analyze_Pragma): Add case statement for
9277 Pragma_Max_Queue_Length, check semantics, and register arugments
9278 in the respective entry nodes.
9279 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
9280 and Has_Max_Queue_Length
9281 * snames.ads-tmpl: Add constant for the new aspect-name
9282 Name_Max_Queue_Length and corrasponding pragma.
9284 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9286 * exp_util.adb (Is_Controlled_Function_Call):
9287 Reimplemented. Consider any node which has an entity as the
9288 function call may appear in various ways.
9290 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9292 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
9293 an unchecked type conversion when performing a view conversion
9294 to/from a private type. In all other cases use a regular type
9295 conversion to ensure that any relevant checks are properly
9298 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9300 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
9302 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9304 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
9305 error on case expression that is an entity, when coverage is
9306 incomplete and entity has a static value obtained by local
9308 (Handle_Static_Predicate): New procedure, subsidiary of
9309 Check_Choices, to handle case alternatives that are either
9310 subtype names or subtype indications involving subtypes that
9311 have static predicates.
9313 2017-01-06 Thomas Quinot <quinot@adacore.com>
9315 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
9316 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
9318 2017-01-06 Bob Duff <duff@adacore.com>
9320 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
9321 Elaborate_All(P) to P itself. That could happen in obscure cases,
9322 and always introduced a cycle (P body must be elaborated before
9324 * lib-writ.ads: Comment clarification.
9325 * ali-util.ads: Minor comment fix.
9326 * ali.adb: Minor reformatting.
9328 2017-01-06 Tristan Gingold <gingold@adacore.com>
9330 * a-exexpr-gcc.adb: Improve comment.
9332 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9334 * s-linux-mips.ads: Use correct signal and errno constants.
9335 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
9337 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9339 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
9340 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
9343 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
9345 * gnatvsn.ads: Bump copyright year.
9347 2017-01-01 Jakub Jelinek <jakub@redhat.com>
9349 * gnat_ugn.texi: Bump @copying's copyright year.
9350 * gnat_rm.texi: Likewise.
9352 Copyright (C) 2017 Free Software Foundation, Inc.
9354 Copying and distribution of this file, with or without modification,
9355 are permitted in any medium without royalty provided the copyright
9356 notice and this notice are preserved.