1 2017-09-11 Yannick Moy <moy@adacore.com>
3 * lib-xref-spark_specific.adb: Minor rewrite.
5 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
7 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
8 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
11 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
13 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
14 * gcc-interface/Makefile.in: Take this renaming into account.
16 2017-09-11 Arnaud Charlet <charlet@adacore.com>
18 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
21 2017-09-11 Yannick Moy <moy@adacore.com>
23 * sem_util.adb (Check_Result_And_Post_State):
24 Do not issue a warning about missing reference to an outcome if
25 the subprogram is ghost and has no outputs.
26 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
29 2017-09-11 Yannick Moy <moy@adacore.com>
31 * gnat1drv.adb (Adjust_Global_Switches): Set
32 Check_Validity_Of_Parameters to False in GNATprove mode.
33 * opt.ads (Check_Validity_Of_Parameters): Document switch to
36 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
38 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
39 generate debug info for inner record types if -fgnat-encodings=minimal.
40 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
41 type as the debug type.
43 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
45 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
46 packed record types if pragma Optimize_Alignment (Space) is enabled.
48 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
50 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
51 limits for expression functions.
52 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
54 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
56 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
57 layout of the record from the parent type only if both are or are not
59 (is_stored_discriminant): Return false for an unchecked union.
61 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
63 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
66 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
68 * gcc-interface/decl.c (promote_object_alignment): New function taken
70 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
71 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
72 create a padding type on success before doing the atomic check.
74 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
76 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
77 promotion to static memory earlier in the processing.
79 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
81 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
82 and TYPE_BY_REFERENCE_P flags on types after various promotions.
83 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
84 Consider all kinds of entities.
86 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
88 * gcc-interface/utils.c (convert): When converting to a padding type,
89 reuse an existing CONSTRUCTOR if it has got the right size.
91 2017-09-08 Nicolas Roche <roche@adacore.com>
93 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
95 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
96 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
97 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
98 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
99 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
100 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
101 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
102 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
103 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
104 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
105 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
106 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
107 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
108 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
109 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
110 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
111 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
112 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
113 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
114 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
115 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
116 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
117 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
118 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
119 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
120 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
121 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
122 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
123 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
124 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
125 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
126 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
127 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
128 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
129 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
130 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
131 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
132 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
133 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
134 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
135 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
136 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
137 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
138 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
139 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
140 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
141 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
142 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
143 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
144 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
145 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
146 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
147 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
148 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
149 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
150 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
151 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
152 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
153 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
154 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
155 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
156 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
157 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
158 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
159 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
160 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
161 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
162 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
163 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
164 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
165 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
166 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
167 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
168 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
169 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
170 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
171 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
172 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
173 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
174 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
175 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
176 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
177 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
178 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
179 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
180 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
181 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
182 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
183 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
184 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
185 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
186 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
187 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
188 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
189 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
190 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
191 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
192 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
193 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
194 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
195 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
196 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
197 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
198 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
199 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
200 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
201 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
202 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
203 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
204 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
205 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
206 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
207 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
208 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
209 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
210 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
211 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
212 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
213 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
214 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
215 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
216 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
217 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
218 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
219 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
220 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
221 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
222 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
223 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
224 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
225 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
226 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
227 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
228 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
229 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
230 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
231 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
232 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
233 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
234 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
235 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
236 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
237 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
238 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
239 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
240 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
241 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
242 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
243 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
244 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
245 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
246 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
247 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
248 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
249 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
250 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
251 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
252 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
253 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
254 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
255 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
256 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
257 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
258 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
259 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
260 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
261 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
262 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
263 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
264 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
265 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
266 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
267 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
268 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
269 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
270 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
271 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
272 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
273 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
274 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
275 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
276 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
277 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
278 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
279 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
280 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
281 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
282 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
283 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
284 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
285 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
286 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
287 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
288 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
289 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
290 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
291 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
292 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
293 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
294 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
295 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
296 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
297 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
298 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
299 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
300 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
301 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
302 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
303 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
304 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
305 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
306 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
307 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
308 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
309 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
310 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
311 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
312 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
313 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
314 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
315 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
316 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
317 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
318 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
319 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
320 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
321 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
322 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
323 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
324 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
325 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
326 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
327 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
328 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
329 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
330 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
331 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
332 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
333 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
334 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
335 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
336 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
337 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
338 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
339 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
340 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
341 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
342 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
343 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
344 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
345 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
346 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
347 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
348 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
349 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
350 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
351 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
352 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
353 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
354 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
355 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
356 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
357 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
358 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
359 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
360 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
361 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
362 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
363 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
364 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
365 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
366 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
367 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
368 to libgnat subdirectory.
370 2017-09-08 Yannick Moy <moy@adacore.com>
372 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
373 return the entity associated with the call.
374 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
375 Replace the internal Get_Function_Id with the new
376 Sem_Aux.Get_Called_Entity.
377 (Iterate_Call_Parameters): New
378 procedure to iterate on formals and actuals at the same time.
379 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
380 Set SPARK_Mode from spec when set, for analysis
381 of instance. Restore after analysis of instance.
382 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
383 set, for analysis of body instance. Restored automatically at
384 the end of the subprogram.
385 * gnat1drv.adb (Adjust_Global_Switches): Set
386 Check_Validity_Of_Parameters to False in GNATprove mode.
387 * opt.ads (Check_Validity_Of_Parameters): Document switch to
390 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
392 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
393 (New_Copy_Tree): ...there. Reset the hash tables only if they
394 were used in the previous invocation.
395 * s-htable.adb: Fix typo.
397 2017-09-08 Bob Duff <duff@adacore.com>
399 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
401 2017-09-08 Arnaud Charlet <charlet@adacore.com>
403 * sem_aggr.adb: minor style fix.
405 2017-09-08 Bob Duff <duff@adacore.com>
407 * sprint.adb (Write_Corresponding_Source): Ignore if there is
408 no current source file.
409 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
410 Print something helpful in case N is invalid.
411 * sprint.ads: Minor comment fix.
413 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
415 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
418 2017-09-08 Bob Duff <duff@adacore.com>
420 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
421 Ada_2020, along the same lines as the other Ada version pragmas.
423 2017-09-08 Gary Dismukes <dismukes@adacore.com>
425 * sem_ch12.adb: Minor typo fixes and reformatting.
427 2017-09-08 Yannick Moy <moy@adacore.com>
429 * sem_aggr.adb (Resolve_Record_Aggregate):
430 Rewrite bounds of aggregate subexpressions which may depend on
431 discriminants of the enclosing aggregate.
433 2017-09-08 Yannick Moy <moy@adacore.com>
435 * sem_ch5.adb: Prevent assertion failure on illegal code.
437 2017-09-08 Yannick Moy <moy@adacore.com>
439 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
440 calling Renamed_Entity on an entity which cannot be a renaming.
442 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
444 * exp_aggr.adb: Add with & use clause for Urealp.
445 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
446 elementary types instead of just discrete types.
447 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
448 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
449 Be prepared for the FP zero value in the memset case. Add small
452 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
454 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
457 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
459 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
460 of New_Copy because the latter leaves the syntactic structure of
461 the tree inconsistent (a child is accessible through two parents)
462 and prevents proper replication of itypes by subsequent calls
464 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
465 New_Copy because the latter leaves the syntactic structure of the
466 tree inconsistent (a child is accessible through two parents)
467 and prevents proper replication of itypes by subsequent calls
469 * sem_util.adb (In_Subtree): New routine.
470 (New_Copy_Tree): Reimplemented.
471 * sem_util.ads (In_Subtree): New routine.
472 (New_Copy_Tree): Reimplemented.
474 2017-09-08 Ed Schonberg <schonberg@adacore.com>
476 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
477 for aspect Default_Value is a static scalar value, but it does
478 not freeze the type. Yhis allows for subsequent representation
479 clauses for the type.
481 2017-09-08 Javier Miranda <miranda@adacore.com>
483 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
484 not add entries into the undefined reference table when we are
485 compiling with errors ignored.
487 2017-09-08 Ed Schonberg <schonberg@adacore.com>
489 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
490 check if the instance is within an enclosing instance body. The
491 formal package was legal in the enclosing generic, and is
492 legal in the enclosing instantiation. This optimisation may be
493 applicable elsewhere, and it also removes spurious errors that
494 may arise with on-the-fly processing of instantiations that
495 contain Inline_Always subprograms.
497 2017-09-08 Vincent Celier <celier@adacore.com>
499 * gnatcmd.adb: Disregard empty argument of GNAT driver.
501 2017-09-08 Justin Squirek <squirek@adacore.com>
503 * checks.adb (Insert_Valid_Check): Manually decorate
504 the generated temporary for range valdity checks.
506 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
508 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
510 2017-09-08 Justin Squirek <squirek@adacore.com>
512 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
513 case to handle underscore flags.
514 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
515 new procedure to handle underscores.
517 2017-09-08 Javier Miranda <miranda@adacore.com>
519 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
520 divisions with fixed point results to avoid generating twice
521 the runtime check on divide by zero.
522 * checks.adb (Apply_Divide_Checks): Ensure that operands are
523 not evaluated twice (once for their runtime checks and once for
524 their regular computation).
526 2017-09-08 Yannick Moy <moy@adacore.com>
528 * sem_prag.adb (Analyze_Part_Of): Add missing
529 return statements after issuing errors. Add detection of
530 out-of-order item and single concurrent type.
532 2017-09-08 Nicolas Roche <roche@adacore.com>
534 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
535 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
536 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
537 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
538 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
539 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
540 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
541 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
542 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
543 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
544 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
545 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
546 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
547 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
548 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
549 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
550 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
551 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
552 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
553 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
554 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
555 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
556 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
557 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
558 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
559 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
560 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
561 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
562 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
563 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
564 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
565 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
566 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
567 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
568 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
569 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
570 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
571 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
572 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
573 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
574 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
575 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
576 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
577 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
578 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
579 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
580 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
581 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
582 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
583 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
584 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
585 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
586 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
587 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
589 2017-09-08 Arnaud Charlet <charlet@adacore.com>
591 * doc/share/conf.py, doc/share/latex_elements.py,
592 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
595 2017-09-08 Arnaud Charlet <charlet@adacore.com>
597 * gnat_rm.texi, gnat_ugn.texi,
598 doc/gnat_ugn/the_gnat_compilation_model.rst,
599 doc/gnat_ugn/getting_started_with_gnat.rst,
600 doc/gnat_ugn/inline_assembler.rst,
601 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
602 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
603 doc/gnat_ugn/about_this_guide.rst,
604 doc/gnat_ugn/platform_specific_information.rst,
605 doc/gnat_ugn/example_of_binder_output.rst,
606 doc/gnat_ugn/gnat_and_program_execution.rst,
607 doc/gnat_ugn/gnat_utility_programs.rst,
608 doc/gnat_rm/implementation_of_specific_ada_features.rst,
609 doc/gnat_rm/interfacing_to_other_languages.rst,
610 doc/gnat_rm/implementation_defined_aspects.rst,
611 doc/gnat_rm/intrinsic_subprograms.rst,
612 doc/gnat_rm/implementation_defined_characteristics.rst,
613 doc/gnat_rm/implementation_advice.rst,
614 doc/gnat_rm/implementation_defined_attributes.rst,
615 doc/gnat_rm/compatibility_and_porting_guide.rst,
616 doc/gnat_rm/standard_library_routines.rst,
617 doc/gnat_rm/the_gnat_library.rst,
618 doc/gnat_rm/implementation_defined_pragmas.rst,
619 doc/gnat_rm/representation_clauses_and_pragmas.rst,
620 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
621 doc/gnat_rm/obsolescent_features.rst,
622 doc/gnat_rm/about_this_guide.rst,
623 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
624 doc/gnat_rm/implementation_of_ada_2012_features.rst,
626 doc/gnat_rm.rst: Update documentation.
628 2017-09-08 Arnaud Charlet <charlet@adacore.com>
630 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
631 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
632 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
634 2017-09-08 Bob Duff <duff@adacore.com>
636 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
637 New routine to read the Tag robustly.
638 * exp_attr.adb (Input): Change the expansion of 'Input,
639 in the class-wide case, to call String_Input_Tag instead of
642 2017-09-08 Arnaud Charlet <charlet@adacore.com>
644 * s-rident.ads (Restriction_Id): reorder enum
645 literals, so that Pure_Barriers is no longer in range of the
646 Cunit_Boolean_Restrictions subtype.
648 2017-09-08 Nicolas Roche <roche@adacore.com>
650 * a-taster.ads, a-taster.adb: Move to libgnarl
651 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
652 Add support for files in libgnarl.
654 2017-09-08 Ed Schonberg <schonberg@adacore.com>
656 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
657 accessibility check to an interface conversion, whose purpose
658 is to perform a pointer adjustment in a dispatching call.
659 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
660 when the actual is a construct that involves a dereference of an
661 expression that includes a formal of the enclosing subprogram,
662 In such cases, the accessibility level of the actual is that of
663 the corresponding formal, which is passed in as an additional
664 actual in the outer call.
666 2017-09-08 Bob Duff <duff@adacore.com>
668 * exp_intr.adb (Add_Source_Info): Do not decode
669 file names; they were not encoded in the first place.
671 2017-09-08 Bob Duff <duff@adacore.com>
673 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
674 exceptions instead of crashes. Check for absurdly long strings
675 and empty strings. Empty strings cause trouble because they can
676 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
677 be empty, which causes an array index out of bounds.
678 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
681 2017-09-08 Arnaud Charlet <charlet@adacore.com>
683 * sem_util.adb (Is_CCT_Instance): allow use in
684 the context of protected types.
686 2017-09-08 Arnaud Charlet <charlet@adacore.com>
688 * a-tigeli.adb: minor remove extra whitespace.
690 2017-09-08 Gary Dismukes <dismukes@adacore.com>
692 * par-ch4.adb: Reformatting of an error message.
694 2017-09-08 Javier Miranda <miranda@adacore.com>
696 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
697 identifiers to ensure their correct decoration of names on
700 2017-09-08 Yannick Moy <moy@adacore.com>
702 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
703 not skip a loop coming from source which is rewritten into a loop.
705 2017-09-08 Ed Schonberg <schonberg@adacore.com>
707 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
708 wrapper has convention Ada, to prevent spurious warnings on
709 unconstrained array parameters.
711 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
713 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
714 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
716 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
718 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
720 2017-09-08 Arnaud Charlet <charlet@adacore.com>
722 * exp_intr.adb (Append_Entity_Name): Move to ...
723 * sem_util.ads, sem_util.adb: ... here to share it.
724 (Subprogram_Name): New subprogram, to compute the name of the enclosing
726 * errutil.adb (Error_Msg): Fill new field Node.
727 * erroutc.ads (Subprogram_Name_Ptr): New.
728 (Error_Msg_Object): New field Node.
729 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
730 * errout.adb (Error_Msg): New variant with node id parameter.
731 Fill new parameter Node when emitting messages. Revert previous
732 changes for Include_Subprogram_In_Messages.
733 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
734 generating warning message.
736 2017-09-08 Ed Schonberg <schonberg@adacore.com>
738 * par-ch4.adb (P_Iterated_Component_Association): Place construct
739 under -gnat2020 flag, given that it is a future feature of
741 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
742 defining identifier as referenced to prevent spurious warnings:
743 corresponding loop is expanded into one or more loops whose
744 variable has the same name, and the expression uses those names
745 and not the original one.
747 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
749 * sem_elab.adb (Check_A_Call): Do not consider
750 references to internal variables for SPARK semantics.
752 2017-09-08 Arnaud Charlet <charlet@adacore.com>
754 * inline.adb (In_Package_Spec): refine type of
755 the parameter from Node_Id to Entity_Id.
757 2017-09-08 Justin Squirek <squirek@adacore.com>
759 * exp_ch5.adb (Expand_Formal_Container_Loop):
760 Reset the scope of the loop parameter after it is reanalyzed.
762 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
764 * sem_util.ads (Set_Rep_Info): New inline procedure.
765 * sem_util.adb (Set_Rep_Info): Implement it.
766 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
767 always copy the representation aspects onto the subtype.
769 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
771 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
772 Correction of the return type from access type to option type.
773 (Simple_HTable): Moving the Instance_Data to ads file.
775 2017-09-08 Yannick Moy <moy@adacore.com>
777 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
779 2017-09-08 Arnaud Charlet <charlet@adacore.com>
781 * opt.ads (Include_Subprogram_In_Messages): New variable.
782 * errout.ads (Current_Subprogram_Ptr): New variable.
783 * errout.adb (Error_Msg): Prepend current subprogram info
784 in messages if Include_Subprogram_In_Messages is set.
785 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
787 * gnat1drv.adb (Adjust_Global_Switches): Set
788 Include_Subprogram_In_Messages when -gnatdJ is set.
789 * debug.adb: Document and reserve -gnatdJ.
791 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
793 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
794 functions to iterate over simple hastables.
795 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
797 2017-09-08 Javier Miranda <miranda@adacore.com>
799 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
800 missing checks on the presence of Entity() before checking the
803 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
805 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
806 statements, use local variable and remove unnecessary processing.
808 2017-09-08 Javier Miranda <miranda@adacore.com>
810 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
812 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
813 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
815 (Unqual_BIP_Iface_Function_Call): New subprogram.
816 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
817 subprogram containing code that was previously inside
818 Make_Build_In_Place_Call_In_Object_Declaration since it is also
819 required for one of the new subprograms.
821 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
822 (Expand_N_Extended_Return_Statement): Extend the
823 cases covered by an assertion on expected BIP object
825 (Make_Build_In_Place_Call_In_Assignment):
826 Removing unused code; found working on this ticket.
827 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
828 that replaces the internal name of the renaming declaration
829 into the new subprogram Replace_Renaming_Declaration_Id.
830 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
831 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
833 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
835 (Unqual_BIP_Iface_Function_Call): New subprogram.
836 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
837 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
838 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
839 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
840 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
841 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
842 (Expand_N_Indexed_Component): Invoke the new subprogram
843 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
844 (Expand_N_Selected_Component): Invoke the new subprogram
845 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
846 (Expand_N_Slice): Invoke the new subprogram
847 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
848 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
849 Invoke the new subprogram
850 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
852 2017-09-08 Javier Miranda <miranda@adacore.com>
854 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
855 access to interface types. Remove also the accessibility check.
857 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
859 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
860 all the types that are referenced by the expression.
861 (Analyze_Expression_Function): Call Freeze_Expr_Types for
862 a completion instead of manually freezing the type of the
864 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
866 2017-09-08 Ed Schonberg <schonberg@adacore.com>
868 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
869 New procedure, auxiliary to Expand_Pragma_Check, to handle
870 references to the discriminants of a protected type within a
871 precondition of a protected operation. This is needed because
872 the original precondition has been analyzed in the context of
873 the protected declaration, but in the body of the operation
874 references to the discriminants have been replaved by references
875 to the discriminants of the target object, and these references
876 are only created when expanding the protected body.
878 2017-09-08 Yannick Moy <moy@adacore.com>
880 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
883 2017-09-08 Ed Schonberg <schonberg@adacore.com>
885 * exp_attr.adb (Build_Record_VS_Func): If the record is an
886 unchecked union, do not emit checks for its (non-existent)
887 discriminants, or for variant parts that depend on them.
889 2017-09-08 Justin Squirek <squirek@adacore.com>
891 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
892 Find_Comparison_Type.Try_One_Interp): Add check for generic
895 2017-09-08 Arnaud Charlet <charlet@adacore.com>
897 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
898 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
899 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
900 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
901 remaining references to AAMP_On_Target.
903 2017-09-08 Ed Schonberg <schonberg@adacore.com>
905 * style.adb: Fix typo.
907 2017-09-08 Javier Miranda <miranda@adacore.com>
909 * einfo.adb (Underlying_Type): Add missing support for class-wide
910 types that come from the limited view.
911 * exp_attr.adb (Attribute_Address): Check class-wide type
912 interfaces using the underlying type to handle limited-withed
914 (Attribute_Tag): Check class-wide type interfaces using
915 the underlying type to handle limited-withed types.
917 2017-09-08 Ed Schonberg <schonberg@adacore.com>
919 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
920 over a subtype of a type with a static predicate, taking into
921 account the predicate function of the parent type and the bounds
922 given in the loop specification.
923 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
924 a loop specification that is a subtype indication whose type mark
925 is a type with a static predicate, inherit predicate function,
926 used to build case statement for rewritten loop.
928 2017-09-08 Justin Squirek <squirek@adacore.com>
930 * lib-load.adb: Modify printing of error message to exclude file
933 2017-09-08 Arnaud Charlet <charlet@adacore.com>
935 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
936 don't inline subprograms declared in both visible and private
938 (In_Package_Spec): previously In_Package_Visible_Spec; now
939 detects subprograms declared both in visible and private parts
942 2017-09-08 Ed Schonberg <schonberg@adacore.com>
944 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
945 the type is an anonymous array in an object declaration, whose
946 component type has an invariant, use the object declaration
947 as the insertion point for the invariant procedure, given that
948 there is no explicit type declaration for an anonymous array type.
950 2017-09-08 Bob Duff <duff@adacore.com>
952 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
954 2017-09-08 Bob Duff <duff@adacore.com>
956 * a-strfix.adb (Trim): Compute Low and High only if needed.
958 2017-09-08 Justin Squirek <squirek@adacore.com>
960 * lib-load.adb (Load_Main_Source): Add error output in the case a
961 source file is missing.
963 2017-09-08 Bob Duff <duff@adacore.com>
966 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
967 Default_WCEM by default (i.e. if the encoding is not specified
970 2017-09-08 Bob Duff <duff@adacore.com>
972 * s-trasym.ads (Hexa_Traceback): If
973 Suppress_Hex is True, print "..." instead of a hexadecimal
975 * s-trasym.adb: Ignore No_Hex in this version.
978 2017-09-08 Bob Duff <duff@adacore.com>
980 * debug.adb: Minor reformatting.
982 2017-09-08 Bob Duff <duff@adacore.com>
984 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
985 code so it doesn't trigger an "uninit var" warning.
987 2017-09-08 Nicolas Roche <roche@adacore.com>
989 * s-hibaen.ads: Remove obsolete file.
991 2017-09-08 Arnaud Charlet <charlet@adacore.com>
993 * a-locale.ads: Add comment explaining the state of this package.
995 2017-09-08 Arnaud Charlet <charlet@adacore.com>
997 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
999 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
1000 allow calls in the context of package spec (for pragma
1001 Initializes) and bodies (for pragma Refined_State).
1003 2017-09-08 Bob Duff <duff@adacore.com>
1005 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
1008 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1010 * debug.adb (dA): Adjust comment.
1011 * gnat1drv.adb (Gnat1drv): Likewise.
1012 * opt.ads (List_Representation_Info_Extended): New variable.
1013 * repinfo.adb (List_Record_Info): Split implementation into...
1014 (Compute_Max_Length): ...this. Recurse on records if requested.
1015 (List_Record_Layout): Likewise.
1016 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
1017 statement, accept '0' and set List_Representation_Info_Extended
1019 * usage.adb (Usage): Document new -gnatRe variant.
1021 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1023 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1024 Do not save the given entity in the global variable Default_Pool
1025 if the pragma appears within a generic unit.
1027 2017-09-08 Bob Duff <duff@adacore.com>
1029 * errout.adb (Delete_Warning): Do not
1030 decrement Warnings_Treated_As_Errors. This is called before
1031 Warnings_Treated_As_Errors has been incremented to account for
1032 this warning. Decrementing it here can lead to negative values
1033 of Warnings_Treated_As_Errors, raising Constraint_Error in
1034 checks-on builds, and causing the compiler to return an error
1035 code in checks-off builds.
1037 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1039 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
1040 entities of named concurrent types as Ref_Id and not of anonymous
1041 concurrent objects (because callers already know when a conversion
1042 is necessary and can easily do it); also, do not expect protected
1043 types or protected objects as Context_Id (because no flow-related
1044 SPARK pragmas are attached there); reflect these changes in a
1045 more precise comment.
1047 2017-09-08 Olivier Hainque <hainque@adacore.com>
1049 * g-altive.ads: Add documentation.
1051 2017-09-08 Bob Duff <duff@adacore.com>
1053 * sem_util.ads, debug.adb: Minor comment fix.
1054 * erroutc.ads: Comment fix.
1056 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1058 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
1059 for compatibility of component types of formal and actual in an
1060 instantiation of a child unit, when the component type of the
1061 formal is itself a formal of an enclosing generic.
1063 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1065 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
1066 sem_prag.adb to make it available for GNATprove; for concurrent
1067 types replace custom scope climbing with Scope_Same_Or_Within; for
1068 single concurrent objects add scope climbing (with Scope_Within),
1069 which was not there (that's the primary semantic change of this
1070 commit); also, when comparing a single concurrent object with
1071 its corresponding concurrent type rely on equality of types,
1072 not of objects (because that's simpler to code).
1073 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
1074 (Analyze_Global_Item): adjust special-casing of references to the
1075 current instance of a concurrent unit in the Global contracts
1076 of task types and single tasks objects; similar for references
1077 in the protected operations and entries of protected types and
1078 single protected objects (in all these cases the current instance
1079 behaves as an implicit parameter and must not be mentioned in
1080 the Global contract).
1082 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1084 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
1085 function calls returning a record within a subprogram call,
1088 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1090 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
1091 name that designates the current instance of a child unit in its
1092 own body and appears as the prefix of a reference to an entity
1093 local to the child unit.
1094 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
1097 2017-09-08 Yannick Moy <moy@adacore.com>
1099 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
1102 2017-09-08 Tristan Gingold <gingold@adacore.com>
1104 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
1105 warnings on internal units in configurable run time mode.
1107 2017-09-08 Bob Duff <duff@adacore.com>
1109 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
1110 representation items from interfaces that the derived type
1111 implements, not just from the parent type.
1112 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
1113 this to return an empty list when there are no interfaces.
1114 * einfo.ads, sem_ch13.adb: Minor comment fixes.
1115 * sem_attr.adb: Minor comment fix.
1117 2017-09-08 Doug Rupp <rupp@adacore.com>
1119 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
1122 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1124 * exp_ch4.adb (Expand_N_Allocator): Generate a
1125 call to Allocate_Any_Controlled when the allocation does not
1126 require any initialization.
1128 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1130 * sem_util.adb (Copy_Node_With_Replacement):
1131 Update the Renamed_Object field of a replicated object renaming
1134 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
1136 * exp_ch9.adb (Is_Pure_Barrier): Allow type
1137 conversions and components of objects. Simplified the detection
1138 of the Count attribute by identifying the corresponding run-time
1141 2017-09-08 Yannick Moy <moy@adacore.com>
1143 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
1144 sem_type.adb, sinfo.ads: Minor reformatting.
1146 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1148 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
1149 of Freeze_Profile, used to inhibit the freezing of the profile
1150 of an expression function declared within a nested package, when
1151 some type in the profile depends on a private type declared in
1152 an enclosing package.
1154 2017-09-08 Bob Duff <duff@adacore.com>
1156 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
1157 the subunit case. It's still OK to set it in the "missing subunits"
1158 case, because that won't cause the obsolete .ali files that cause
1161 2017-09-08 Bob Duff <duff@adacore.com>
1163 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
1164 unclear why this didn't cause a warning.
1165 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
1166 pragmas. It's unclear why this didn't cause an error.
1168 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1170 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
1172 (Expand_SPARK_Potential_Renaming): Code clean up.
1173 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
1174 the item does not have a proper entity.
1175 (Analyze_Input_Item): Add a guard in case the item does not have a
1177 (Collect_States_And_Objects): Include object renamings in the
1178 items being collected.
1179 (Resolve_State): Update the documentation of this routine.
1180 * sem_util.adb (Entity_Of): Add circuitry to handle
1181 renamings of function results.
1182 (Remove_Entity): New routine.
1183 (Remove_Overloaded_Entity): Take advantage of factorization.
1184 * sem_util.ads (Entity_Of): Update the documentation
1186 (Remove_Entity): New routine.
1187 (Remove_Overloaded_Entity): Update the documentation of this
1190 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1192 * repinfo.adb (List_Record_Info): During first loop,
1193 do not override the normalized position and first bit
1194 if they have already been set. Move fallback code
1195 for the packed case to the case where it belongs.
1196 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
1197 Also adjust the normalized position of components.
1198 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
1200 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1202 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
1203 the placement of a primitive operation O that renames an operation
1204 R declared in an inner package, and which is thus not a primitive
1205 of the dispatching type of O. In this case O is a new primitive
1206 and does not inherit its dispatch table position from R (which
1209 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1211 * sem_dim.adb (Analyze_Dimension_If_Expression,
1212 Analyze_Dimension_Case_Expression): new subprograms to verify
1213 the dimensional correctness of Ada2012 conditional expressions,
1214 and set properly the dimensions of the construct.
1215 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
1216 call Analyze_Dimension.
1218 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1220 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
1221 loop on an interface declared as a private extension of another
1222 synchronized interface.
1224 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1226 * sem_ch12.adb (Check_Generic_Parent): New procedure within
1227 Analyze_Associations, to handle actual packages that depend on
1228 previous instances. If a package IAP that is an instantiation is
1229 used as an actual in a subsequent instantiation SI in the same
1230 scope, and IAP has a body, IAP must be frozen before SI. If
1231 the generic parent of IAP is itself declared in a previous
1232 instantiation in the same scope, that instantiation must also
1233 be frozen before SI.
1234 (Install_Body): Prevent double insertion of freeze node for
1237 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1239 * sem_prag.adb (Resolve_State): Update the
1240 comment on documentation. Generate a reference to the state once
1241 resolution takes place.
1243 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1245 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1246 Linker_Section): If the aspect applies to an object declaration
1247 with explicit initialization, do not delay the freezing of the
1248 object, to prevent access-before-elaboration in the generated
1249 initialization code.
1251 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1253 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
1254 (Integer_Value (Item)) when the size of the fixed decimal type
1255 is larger than Integer.
1257 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1260 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
1261 in order of increasing position in more cases.
1263 2017-09-07 Yannick Moy <moy@adacore.com>
1265 * a-exetim-mingw.ads: Add contract Global=>null
1266 on all operations that are modeled as having no read or write
1267 of global variables in SPARK.
1269 2017-09-07 Raphael Amiard <amiard@adacore.com>
1271 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
1272 to Hmaps.Generic_Ops.
1273 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
1275 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
1277 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
1278 position in cursors.
1280 2017-09-07 Javier Miranda <miranda@adacore.com>
1282 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
1283 allow disabling the generation of implicit pragma Elaborate_All
1286 2017-09-07 Javier Miranda <miranda@adacore.com>
1288 * exp_disp.adb (Make_Tags): Avoid suffix counter
1289 in the external name of the elaboration flag. Required to fix
1290 the regressions introduced by the initial version of this patch.
1292 2017-09-07 Bob Duff <duff@adacore.com>
1294 * sem_ch6.adb (Analyze_Function_Return): Do not
1295 insert an explicit conversion to force the displacement of the
1296 "this" pointer to reference the secondary dispatch table in the
1297 case where the return statement is returning a raise expression,
1298 as in "return raise ...".
1300 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1302 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
1303 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
1304 procedure from sem_disp.adb.
1305 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
1307 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
1308 return the instantiation node for subprograms. Update references
1309 to Get_Unit_Instantiation_Node.
1310 * sem_ch7.adb (Install_Parent_Private_Declarations): update
1311 reference to Get_Unit_Instantiation_Node.
1312 * exp_dist.adb (Build_Package_Stubs): update reference to
1313 Get_Unit_Instantiation_Node.
1314 * sem_ch9.adb: minor typo in comment.
1315 * lib-xref-spark_specific.adb
1316 (Traverse_Declaration_Or_Statement): traverse into task type
1319 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1321 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
1322 to handle properly various cases of type conversions where the
1323 target type and/or the expression carry dimension information.
1324 (Dimension_System_Root); If a subtype carries dimension
1325 information, obtain the source parent type that carries the
1328 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
1330 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
1332 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1334 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
1335 If the prefix is a reference to an object, rewrite it as an
1336 explicit dereference, as required by 3.7.2 (2) and as is done
1337 with most other attributes whose prefix is an access value.
1339 2017-09-07 Bob Duff <duff@adacore.com>
1341 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
1342 Refined_Depends aspect.
1343 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
1344 Refined_Depends pragma.
1345 * scans.ads: Fix documentation of Inside_Depends flag.
1346 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
1348 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
1350 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
1351 Account for the case where the are no lists to insert, but the
1352 secondary stack still requires management.
1353 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
1354 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
1355 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
1356 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
1359 2017-09-07 Vincent Celier <celier@adacore.com>
1361 * clean.adb: Do not get the target parameters before calling
1364 2017-09-07 Nicolas Roche <roche@adacore.com>
1366 * s-osinte-solaris-posix.ads: Removed.
1368 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1370 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
1371 single concurrent objects.
1373 2017-09-07 Javier Miranda <miranda@adacore.com>
1375 * s-regexp.ads: Fix documentation of the globbing grammar.
1377 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1379 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
1381 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1383 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
1384 in CodePeer mode, to support more legacy code automatically.
1386 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1388 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
1389 and thus not a controlling argument, preserve its type after
1390 rewriting because it may appear in an nested call with a classwide
1393 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1395 * comperr.adb (Delete_SCIL_Files): Handle case of
1396 N_Package_Instantiation.
1398 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1400 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
1401 clause for a unit U appears in a context that includes a regular
1402 with_clause on U, rewrite the redundant private clause into a null
1403 statement, rather than removing it altogether from the context,
1404 so that ASIS tools can reconstruct the original source.
1406 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1408 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
1409 for aspect Small can be of any real type (not only a universal
1410 real literal) as long as it is a static constant.
1412 2017-09-07 Thomas Quinot <quinot@adacore.com>
1414 * par_sco.adb: Minor reformatting.
1416 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1418 * s-parame-ae653.ads: Removed.
1420 2017-09-07 Nicolas Roche <roche@adacore.com>
1422 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
1423 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
1424 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
1425 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
1426 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
1427 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
1429 2017-09-07 Yannick Moy <moy@adacore.com>
1431 * a-ngelfu.ads Add preconditions to all functions
1432 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
1434 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1436 * lib-xref.adb (Generate_Reference): ignore
1437 references to entities which are Part_Of single concurrent
1440 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1442 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
1445 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1447 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
1448 Null_Task_Id is passed.
1450 2017-09-07 Javier Miranda <miranda@adacore.com>
1452 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
1453 attribute. Defined for record types and subtypes.
1454 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
1455 (Init_Tags_List) to facilitate generating separate code in the
1456 IP routine to initialize the object components and for completing
1457 the elaboration of dispatch tables.
1458 * exp_ch3.adb (Build_Init_Procedure): Improve the code
1459 generated in the IP routines by means of keeping separate
1460 the initialization of the object components from the
1461 initialization of its dispatch tables. (Init_Secondary_Tags):
1462 Adding new formal (Init_Tags_List) and adjusting calls to
1463 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
1464 adjusting also calls to Ada.Tags.Register_Interface_Offset
1465 because the type of one of its formals has been changed.
1466 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
1467 modified. Instead of receiving a pointer to an object this
1468 routine receives now a primary tag.
1469 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
1470 additional formal: the tag of the primary dispatch table.
1471 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
1472 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
1473 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
1474 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
1475 formal in calls to Init_Secondary_Tags.
1477 2017-09-07 Javier Miranda <miranda@adacore.com>
1479 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
1481 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
1482 applied to generic subprograms.
1484 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1486 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
1487 (because it refers to the anonymous concurrent object, not its type);
1488 fix condition for emitting error message about task/protected type,
1490 2017-09-07 Bob Duff <duff@adacore.com>
1492 * binde.adb (Debug_Flag_Old): If both -do and -dp
1493 are specified, behave as if just -do was specified, rather than
1496 2017-09-07 Nicolas Roche <roche@adacore.com>
1498 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
1499 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
1501 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1503 * sem_prag.adb (Find_Role): The Global_Seen flag
1504 is now consulted not only for abstract states and variables,
1505 but for all kinds of items.
1506 (Collect_Subprogram_Inputs_Outputs): Do not process formal
1507 generic parameters, because unlike ordinary formal parameters,
1508 generic formals only act as input/ outputs if they are explicitly
1509 mentioned in a Global contract.
1511 2017-09-07 Yannick Moy <moy@adacore.com>
1513 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
1514 predicate procedure. Check predicate pragma/aspect with Ghost entity.
1515 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
1518 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1520 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
1522 * sem_ch3.adb (Build_Derived_Record_Type):i Call
1523 Copy_Dimensions_Of_Components after creating the copy of the
1525 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
1526 derived recor type, copy the dikensions if any of each component
1527 of the parent record to the corresponding component declarations
1528 of the derived record. These expressions are used among other
1529 things as default values in aggregates with box associations.
1530 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
1531 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
1534 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1536 * sem_util.adb: Remove extra space after THEN.
1538 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1540 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
1541 also mark the renamed subprogram as referenced.
1543 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1545 * par-ch6.adb (P_Subprogram): Improve error message on null
1546 procedure with misplaced aspect specification, which the parser
1547 first attempts to interpret as a malformed expression function.
1549 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1551 * sem_attr.adb (Analyze_Attribute_Old_Result):
1552 Allow attributes Result and Old in the case of an expression
1555 2017-09-07 Justin Squirek <squirek@adacore.com>
1557 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
1558 Volatile to subcomponents.
1560 2017-09-07 Bob Duff <duff@adacore.com>
1562 * exp_ch7.adb (Find_Last_Init): Check for the
1563 case where a build-in-place function call has been replaced by a
1564 'Reference attribute reference.
1566 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1568 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
1571 2017-09-07 Bob Duff <duff@adacore.com>
1573 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
1574 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
1575 secondary stack for all functions that return limited tagged
1576 types -- just do it for dispatching calls. Misc cleanup.
1577 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
1578 remove qualifications and type conversions. Fix various bugs
1579 where only a single level of qualification or conversion was
1580 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
1582 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
1585 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1587 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
1588 do not create actual subtypes that may generate further predicate
1590 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
1591 of body is a predicate function as well.
1592 (Resolve_Aspect_Expressions, Resolve_Name): For a component
1593 association, only the expression needs resolution, not the name.
1594 (Resolve_Aspect_Expressions, case Predicates): Construct and
1595 analyze the predicate function declaration in the scope of the
1596 type, before making the type and its discriminants visible.
1598 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1600 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
1601 only if the record type itself comes from source.
1603 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1605 * sem_ch5.adb: Minor reformatting and a typo fix
1607 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1609 * sinput-l.ads: minor remove extra period at the end of comment
1611 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1613 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
1615 (Find_Role): remove support for E_Discriminant.
1617 2017-09-06 Javier Miranda <miranda@adacore.com>
1619 * exp_ch6.adb (Expand_Simple_Function_Return):
1620 Add missing implicit type conversion to force displacement of the
1623 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1625 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
1627 2017-09-06 Yannick Moy <moy@adacore.com>
1629 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
1630 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
1632 2017-09-06 Bob Duff <duff@adacore.com>
1634 * sem_ch8.adb: Change Assert to be consistent with
1637 2017-09-06 Bob Duff <duff@adacore.com>
1639 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
1640 requested. Previously, the -do switch meant "run Elab_New and
1641 Elab_Old and use the order chosen by Elab_Old, possibly with
1642 debugging printouts comparing the two orders." Now it means
1643 "do not run Elab_New." This is of use if there are bugs that
1644 cause Elab_New to crash.
1645 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
1647 * ali.ads (Elab_Position): Change type to Nat, to avoid various
1650 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1652 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
1653 reference to SPARK RM.
1655 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1657 * layout.adb: Use SSU short hand consistently throughout the file.
1659 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1661 * freeze.adb (Freeze_Record_Type)
1662 <Sized_Component_Total_Round_RM_Size>: New local variable to
1663 accumulate the rounded RM_Size of components. Update it for
1664 every component whose RM_Size is statically known. Add missing
1665 guard to check that bit packing is really required before issuing
1666 the error about packing. Swap condition for clarity's sake.
1667 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
1669 2017-09-06 Fedor Rybin <frybin@adacore.com>
1671 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
1672 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
1673 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
1674 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
1675 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
1676 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
1677 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
1678 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
1679 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
1680 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
1681 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
1682 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
1683 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
1684 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
1685 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
1686 project manager sources.
1688 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1690 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
1691 entity of a mutable type and the right-hand side is a conditional
1692 expression, resolve the alternatives of the conditional using
1693 the base type of the target entity, because the alternatives
1694 may have distinct subtypes. This is particularly relevant if
1695 the alternatives are aggregates.
1697 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1699 * checks.adb (Apply_Predicate_Check): If the expression is an
1700 aggregate that is the RHS of an assignment, apply the check to
1701 the LHS after the assignment, rather than to the aggregate. This
1702 is more efficient than creating a temporary for the aggregate,
1703 and prevents back-end crashes when the aggregate includes a
1704 dynamic "others' association.
1706 2017-09-06 Yannick Moy <moy@adacore.com>
1708 * sem_ch12.adb (Analyze_Instance_And_Renamings):
1709 Set variable to ignore SPARK_Mode in instance before the analysis
1710 of the generated package declaration.
1712 2017-09-06 Yannick Moy <moy@adacore.com>
1714 * sem_res.adb (Resolve_Call): Do not issue a
1715 message for calls inside expression function, unless body was
1716 seen and is candidate for inlining.
1718 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1720 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
1721 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
1722 body. do not freeze the formals of the generic unit.
1724 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1726 * errout.adb (Error_Msg): Separate the
1727 treatment for warning vs. style messages in inlinings and
1728 instantiations. Prevents blowups on calls to Warn_Insertion for
1729 style messages, which should not be called in that case because
1730 Warning_Msg_Char is not set.
1732 2017-09-06 Justin Squirek <squirek@adacore.com>
1734 * sem_prag.adb (Check_VFA_Conflicts): Created
1735 to group all Volatile_Full_Access checks relating to other
1736 representation pragmas (Mark_Component_Or_Object): Created
1737 to centeralize the flagging of attributes for the record type
1738 component case, a pragma applied individually to a component, and
1740 (Process_Atomic_Independent_Shared_Volatile):
1741 Add propagation of certain pragmas to record components and move
1742 evaluation of VFA checks
1744 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1746 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
1747 Do not warn on conditions that are not obeyed for Inline_Always
1748 subprograms, when assertions are not enabled.
1750 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1752 * sem_util.adb (Unique_Entity): For abstract states return their
1755 2017-09-06 Bob Duff <duff@adacore.com>
1757 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
1758 that is a proper body corresponding to a stub, we defer the
1759 adjustment of the sloc until after the correct adjustment has
1760 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
1761 the adjustment, because it will be outside the range in (the old,
1762 incorrect) S_Adjustment.
1763 * inline.adb: Use named notation for readability and uniformity.
1764 * sinput-l.adb: Minor improvements to debugging output printed
1766 * sinput-l.ads (Create_Instantiation_Source): Minor comment
1769 2017-09-06 Vincent Celier <celier@adacore.com>
1771 * make.adb: Do not invoke gprbuild for -bargs -P.
1773 2017-09-06 Sylvain Dailler <dailler@adacore.com>
1775 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
1776 case when Op is of kind N_Qualified_Expression. In this case,
1777 the function is called recursively on the subexpression like in
1779 * make.adb: Minor reformatting
1781 2017-09-06 Justin Squirek <squirek@adacore.com>
1783 * einfo.adb (Set_Linker_Section_Pragma): Modify
1784 Set_Linker_Section_Pragma to be consistant with the "getter"
1785 Linker_Section_Pragma.
1786 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
1787 checking for container loops so that the index cursor is not
1788 directly changable by the user with the use of E_Loop_Parameter.
1789 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
1790 * sem_warn.adb (Check_References): Revert previous change.
1792 2017-09-06 Bob Duff <duff@adacore.com>
1794 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
1797 2017-09-06 Yannick Moy <moy@adacore.com>
1799 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
1800 declarations to only consider valid uses of Global/Depends those on
1801 single concurrent objects.
1803 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1805 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
1806 error as soon as one of the specified components overlaps the
1809 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1811 * sem_prag.ads: minor fix typo in comment.
1813 2017-09-06 Justin Squirek <squirek@adacore.com>
1815 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
1816 from source before checking source references.
1817 * sem_warn.adb (Check_References): Add check for internal block
1820 2017-09-06 Vincent Celier <celier@adacore.com>
1822 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
1823 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
1824 gnatname.adb: Remove the Project Manager from the GNAT tools.
1825 * gcc-interface/Makefile.in: ditto.
1827 2017-09-06 Bob Duff <duff@adacore.com>
1829 * sem_util.ads: Minor comment fix.
1831 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1833 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
1834 Generate a freeze node for the actual of a formal package, if
1835 the actual is declared in the same unit and has a corresponding
1836 body, to prevent the current instance from being frozen before
1839 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1841 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
1843 2017-09-06 Yannick Moy <moy@adacore.com>
1845 * sem_warn.adb: Minor refactoring.
1847 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1849 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
1850 to retrieve the inherited classwide precondition/postcondition
1852 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
1853 freezing a subprogram, to complete the generation of the
1854 corresponding checking code.
1856 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1858 * exp_util.adb (Is_Controlled_Indexing): New routine.
1859 (Is_Displace_Call): Use routine Strip to remove indirections.
1860 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
1861 missing case of controlled generalized indexing.
1862 (Is_Source_Object): Use routine Strip to remove indirections.
1863 (Strip): New routine.
1865 2017-09-06 Bob Duff <duff@adacore.com>
1867 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
1868 we include the proper header. Otherwise, we just declare the necessary
1869 things from the capabilities library. This is so we can build on
1870 machines without that library, while still enabling that library.
1871 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
1872 simply return 0 if the library is not present, or not included
1875 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
1877 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
1878 for renamings that involve function calls in prefix form.
1880 2017-09-06 Bob Duff <duff@adacore.com>
1882 * sem_ch3.adb (Analyze_Subtype_Declaration):
1883 Set Has_Delayed_Freeze on a subtype of an incomplete type.
1885 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
1887 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
1888 has no parameter specification and no entry index, use the entry name
1889 as the end of the generated SCO statement.
1891 2017-09-06 Steve Baird <baird@adacore.com>
1893 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
1894 uses of 'Image and related attributes as having side effects in
1895 order to avoid replicating such uses.
1896 * pprint.ads (Expression_Image) Add new generic formal flag
1897 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
1898 (eventually) override the default.
1899 * pprint.adb (Expression_Image) If the new flag is set, then
1900 suppress the ".all" suffix when displaying a dereference whose
1901 prefix is a use of a value-capturing compiler temp of the sort
1902 generated by Expr_Util.Remove_Side_Effects .
1903 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
1904 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
1906 * inline.adb: Minor wording change.
1908 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1910 * sem_ch7.adb: Update comment.
1912 2017-09-06 Yannick Moy <moy@adacore.com>
1914 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
1915 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
1916 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
1917 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
1918 so that applies to any entity.
1920 2017-09-06 Yannick Moy <moy@adacore.com>
1922 * sem_ch3.adb (Derived_Type_Declaration): Use
1923 Incomplete_Or_Partial_View rather than local Find_Partial_View.
1925 2017-09-06 Javier Miranda <miranda@adacore.com>
1927 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
1930 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1932 * sem_dim.adb (Analyze_Dimension): In an instance, a type
1933 conversion takes its dimensions from the expression, not from
1935 (Dimensions_Of_Operand): Ditto.
1937 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1939 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
1940 null procedures when GNAT coverage is used, so that their (empty)
1941 bodies are properly covered.
1943 2017-09-06 Bob Duff <duff@adacore.com>
1945 * sem_ch13.adb (Resolve_Aspect_Expressions): If
1946 the entity is a type with discriminants, make the discriminants
1947 directly visible in aspect clauses.
1949 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1951 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
1952 Universal_Real and the context is a floating-point type, resolve
1953 both operands to the target type.
1955 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1957 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
1958 sem_ch3.adb, sem_util.adb: Minor reformatting.
1960 2017-09-06 Yannick Moy <moy@adacore.com>
1962 * freeze.adb (Check_Inherited_Conditions): Rewriting
1963 of inherited preconditions and postconditions should only occur
1964 in GNATprove mode, that is, when GNATprove_Mode is True, not to
1965 be confused with SPARK_Mode being On.
1967 2017-09-06 Yannick Moy <moy@adacore.com>
1969 * sem_warn.adb (Check_References): Take into
1970 account possibility of attribute reference as original node.
1972 2017-09-06 Yannick Moy <moy@adacore.com>
1974 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
1977 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1979 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
1980 on the procedure created to encapsulate the body.
1981 * sem_ch7.adb: Add with clause for GNAT.HTable.
1982 (Entity_Table_Size): New constant.
1983 (Entity_Hash): New function.
1984 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
1985 (Is_Subprogram_Ref): Rename into...
1986 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
1987 the table instead of bailing out on them. Scan the value of constants
1988 if it is not known at compile time.
1989 (Contains_Subprograms_Refs): Rename into...
1990 (Scan_Subprogram_Refs): ...this.
1991 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
1992 Is_Public flag on subprograms if they are not actually referenced.
1993 (Hide_Public_Entities): Beef up comment on the algorithm.
1994 Reset the table of subprograms on entry.
1996 2017-09-06 Yannick Moy <moy@adacore.com>
1998 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
2000 2017-09-06 Javier Miranda <miranda@adacore.com>
2002 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
2003 cannot handle a type conversion of an array as an aggregate
2006 2017-09-06 Bob Duff <duff@adacore.com>
2008 * g-comlin.adb (Try_Help): Remove ".exe" so we
2009 get the same results on windows and unix.
2011 2017-09-06 Justin Squirek <squirek@adacore.com>
2013 * exp_imgv.adb (Expand_Image_Attribute),
2014 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
2015 Added case to handle new-style 'Image expansion
2016 (Rewrite_Object_Image): Moved from exp_attr.adb
2017 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2018 attribute cases so that the relevant subprograms in exp_imgv.adb
2019 handle all expansion.
2020 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
2021 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
2022 cases to call common function Analyze_Image_Attribute.
2023 (Analyze_Image_Attribute): Created as a common path for all
2024 image attributes (Check_Object_Reference_Image): Removed
2025 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2026 Removed and refactored into Is_Object_Image (Is_Object_Image):
2027 Created as a replacement for Is_Image_Applied_To_Object
2029 2017-09-06 Yannick Moy <moy@adacore.com>
2031 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
2032 message for missing input.
2034 2017-09-06 Yannick Moy <moy@adacore.com>
2036 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
2037 of protected subprograms and entries.
2038 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
2039 New function to detect when a subprogram of entry is defined
2040 inside a protected object.
2042 2017-09-06 Bob Duff <duff@adacore.com>
2044 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
2045 whether the current process has the CAP_SYS_NICE capability.
2046 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
2047 ceiling priorities if the current process has the CAP_SYS_NICE
2050 2017-09-06 Bob Duff <duff@adacore.com>
2052 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
2053 check back to the body, because SPARK is not yet ready for
2054 "or else raise Constraint_Error".
2056 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2058 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
2059 procedure by a single null statement, after evaluating the
2060 actuals that require it.
2062 2017-09-06 Javier Miranda <miranda@adacore.com>
2064 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
2065 Generating C code improve the code that checks the use of nested
2066 aggregates to initialize object declarations.
2068 2017-09-06 Yannick Moy <moy@adacore.com>
2070 * sem_ch3.adb (Derived_Type_Declaration): Detect
2071 violations of new rule SPARK RM 3.4(1). Also refactor existing
2072 check to use the new function Find_Partial_View.
2074 2017-09-06 Vincent Celier <celier@adacore.com>
2076 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
2077 from the Prj hierarchy has been removed from the GNAT driver.
2079 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2081 * sem_type.adb (Interface_Present_In_Ancestor): Within an
2082 expression function, or within a spec expression (default value,
2083 etc) a reference to an incomplete type is legal: legality of
2084 the operation will be checked when some related entity (type,
2085 object or subprogram) is frozen.
2087 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2089 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
2090 adjustments and a typo fix.
2092 2017-09-06 Yannick Moy <moy@adacore.com>
2094 * sem_res.adb (Resolve_Call): Do not issue info
2095 message about inlining of calls to functions in assertions,
2096 for functions whose body has not been seen yet.
2098 2017-09-06 Bob Duff <duff@adacore.com>
2100 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
2101 we can use modern Ada in this package.
2102 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
2103 Move Ada.Command_Line.Response_File to System.Response_File,
2104 and make Ada.Command_Line.Response_File into a rename of
2105 System.Response_File. This is to avoid having gnatbind depend
2106 Ada.Command_Line, which would damage the bootstrap process now
2107 that Ada.Command_Line contains modern Ada (the raise expression).
2108 * gnatbind.adb: Avoid dependence on
2109 Ada.Command_Line. Depend on System.Response_File instead
2110 of Ada.Command_Line.Response_File. Change one call to
2111 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
2112 to Ada.Command_Line.Argument_Count to use Arg_Count.
2113 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
2115 2017-09-06 Bob Duff <duff@adacore.com>
2117 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
2118 switch, because we've already read gnat.adc by default.
2120 2017-09-06 Bob Duff <duff@adacore.com>
2122 * exp_ch5.adb (Get_Default_Iterator): Replace
2123 "Assert(False)" with "return Iter", because if an iterable
2124 type is derived from a noniterable one, then we won't find an
2125 overriding or inherited default iterator.
2127 2017-09-06 Yannick Moy <moy@adacore.com>
2129 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
2130 literal index used to access a string is null or negative.
2132 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2134 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
2135 allowed on loop parameters.
2136 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
2138 (Write_Field15_Name): Update the output for
2139 Status_Flag_Or_Transient_Decl.
2140 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
2141 to loop parameters. Update the documentation of the attribute
2142 and the E_Loop_Parameter entity.
2143 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
2144 which assumes that cursors can never be controlled.
2145 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
2146 guard which assumes that cursors can never be controlled.
2148 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2150 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
2151 sem_warn.adb: Minor reformatting.
2153 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2155 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
2156 fix and preserve older GNAT warning on overlapping actuals that
2157 are not elementary types.
2159 2017-09-06 Justin Squirek <squirek@adacore.com>
2161 * sem_attr.adb: Comment correction.
2163 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2165 * sem_util.adb: Minor reformatting.
2167 2017-09-06 Yannick Moy <moy@adacore.com>
2169 * a-comlin.ads (Argument): Add precondition for analysis.
2171 2017-09-06 Yannick Moy <moy@adacore.com>
2173 * sem_res.adb (Resolve): Update message for function call as statement.
2175 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2177 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
2178 generated bodies for renamings that are completions, when renamed
2179 procedure is No_Return.
2180 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
2181 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
2182 with No_Return, the renamed entity must be No_Return as well.
2184 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2186 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
2189 2017-09-06 Justin Squirek <squirek@adacore.com>
2191 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2192 attribute cases (Rewrite_Object_Reference_Image): Created to
2193 aid the rewriting of new-style 'Image attributes.
2194 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
2195 (Check_Object_Reference_Image): Created to handle verification of
2196 'Image with object-references as prefixes.
2197 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2198 Create predicate to identify cases where an 'Image attribute's
2199 prefix applies to an object reference.
2201 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2203 * freeze.adb (Freeze_Entity): Do not generate a freeze
2204 node for a generic unit, even if it includes delayed aspect
2205 specifications. Freeze nodes for generic entities must never
2206 appear in the tree that reaches the back-end of the compiler.
2208 2017-09-06 Yannick Moy <moy@adacore.com>
2210 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
2212 2017-09-06 Yannick Moy <moy@adacore.com>
2214 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
2215 to subprograms in other units as possibly inlined.
2217 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2219 * freeze.adb (Freeze_Entity): For a derived type that has no
2220 explicit delayed aspects but may inherit delayed aspects from its
2221 parent type, analyze aspect at freeze point for proper capture
2222 of an inherited aspect.
2224 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2226 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
2227 renamings; also, avoid repeated calls to Renamed_Object when getting
2228 through object renamings.
2230 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2232 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
2233 array type declaration in a private part, when an index is a
2234 subtype indication of a discrete type with a private partial view.
2236 2017-09-06 Javier Miranda <miranda@adacore.com>
2238 * exp_ch4.adb (Expand_Modular_Op): Force generating
2239 temporary to improve the generated code.
2241 2017-09-06 Tristan Gingold <gingold@adacore.com>
2243 * s-fatgen.adb: Minor typo fix in comment.
2245 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2247 * exp_ch5.adb (Make_Field_Assign): If the type
2248 of the right-hand side has stored constraint, use its values
2249 (except for those that are renamings of parent discriminants)
2250 to produce additional assignments for the discriminants of the
2251 left-hand side, which are invisible in the righ-hand side and
2252 not retrievable as selected components.
2254 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2256 * sem_util.adb (Needs_One_Formal): The first formal of such a
2257 function must be a controlling formal, so that Obj.F (X, Y)
2258 can have the interpretation F(Obj)(X, Y).
2259 * sem_util.ads: Clarify documentation.
2261 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2263 * table.ads, table.adb: Restore original implementation.
2264 * namet.h (Names_Ptr): Adjust back.
2265 (Name_Chars_Ptr): Likewise.
2266 * uintp.h (Uints_Ptr): Likewise.
2267 (Udigits_Ptr): Likewise.
2268 * g-table.ads: Remove pragma Compiler_Unit_Warning.
2269 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
2270 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
2271 * spark_xrefs.ads: Likewise.
2272 * scos.h: Undo latest changes.
2274 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2276 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
2277 No_Return flag to instance if pragma applies to generic unit. This
2278 must be done explicitly because the pragma does not appear
2279 directly in the generic declaration (unlike the corresponding
2280 aspect specification).
2282 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2284 * sem_ch7.adb (Has_Referencer): Move up and expand comment
2285 explaining the test used to detect inlining. Use same test
2286 in second occurrence.
2287 (Analyze_Package_Body_Helper): Minor formatting fixes.
2289 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2291 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
2292 derived type with a mixture of renamed and constrained parent
2293 discriminants, the constraint for the target must obtain the
2294 discriminant values from both the operand and from the stored
2295 constraint for it, given that the constrained discriminants are
2296 not visible in the object.
2297 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
2298 side may be derived from that of the left-hand side (as in the
2299 case of an assignment with a change of representation) so the
2300 discriminant to be used in the retrieval of the value of the
2301 component must be the entity in the type of the right-hand side.
2303 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2305 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
2306 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2307 * exp_util.adb (Is_Source_Object): Account for
2308 the cases where the source object may appear as a dereference
2309 or within a type conversion.
2310 * exp_ch6.adb: Fix missing space in error message.
2312 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2314 * sem_prag.adb: Update description of Eliminate.
2316 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2318 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
2319 properly an attribute reference 'Loop_Entry that appears in the
2320 list of indices of an indexed expression, to prevent an infinite
2321 loop in the compiler.
2323 2017-09-06 Bob Duff <duff@adacore.com>
2325 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
2327 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2329 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
2330 in a set membership is an overloaded enumeration literal, and
2331 the type of the alternative is resolved from a previous one,
2332 replace the entity of the alternative as well as the type,
2333 to prevent inconsistencies between the entity and the type.
2335 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2337 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
2338 (No_Component_Reordering_Specified): New switch.
2339 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
2340 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
2341 * bcheck.adb (Check_Consistent_No_Component_Reordering):
2343 (Check_Configuration_Consistency): Invoke it.
2344 * debug.adb (d.r): Toggle the effect of the switch.
2345 (d.v): Change to no-op.
2346 * einfo.ads (Has_Complex_Representation):
2347 Restrict to record types.
2348 (No_Reordering): New alias for Flag239.
2349 (OK_To_Reorder_Components): Delete.
2350 (No_Reordering): Declare.
2351 (Set_No_Reordering): Likewise.
2352 (OK_To_Reorder_Components): Delete.
2353 (Set_OK_To_Reorder_Components): Likewise.
2354 * einfo.adb (Has_Complex_Representation): Expect record types.
2355 (No_Reordering): New function.
2356 (OK_To_Reorder_Components): Delete.
2357 (Set_Has_Complex_Representation): Expect base record types.
2358 (Set_No_Reordering): New procedure.
2359 (Set_OK_To_Reorder_Components): Delete.
2360 (Write_Entity_Flags): Adjust to above change.
2361 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
2362 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
2363 OK_To_Reorder_Components on record types with convention Ada.
2364 * lib-writ.adb (Write_ALI): Deal with NC marker.
2365 * opt.ads (No_Component_Reordering): New flag.
2366 (No_Component_Reordering_Config): Likewise.
2367 (Config_Switches_Type): Add No_Component_Reordering component.
2368 * opt.adb (Register_Opt_Config_Switches): Copy
2369 No_Component_Reordering onto No_Component_Reordering_Config.
2370 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
2371 (Save_Opt_Config_Switches): Save No_Component_Reordering.
2372 (Set_Opt_Config_Switches): Set No_Component_Reordering.
2373 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
2374 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
2375 No_Reordering flag from the default.
2376 (Build_Derived_Private_Type): Likewise.
2377 (Build_Derived_Record_Type): Likewise. Then inherit it
2378 for untagged types and clean up handling of similar flags.
2379 (Record_Type_Declaration): Likewise.
2380 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
2381 remove redundant test on Is_Tagged_Type.
2382 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
2383 (Sig_Flags): Likewise.
2384 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
2385 (Pragma_Id): Add Pragma_No_Component_Reordering value.
2386 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
2387 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
2388 Copy the layout of the parent type only if the No_Reordering
2390 (components_to_record): Reorder record types with
2391 convention Ada by default unless No_Reordering is set or -gnatd.r
2392 is specified and do not warn if No_Reordering is set in GNAT mode.
2394 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2396 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
2397 new predicate to reject declarations that can be completions,
2398 when there is a visible prior homograph that is a null procedure.
2399 * sem_ch6.adb (Analyze_Null_Procedure): use it.
2400 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
2402 2017-09-06 Thomas Quinot <quinot@adacore.com>
2404 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
2405 run of 253 characters or more.
2407 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2409 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
2410 properly incomplete subtypes that may be created by explicit or
2411 implicit declarations.
2412 (Is_Base_Type): Take E_Incomplete_Subtype into account.
2413 (Subtype_Kind): Ditto.
2414 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
2415 Ekind of a subtype of a discriminated incomplete type.
2416 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
2417 incomplete types, to preserve error reporting.
2418 (Process_Incomplete_Dependents): Do not create a subtype
2419 declaration for an incomplete subtype that is created internally.
2420 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
2421 incomplete subtypes that do not require a completion, either
2422 because they are limited views, of they are generic actuals.
2424 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2426 * checks.adb (Insert_Valid_Check): Remove the
2427 suspicious manipulation of the Do_Range_Check flag as ths is
2428 no linger needed. Suppress validity check when analysing the
2429 validation variable.
2431 2017-09-06 Philippe Gil <gil@adacore.com>
2433 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
2436 2017-09-06 Bob Duff <duff@adacore.com>
2438 * sem_elim.adb: Minor comment fix.
2440 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2442 * sem_util.adb (Is_Object_Reference): A function call is an
2443 object reference, and thus attribute references for attributes
2444 that are functions (such as Pred and Succ) as well as predefined
2445 operators are legal in contexts that require an object, such as
2446 the prefix of attribute Img and the Ada2020 version of 'Image.
2448 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2450 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
2451 exp_ch3.adb, xoscons.adb: Minor reformatting.
2453 2017-09-06 Raphael Amiard <amiard@adacore.com>
2455 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
2456 Position parameter. If supplied, use it to provide efficient iteration.
2457 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
2458 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
2461 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2463 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
2464 designated type is class-wide and the expression is an unchecked
2465 conversion, preserve the conversion when checking the tag of the
2466 designated object, to prevent spurious semantic errors when the
2467 expression in the conversion has an untagged type (for example
2468 an address attribute).
2470 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2472 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
2473 operation is subject to a pragma Eliminate.
2475 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2477 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
2479 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2481 * fe.h (Eliminate_Error_Msg): Remove.
2483 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
2485 * gcc-interface/utils.c (make_packable_type): Update call to
2488 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
2490 * gcc-interface/utils2.c (build_load_modify_store):
2491 Use int_mode_for_size.
2493 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2496 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2497 for Itypes that are E_Record_Subtype with a cloned subtype.
2498 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
2500 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2502 * gcc-interface/trans.c (convert_with_check): Use a custom base type
2503 if the base type of the expression has a different machine mode.
2504 Rename a couple of parameters and local variable.
2506 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2508 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
2509 conversions around prefixes that are not references.
2511 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2513 * gcc-interface/utils.c (unchecked_convert): When the result type is a
2514 non-biased integral type with size 0, set the result to 0 directly.
2516 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2518 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
2519 (renaming_from_instantiation_p): ...this.
2520 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
2521 instead of explicit tests on kind of entities. Adjust for renaming.
2522 (gnat_to_gnu_profile_type): Likewise.
2523 (gnat_to_gnu_subprog_type): Likewise.
2524 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
2525 (Case_Statement_to_gnu): Likewise.
2526 (gnat_to_gnu): Likewise.
2527 (process_freeze_entity): Likewise.
2528 (process_type): Likewise.
2529 (add_stmt_with_node): Adjust for renaming.
2530 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
2531 (renaming_from_generic_instantiation_p): Rename to...
2532 (renaming_from_instantiation_p): ...this. Use inline predicate.
2533 (pad_type_hasher::keep_cache_entry): Fold.
2535 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2537 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
2538 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
2539 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
2540 (N_Slice): Likewise.
2541 (N_Selected_Component): Likewise. Do not try again to translate it.
2542 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
2544 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2546 * repinfo.ads: Document new treatment of dynamic values.
2547 (TCode): Bump upper bound to 29.
2548 (Dynamic_Val): New constant set to 29.
2549 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
2550 (Rep_Value) <Dynamic_Val>: Likewise.
2551 * repinfo.h (Dynamic_Val): New macro.
2552 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
2554 <INTEGER_CST>: Set TCODE instead of recursing.
2555 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
2556 <VAR_DECL>: New case.
2557 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
2558 <BIT_AND_EXPR>: Adjust.
2559 <CALL_EXPR>: Do not fall through.
2561 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2563 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
2564 there is no target, do not create a temporary for the return value for
2565 an allocator either.
2567 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2569 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
2570 unconstrained array type.
2572 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2573 Alan Hayward <alan.hayward@arm.com>
2574 David Sherwood <david.sherwood@arm.com>
2576 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
2577 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
2579 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2580 Alan Hayward <alan.hayward@arm.com>
2581 David Sherwood <david.sherwood@arm.com>
2583 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
2584 is_a <scalar_int_mode>.
2585 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
2586 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
2588 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2589 Alan Hayward <alan.hayward@arm.com>
2590 David Sherwood <david.sherwood@arm.com>
2592 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
2593 instead of mode_for_size.
2594 (gnat_to_gnu_subprog_type): Likewise.
2595 * gcc-interface/utils.c (make_type_from_size): Likewise.
2597 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2598 Alan Hayward <alan.hayward@arm.com>
2599 David Sherwood <david.sherwood@arm.com>
2601 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
2602 (fp_size_to_prec): Likewise.
2604 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2605 Alan Hayward <alan.hayward@arm.com>
2606 David Sherwood <david.sherwood@arm.com>
2608 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
2609 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
2611 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2612 Alan Hayward <alan.hayward@arm.com>
2613 David Sherwood <david.sherwood@arm.com>
2615 * gcc-interface/decl.c (validate_size): Update use of
2616 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
2618 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2619 Alan Hayward <alan.hayward@arm.com>
2620 David Sherwood <david.sherwood@arm.com>
2622 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
2623 (fp_size_to_prec): Likewise.
2625 2017-08-29 Martin Liska <mliska@suse.cz>
2628 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
2630 2017-08-08 Martin Liska <mliska@suse.cz>
2632 * gcc-interface/trans.c: Include header files.
2634 2017-07-29 Jakub Jelinek <jakub@redhat.com>
2636 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
2637 as new argument to the imported_module_or_decl debug hook.
2639 2017-07-25 Javier Miranda <miranda@adacore.com>
2641 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
2644 2017-07-19 Jakub Jelinek <jakub@redhat.com>
2646 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
2647 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
2648 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
2650 2017-07-18 Mike Frysinger <vapier@chromium.org>
2652 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
2653 (../../gnatlink$(exeext)): Likewise.
2655 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
2658 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
2659 (Backend_Overflow_Checks): Set to True.
2661 2017-06-23 Jakub Jelinek <jakub@redhat.com>
2663 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
2665 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
2667 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
2669 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
2671 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
2673 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
2674 imported subprograms for the current compilation unit as
2675 definitions. Disable debug info for references to variables.
2676 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
2677 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
2678 not built-in functions to their binding scope.
2679 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
2680 the function as a definition. Update all callers.
2681 (gnat_write_global_declarations): Emit debug info for imported
2682 functions. Filter out external variables for which debug info
2685 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
2688 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
2689 (i[3456]86-pc-gnu): Likewise.
2690 (x86_64 kfreebsd): Likewise.
2692 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2695 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
2697 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2700 * s-interr-hwint.adb: Reinstate.
2701 * gcc-interface/Makefile.in (RTEMS): Use it again.
2703 2017-06-08 Olivier Hainque <hainque@adacore.com>
2705 * vx_crtbegin_auto.c: Update year in copyright notice.
2706 * vx_crtbegin.c: Likewise.
2707 * vx_crtbegin.inc: Likewise.
2708 * vx_crtend.c: Likewise.
2710 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
2712 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
2713 * s-tpopsp-rtems.adb: Delete.
2715 2017-06-02 Olivier Hainque <hainque@adacore.com>
2717 * vx_crtbegin_auto.c: New file.
2718 * vx_crtbegin.c: New file.
2719 * vx_crtbegin.inc: New file.
2720 * vx_crtend.c: New file.
2722 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
2724 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
2725 const qualifiers that cause -Wignored-qualifiers warnings.
2727 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2729 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2730 for Itypes that are E_Access_Subtype.
2731 <E_Access_Subtype>: Use the DECL of the base type directly.
2733 2017-05-22 Ed Schonberg <schonberg@adacore.com>
2734 Eric Botcazou <ebotcazou@adacore.com>
2736 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
2737 limited view may appear in the profile of a function, and a call to
2738 that function in another unit in which the full view is available must
2739 use this full view to spurious type errors at the point of call.
2740 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
2741 of parent body with a with clause for the main unit.
2742 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
2743 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
2744 types declared in external units like types from limited with clauses.
2745 Adjust final processing of defer_limited_with_list accordingly.
2746 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
2747 again to translate the prefix after the field if it is incomplete.
2749 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2751 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
2752 alignment for simple volatile fields and remove associated errors.
2754 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2756 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
2757 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
2759 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
2761 * gcc-interface/utils.c (can_materialize_object_renaming_p):
2762 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
2763 process Original_Node instead of expanded names.
2765 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2767 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
2768 addressability check in the constrained case.
2770 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2772 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
2773 types not coming from a limited context.
2775 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2777 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
2778 the inlined list that are not public.
2779 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
2780 there is a pragma Inline_Always on the subprogram.
2782 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2784 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
2785 <N_Allocator>: Use properly typed constants.
2786 (extract_values): Move around.
2787 (pos_to_constructor): Minor tweaks.
2788 (Sloc_to_locus): Fix formatting.
2789 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
2790 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
2791 (Gigi_Equivalent_Type): Adjust head comment.
2792 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
2794 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2796 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
2797 is a representation clause on an extension, propagate the alignment of
2798 the parent type only if the platform requires strict alignment.
2800 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
2802 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
2803 instead of Word_Size.
2806 2017-03-28 Andreas Schwab <schwab@suse.de>
2809 * system-linux-aarch64-ilp32.ads: New file.
2810 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
2811 from LIBGNAT_TARGET_PAIRS.
2812 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
2813 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
2814 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
2815 or -mabi=ilp32, resp.
2817 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2820 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
2821 instead of Word_Size.
2823 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2825 * raise-gcc.c (exception_class_eq): Make ec parameter const.
2827 2017-05-02 Richard Biener <rguenther@suse.de>
2829 * gcc-interface/misc.c (gnat_post_options): Do not set
2832 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2834 * gcc-interface/trans.c (assoc_to_constructor): Make sure
2835 Corresponding_Discriminant is only called on discriminants.
2836 Skip the saving of the result only for them.
2837 (gnat_to_gnu) <N_Selected_Component>: Likewise.
2838 <N_Unchecked_Type_Conversion>: Translate the result type first.
2839 (gigi): Set TREE_NOTHROW on Begin_Handler.
2840 (stmt_list_cannot_raise_p): New predicate.
2841 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
2842 a cleanup if the statements of the handler cannot raise.
2843 (process_freeze_entity): Use Is_Record_Type.
2844 (process_type): Likewise.
2846 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2848 * einfo.ads (Corresponding_Record_Component): New alias
2849 for Node21 used for E_Component and E_Discriminant.
2850 * einfo.adb (Corresponding_Record_Component): New function.
2851 (Set_Corresponding_Record_Component): New procedure.
2852 (Write_Field21_Name): Handle Corresponding_Record_Component.
2853 * sem_ch3.adb (Inherit_Component): Set
2854 Corresponding_Record_Component for every component in
2855 the untagged case. Clear it afterwards for non-girder
2857 * gcc-interface/decl.c (gnat_to_gnu_entity)
2858 <E_Record_Type>: For a derived untagged type with discriminants
2859 and constraints, apply the constraints to the layout of the
2860 parent type to deduce the layout.
2861 (field_is_aliased): Delete.
2862 (components_to_record): Test DECL_ALIASED_P directly.
2863 (annotate_rep): Check that fields are present except for
2865 (create_field_decl_from): Add DEBUG_INFO_P
2866 parameter and pass it in recursive and other calls. Add guard
2867 for the manual CSE on the size.
2868 (is_stored_discriminant): New predicate.
2869 (copy_and_substitute_in_layout): Consider only
2870 stored discriminants and check that original fields are present
2871 in the old type. Deal with derived types. Adjust call to
2872 create_variant_part_from.
2874 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2876 * exp_ch6.adb (Expand_Call_Helper): When locating the
2877 accessibility entity created for an access parameter, handle
2878 properly a reference to a formal of an enclosing subprogram. if
2879 the reference appears in an inherited class-wide condition, it
2880 is the rewriting of the reference in the ancestor expression,
2881 but the accessibility entity must be that of the current formal.
2883 2017-05-02 Javier Miranda <miranda@adacore.com>
2885 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
2886 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
2887 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
2888 Call Expand_Non_Binary_Modular_Op.
2890 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2892 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
2893 has discriminants, do not override the Stored_Constraint list of
2894 the full view of the derived type with that of the derived type.
2896 2017-05-02 Bob Duff <duff@adacore.com>
2898 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
2900 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2902 * s-os_lib.ads: Minor typo fix.
2904 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2906 * gnatls.adb: Merge and refactor code from Prj.Env and remove
2907 this deprecated dependency.
2909 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2911 * exp_util.ads: minor comment addition.
2913 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2915 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
2916 pastos in part #3 of the head comment.
2918 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2920 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
2921 procedure body for a local (sub)type declaration within a
2922 predicate function. Invariant checks do not apply to these, and
2923 the expansion of the procedure will happen in the wrong scope,
2924 leading to misplaced freeze nodes.
2926 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2928 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
2929 to analyze generated actions. If the main unit is a body,
2930 the required scope is that of the corresponding unit declaration.
2932 2017-05-02 Arnaud Charlet <charlet@adacore.com>
2934 * einfo.adb (Declaration_Node): flip branches of
2935 an IF statement to avoid repeated negations in its condition;
2936 no change in semantics, only to improve readability.
2938 2017-05-02 Arnaud Charlet <charlet@adacore.com>
2940 * sem_case.adb: Remove extra spaces in parameter declarations.
2942 2017-05-02 Justin Squirek <squirek@adacore.com>
2944 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
2945 in usage line for new -gnatwE switch.
2947 2017-05-02 Claire Dross <dross@adacore.com>
2949 * a-cofuve.ads (Remove): Remove unnecessary
2950 conditions in precondition.
2952 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2954 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
2955 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
2957 2017-05-02 Justin Squirek <squirek@adacore.com>
2959 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
2960 alternative expression.
2961 * sem_res.adb (Resolve_Case_Expression): Ditto.
2963 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2965 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
2966 Refine predicate for the case where the primitive operation
2967 is a renaming of equality. An overriding operation that is
2968 a user-defined renaming of predefined equality inherits its
2969 slot from the overridden operation. Otherwise it is treated
2970 as a predefined op and occupies the same predefined slot as
2971 equality. A call to it is transformed into a call to its alias,
2972 which is the predefined equality. A dispatching call thus uses
2973 the proper slot if operation is further inherited and called
2974 with class-wide arguments.
2976 2017-05-02 Justin Squirek <squirek@adacore.com>
2978 * errout.adb (Set_Msg_Text): Add a case to switch the message
2979 type when the character '[' is detected signifying a warning
2980 about a run-time exception.
2981 * opt.ads Add a new Warning_Mode value for new switch
2982 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
2983 to handle new warning mode
2984 * usage.adb (Usage): Add usage entry for -gnatwE
2985 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
2987 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2989 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
2990 declaration that operates on some fixed point type.
2992 2017-05-02 Justin Squirek <squirek@adacore.com>
2994 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
2996 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2998 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
3000 2017-05-02 Justin Squirek <squirek@adacore.com>
3002 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3003 expression (Analyze_If_Expression): Add check for valid condition
3004 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
3006 * sem_res.adb (Resolve_If_Expression): Add check for valid
3007 condition and then-expression.
3009 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3011 * exp_ch3.adb (Build_Initialization_Call): Generate a null
3012 statement if the initialization call is a null procedure, as
3013 can happen with a controlled type with no explicit Initialize
3014 procedure, or an array of such.
3015 * exp_ch7.adb (Process_Object_Declaration): For a type with
3016 controlled components that has a trivial Initialize procedure,
3017 insert declaration for finalization counter after object
3019 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
3020 finalization block and attendant declarations if component has
3021 a trivial Initialize procedure.
3022 (Make_Init_Call): Do not generate a call if controlled type has
3023 a trivial Initialize procedure.
3025 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3027 * g-forstr.ads (Data): Move Format component last.
3028 * g-forstr.adb ("+"): Adjust for above change.
3029 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
3030 * g-sechas.ads (Context): Move Key last.
3031 * g-socket.ads (Service_Entry_Type): Move Aliases last.
3032 * s-fileio.adb (Temp_File_Record): Move Name last.
3033 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
3034 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
3036 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
3038 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
3039 switch introduced recently. finally not needed.
3041 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3043 * sem_ch6.adb (Analyze_Null_Procedure): Set the
3044 Corresponding_Body link for a null procedure declaration.
3046 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3048 * atree.h (Flag290): Add missing terminating parenthesis.
3049 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
3050 (Set_Is_Class_Wide_Clone): Likewise.
3051 * einfo.ads (Is_Class_Wide_Clone): Likewise.
3053 2017-05-02 Gary Dismukes <dismukes@adacore.com>
3055 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
3056 parameter Array_Comp to indicate the case of an array object
3057 with null-excluding components.
3058 * checks.adb (Null_Exclusion_Static_Checks):
3059 Call Compile_Time_Constraint_Error instead of
3060 Apply_Compile_Time_Constraint_Error in the component case. Also
3061 call that when Array_Comp is True, with an appropriate warning for
3062 the array component case. Only create an explicit initialization
3063 by null in the case of an object of a null-excluding access type
3064 (and no longer do that in the component case).
3065 * sem_ch3.adb (Check_Component): Add a Boolean parameter
3066 Array_Comp defaulted to False. Pass Empty for the Comp
3067 actual when calling Null_Exclusion_Static_Checks in the case
3068 where Comp_Decl matches Object_Decl, because we don't have a
3069 component in that case. In the case of an object or component
3070 of an array type, pass True for Array_Comp on the recursive call
3073 2017-05-02 Bob Duff <duff@adacore.com>
3075 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
3076 compute the linux priority from the Ada priority. Call this everywhere
3077 required. In particular, the previous version was not doing this
3078 computation when setting the ceiling priority in various places. It
3079 was just converting to C.int, which results in a ceiling that is off
3082 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3084 * sem_ch3.adb: Comment predicate inheritance.
3086 2017-05-02 Tristan Gingold <gingold@adacore.com>
3088 * s-trasym.ads: Add comment.
3090 2017-05-02 Bob Duff <duff@adacore.com>
3092 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
3093 * sem_ch4.adb: Minor reformatting.
3094 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
3095 * s-taspri-posix-noaltstack.ads: Minor refactoring.
3096 * sinput.ads: Minor typo fix.
3098 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3100 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
3101 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
3102 here from exp_ch9, to recognize objects whose creation requires
3103 dynamic allocation, so that the proper warning can be emitted
3104 when restriction No_Implicit_Heap_Allocation is in effect.
3105 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
3106 to emit proper warning when an object that requires dynamic
3107 allocation is declared.
3109 2017-05-02 Tristan Gingold <gingold@adacore.com>
3111 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
3113 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3115 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
3116 visibility rules for equality operators that apply within an
3117 instantiation apply within an inlined body.
3118 * sem_type.adb (Add_One_Interp): ditto.
3120 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3122 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
3125 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3128 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
3129 Name_No_Tagged_Streams): Move to regular pragmas. Add
3130 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
3131 and Secondary_Stack_Size.
3132 (Pragma_Id): Move Pragma_Assume,
3133 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
3134 Pragma_No_Tagged_Streams to second part.
3136 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3138 * exp_attr.adb: Minor reformatting.
3140 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3142 * sem_ch4.adb (Analyze_Selected_Component): Improve error
3143 detection for illegal references to private components or
3144 operations of a protected type in the body of the type.
3146 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3148 * opt.ads: Add missing GNAT markers in comments.
3149 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
3150 settings of Optimize_Alignment at the end.
3152 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3154 * checks.adb (Apply_Constraint_Check): Do not apply
3155 a discriminant check when the associated type is a constrained
3156 subtype created for an unconstrained nominal type.
3157 * exp_attr.adb: Minor reformatting.
3159 2017-05-02 Bob Duff <duff@adacore.com>
3161 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
3162 the N_Raise_Expression case.
3163 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
3166 2017-05-02 Yannick Moy <moy@adacore.com>
3168 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
3169 optimize length comparison in GNATprove mode.
3170 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
3171 operator /= into negation of operator = when needed.
3172 (Expand_SPARK): Call new
3173 function to expand operator /=.
3175 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3177 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
3178 Simplify the expression for a fixed-fixed division to remove
3179 divisions by constants whenever possible, as an optimization
3180 for restricted targets.
3182 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3184 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
3186 2017-05-02 Bob Duff <duff@adacore.com>
3188 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
3189 to find primitive ops, instead of using an Identifier that will
3190 later be looked up. This is necessary because these ops are not
3191 necessarily visible at all places where we need to call them.
3192 * exp_util.ads: Minor comment fix.
3194 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3196 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
3197 references are fully conformant if they are both expansions
3198 of the discriminant of a protected type, within one of the
3199 protected operations. One occurrence may be expanded into a
3200 constant declaration while the other is an input parameter to
3201 the corresponding generated subprogram.
3203 2017-05-02 Justin Squirek <squirek@adacore.com>
3205 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
3206 recursivly searching composite-types for null-excluding access
3207 types and verifying them.
3208 (Analyze_Object_Declaration): Add a
3209 call to Check_Null_Excluding_Components for static verification
3210 of non-initialized objects.
3211 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
3212 a parameter for a composite-type's component and an extra case
3213 for printing component information.
3215 2017-05-02 Yannick Moy <moy@adacore.com>
3217 * sem_ch10.adb (Analyze_Subunit): Take
3218 configuration pragma into account when restoring appropriate
3219 pragma for analysis of subunit.
3221 2017-05-02 Justin Squirek <squirek@adacore.com>
3223 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
3224 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
3225 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
3226 clauses from the runtime.
3228 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3230 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
3231 array components specially.
3233 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3235 * sem_ch8.adb (Premature_Usage): If the premature usage of
3236 an entity is as the expression in its own object decaration,
3237 rewrite the reference as Any_Id to prevent cascaded errors or
3238 compiler loops when such an entity is used in an address clause.
3240 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3242 * gcc-interface/decl.c (components_to_record): Add missing guard.
3244 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3246 * gcc-interface/decl.c (components_to_record): Add more comments.
3247 Put back pending fields onto the regular list if the misalignment
3248 happens to cancel itself.
3250 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3252 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
3253 controlling actual in a prefixed call, preserve the original node
3254 information if the prefix itself has been rewritten, for ASIS use.
3256 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3258 * exp_ch6.adb (Insert_Post_Call_Actions):
3259 Code clean up. Insert the post-call actions after an enclosing
3260 procedure call when N denotes a function call and appears as an
3261 actual parameter in the procedure call.
3263 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3265 * freeze.adb (Check_Component_Storage_Order): If there is a clause
3266 for the component, also reject the attribute if the component
3267 doesn't end on a byte boundary and its scalar storage order is
3268 different from that of the enclosing record type.
3270 2017-04-28 Javier Miranda <miranda@adacore.com>
3272 * atree.ads (Info_Messages): Removed.
3273 (Warning_Info_Messages): New counter.
3274 (Report_Info_Messages): New counter.
3275 * err_vars.ads Update documentation.
3276 * errout.adb (Delete_Warning_And_Continuations): Update
3277 Info_Message occurrences.
3278 (Error_Msg_Internal): Update Info_Message occurrences.
3279 (Delete_Warning): Update Info_Message occurrences.
3280 (Write_Error_Summary): Update Info_Message occurrences.
3281 (Output_Messages): Update Info_Message occurrences.
3282 (To_Be_Removed): Update Info_Message occurrences.
3283 (Reset_Warnings): Update Info_Message occurrences.
3284 * errutil.adb (Error_Msg): Update Info_Message occurrences.
3285 (Finalize): Update Info_Message occurrences.
3286 (Initialize): Update Info_Message occurrences.
3287 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
3288 (Compilation_Errors): Update Info_Message_Occurences.
3290 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3292 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
3293 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
3294 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
3295 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
3296 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
3297 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
3299 * sem_eval.adb (Why_Not_Static): Initialize Typ.
3300 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
3302 2017-04-28 Bob Duff <duff@adacore.com>
3304 * sem_util.ads, sem_util.adb (Might_Raise): New function
3305 that replaces Is_Exception_Safe, but has the opposite
3306 sense. Is_Exception_Safe was missing various cases -- calls inside
3307 a pragma Debug, calls inside an 'if' or assignment statement,
3308 etc. Might_Raise now walks the entire subtree looking for things
3310 * exp_ch9.adb (Is_Exception_Safe): Remove.
3311 (Build_Protected_Subprogram_Body): Replace call to
3312 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
3313 constants where possible).
3314 * exp_ch7.adb: Rename Is_Protected_Body -->
3315 Is_Protected_Subp_Body. A protected_body is something different
3318 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3320 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
3321 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
3322 (P_Discrete_Choice_List): Initialize Expr_Node variable.
3323 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
3324 (P_Protected): Likewise.
3325 * sem_case.adb (Check_Duplicates):
3326 Add pragma Warnings on variable.
3327 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
3328 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
3329 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
3330 (Analyze_Exit_Statement): Initialize Scope_Id variable.
3331 (Analyze_Iterator_Specification): Initialize Bas variable.
3332 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
3333 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
3334 (Analyze_Accept_Statement): Initialize Task_Nam.
3336 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3338 * checks.adb (Install_Primitive_Elaboration_Check):
3339 Do not generate an elaboration check if all checks have been
3342 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3344 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3345 Interrupt_Handler and Attach_Handler): Generate reference
3346 to protected operation to prevent spurious warnings about
3347 unreferenced entities. Previous scheme failed with style checks
3350 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3352 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
3353 that follows an expression function must not be relocated to
3354 the generated body, because it applies to the code that follows.
3356 2017-04-28 Gary Dismukes <dismukes@adacore.com>
3358 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
3359 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
3360 code that might violate the more stringent checking for 'Access
3361 introduced in Ada 2005.
3363 2017-04-28 Arnaud Charlet <charlet@adacore.com>
3365 * a-cforse.adb: minor style fix in comment.
3367 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3369 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
3370 initialize Block_Decls variable.
3371 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
3372 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
3373 * exp_disp.adb (Expand_Interface_Actuals): Initialize
3374 Formal_DDT and Actual_DDT variables.
3375 (Expand_Interface_Thunk): Initialize Iface_Formal.
3376 (Make_DT): Initialize Size_Comp.
3377 (Make_Select_Specific_Data_Table): Initialize Decls.
3378 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
3379 Also initialize more RPC_Receiver_* variables.
3380 (Build_To_Any_Function): Initialize Cstr_Formal.
3381 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
3383 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3385 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
3386 node between access types, freeze the designated type as well,
3387 so that dispatch table pointers are created in the proper scope,
3388 and not in the constructed body of the expression function.
3390 2017-04-28 Bob Duff <duff@adacore.com>
3392 * alloc.ads (Nodes_Initial): Go back to previous value. The large
3393 value makes large compilations faster, but small compilations slower.
3395 2017-04-28 Arnaud Charlet <charlet@adacore.com>
3397 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
3399 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3401 * erroutc.adb (Compilation_Errors): Do not consider info messages
3402 as suitable warnings when warnings must be treated as errors.
3403 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
3404 internally-generated packages when outputting completion
3406 * errout.adb (Output_Messages): Do not consider info messages as
3407 suitable warnings when warnings must be treated as errors.
3408 * errutil.adb (Finalize): Do not consider info messages as
3409 suitable warnings when warnings must be treated as errors.
3411 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3413 * warnsw.ads: Minor fix for incorrect wording in comment.
3415 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3417 * sem_res.adb (In_Instance_Code): New predicate in
3418 Valid_Conversion, to determine whether a type conversion appears
3419 as (or within) an actual for a formal object. Type conversions
3420 in instances are not rechecked in Valid_Conversion because
3421 visibility changes between generic location andi instance may
3422 lead to spurious errors, but conversions within an actual must be
3423 fully checked, and they are not fully resolved when pre-analyzing
3426 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3428 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
3429 New_Copy_Tree instead of Relocate_Node as any subsequent copies
3430 of the relocated node will have mangled Parent pointers.
3431 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
3432 tables used in conjunction with entity and itype replication.
3433 (Visit_Entity): Rewrite the restriction on which entities
3434 require duplication. The restriction now includes all types.
3436 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3438 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
3439 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
3440 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
3443 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3445 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
3446 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
3448 2017-04-28 Gary Dismukes <dismukes@adacore.com>
3450 * exp_util.adb: Minor reformatting.
3452 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3454 * sem_ch4.adb: Fix copy/pasto.
3456 2017-04-27 Tristan Gingold <gingold@adacore.com>
3458 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
3459 raise-gcc.c. Fix include search path for raise-gcc.c
3461 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3463 * fe.h (Warn_On_Questionable_Layout): Declare.
3464 * warnsw.ads (Warn_On_Record_Holes): Move down.
3465 (Warn_On_Questionable_Layout): New boolean variable.
3466 (Warning_Record): Add Warn_On_Questionable_Layout field.
3467 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
3468 (Restore_Warnings): Likewise.
3469 (Save_Warnings): Likewise.
3470 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
3471 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
3472 components_to_record.
3473 (gnu_field_to_gnat): New function.
3474 (warn_on_field_placement): Likewise.
3475 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
3476 parameters. Rename local variables and adjust recursive call.
3477 Rework final scan of the field list and implement warnings on the
3478 problematic placement of specific sorts of fields.
3480 2017-04-27 Bob Duff <duff@adacore.com>
3482 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
3483 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
3484 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
3485 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
3486 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
3487 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
3488 For efficiency, cache results of Is_Internal_File_Name and
3489 Is_Predefined_File_Name in the Units table. This avoids a lot
3490 of repeated text processing.
3492 2017-04-27 Emmanuel Briot <briot@adacore.com>
3494 * g-comlin.adb (Sort_Sections): remove useless test.
3496 2017-04-27 Claire Dross <dross@adacore.com>
3498 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
3499 allow the use of regular equality over elements in contracts.
3500 (Formal_Model): Ghost package containing model functions that are
3501 used in subprogram contracts.
3502 (Current_To_Last): Removed, model functions should be used instead.
3503 (First_To_Previous): Removed, model functions should be used instead.
3504 (Strict_Equal): Removed, model functions should be used instead.
3505 (No_Overlap): Removed, model functions should be used instead.
3506 (Equivalent_Keys): Functions over cursors are removed. They were
3507 awkward with explicit container parameters.
3508 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
3509 allow the use of regular equality over elements in contracts.
3510 (Formal_Model): Ghost package containing model functions that
3511 are used in subprogram contracts.
3512 (Current_To_Last): Removed, model functions should be used instead.
3513 (First_To_Previous): Removed, model functions should be used instead.
3514 (Strict_Equal): Removed, model functions should be used instead.
3515 (No_Overlap): Removed, model functions should be used instead.
3517 2017-04-27 Yannick Moy <moy@adacore.com>
3519 * gnat1drv.adb: Code cleanup.
3521 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3523 * exp_util.adb (Replace_Entity): The prefix of a 'Result
3524 attribute reference in a post- condition is the subprogram to
3525 which the condition applies. If the condition is inherited
3526 by a type extension, the prefix becomes a reference to the
3527 inherited operation, but there is no need to create a wrapper
3528 for this operation, because 'Result is expanded independently
3529 when elaborating the postconditions.
3531 2017-04-27 Bob Duff <duff@adacore.com>
3533 * sinput.adb: Minor code cleanup.
3534 * namet.adb (Append): Create faster versions of
3535 Append(String) and Append(Name_Id) by using slice assignment
3537 * sem_util.adb (In_Instance): Speed this up by removing
3538 unnecessary tests; Is_Generic_Instance is defined for all
3540 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
3541 Remove unused function.
3542 * alloc.ads (Nodes_Initial): Use a much larger value, because
3543 the compiler was spending a lot of time copying the nodes table
3544 when it grows. This number was chosen in 1996, so is rather out
3545 of date with current memory sizes. Anyway, it's virtual memory.
3546 Get rid of Orig_Nodes_...; use Node_... instead.
3547 * atree.adb (Lock): Do not release the Nodes tables; it's a
3549 Orig_Nodes_ ==> Nodes_
3550 * nlists.adb: Orig_Nodes_ ==> Nodes_
3551 * g-table.adb: Remove unused "with" clause.
3552 * g-table.ads, table.ads: Remove Big_Table_Type, which should
3553 not be used by clients.
3554 * g-dyntab.adb (Last_Allocated): New function
3555 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
3557 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3559 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
3561 (Subtypes_Statically_Match): Remove duplicate check.
3562 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
3564 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3566 * exp_aggr.adb (Replace_Type): Remove the special processing
3567 for selected components.
3568 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
3569 processing for attributes Fixed_Value and Integer_Value.
3570 * exp_util.adb (Side_Effect_Free): Merge the processing for
3571 qualified expressions, type conversions, and unchecked type
3573 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
3575 * par-ch3.adb (P_Declarative_Items): Merge the processing for
3576 tokens function, not, overriding, and procedure.
3577 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
3578 for qualified expressions, type conversions, and unchecked
3580 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
3581 processing for Ada 83 and instances.
3582 (Object_Access_Level): Merge the processing for indexed components
3583 and selected components.
3584 * uname.adb (Add_Node_Name): Merge the processing for stubs.
3586 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3588 * checks.adb (Install_Primitive_Elaboration_Check):
3589 Do not generate the check when restriction No_Elaboration_Code
3592 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3594 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
3595 of Expand_Dispatching_Call. If the denoted subprogram has a
3596 class-wide precondition, this is the only precondition that
3597 applies to the call, rather that the class-wide preconditions
3598 that may apply to the body that is executed. (This is specified
3601 2017-04-27 Yannick Moy <moy@adacore.com>
3603 * gnat1drv.adb (Adjust_Global_Switches): Issue
3604 a warning in GNATprove mode if the runtime library does not
3605 support IEEE-754 floats.
3607 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3609 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
3610 is itself inherited it does not carry any contract information,
3611 so examine its parent operation which is its Alias.
3613 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3615 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
3616 prefix can be an object reference in which case Obj'Image (X)
3617 can only be interpreted as an indexing of the parameterless
3618 version of the attribute.
3619 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
3620 an indexing or a slice operation if the attribute does not require
3621 parameters. In Ada2012 'Image also belongs in this category,
3622 and A'Image (lo .. hi) is legal and must be parsed as a slice.
3624 2017-04-27 Yannick Moy <moy@adacore.com>
3626 * exp_ch4.adb: Minor reformatting.
3627 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
3628 disable the CodePeer and C generation modes. Similar to the
3629 opposite actions done in CodePeer mode.
3631 2017-04-27 Yannick Moy <moy@adacore.com>
3633 * sem_res.adb: Remove duplicate code.
3634 * sem_attr.adb: Delete duplicate code.
3636 2017-04-27 Bob Duff <duff@adacore.com>
3638 * g-dyntab.adb: Reduce the amount of copying in
3639 Release. No need to copy items past Last.
3641 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3643 * checks.adb Add with and use clauses for Sem_Disp.
3644 (Install_Primitive_Elaboration_Check): New routine.
3645 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
3646 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
3647 processing of 'Elaborated.
3648 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
3651 2017-04-27 Bob Duff <duff@adacore.com>
3653 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
3654 If the table grows and then shrinks back to empty, we won't necessarily
3655 point back to the empty array. Code cleanups.
3656 * sinput.ads: Add 'Base to Size clause to match the declared
3659 2017-04-27 Claire Dross <dross@adacore.com>
3661 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
3662 allow the use of regular equality over elements in contracts.
3663 (Formal_Model): Ghost package containing model functions that
3664 are used in subprogram contracts.
3665 (Current_To_Last): Removed, model functions should be used instead.
3666 (First_To_Previous): Removed, model functions should be used instead.
3667 (Strict_Equal): Removed, model functions should be used instead.
3668 (No_Overlap): Removed, model functions should be used instead.
3669 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
3670 Boolean generic parameter to disable contracts for equivalence
3672 (Witness): Create a witness of a key that is used for handling of
3673 equivalence between keys.
3674 (Has_Witness): Check whether a witness is contained in a map.
3675 (W_Get): Get the element associated to a witness.
3676 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
3678 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
3679 Boolean generic parameter to disable contracts for equivalence
3681 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
3682 of equivalence on functional maps.
3683 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
3684 of equivalence on functional maps.
3686 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3688 * exp_ch9.adb (Expand_Entry_Barrier): Code
3689 cleanup. Do not perform the optimization which removes the
3690 declarations of the discriminant and component renamings when
3691 validity checks on operands and attributes are in effect.
3693 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3695 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
3696 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
3697 a-cfhama.ads, a-cofove.ads: Minor reformatting.
3699 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3701 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
3702 pointer dereference.
3703 * g-spipat.adb (Dump): Code clean up. Protect against a possible
3704 null pointer dereference.
3706 2017-04-27 Bob Duff <duff@adacore.com>
3708 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
3709 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
3710 Free renames Init, since they do the same thing.
3711 * g-table.ads: Default for Table_Low_Bound.
3712 * table.ads: Default for Table_Low_Bound, Table_Initial, and
3715 2017-04-27 Bob Duff <duff@adacore.com>
3717 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
3719 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
3720 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
3721 Reorder code so that above assertions do not fail.
3722 * table.ads: Remove obsolete comment on Locked.
3724 2017-04-27 Claire Dross <dross@adacore.com>
3726 * a-cfdlli.ads: Code cleanup.
3728 2017-04-27 Yannick Moy <moy@adacore.com>
3730 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
3731 when needed for proof. (Expand_SPARK): Call the new procedure.
3732 * exp_util.ads Fix typo.
3734 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3736 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
3739 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3741 * sem_elab.adb Add new type Visited_Element
3742 and update the contents of table Elab_Visited. Various code clean up.
3743 (Check_Elab_Call): Determine whether a prior call to
3744 the same subprogram was already examined within the same context.
3745 (Check_Internal_Call_Continue): Register the subprogram being
3746 called as examined within a particular context. Do not suppress
3747 elaboration warnings.
3749 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3751 * xoscons.adb, osint.ads: Minor reformatting.
3753 2017-04-27 Bob Duff <duff@adacore.com>
3755 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
3756 Table_Count_Type --> Table_Last_Type, because the name
3757 was confusing (a "count" usually starts at zero). Add
3758 functionality supported or needed by other tables packages
3759 (Move, Release_Threshold).
3760 * g-table.ads, g-table.adb: This is now just a thin wrapper
3761 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
3762 or needed by other tables packages (Save, Restore).
3763 * table.ads, table.adb: This is now just a thin wrapper around
3764 * g-table.ads/g-table.adb.
3765 * namet.h, scos.h, uintp.h: These files are reaching into the
3766 private data of some instances of g-table, whose names changed,
3767 so the above change requires some adjustment here. It now uses
3770 2017-04-27 Bob Duff <duff@adacore.com>
3772 * namet.adb, namet.ads: Minor: remove unused procedures.
3774 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3776 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
3777 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
3778 Add pragma Warnings on Rtype variable in nested block. *
3779 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
3780 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
3781 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
3782 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
3783 (Process_Component_List_For_Finalize): Initialize Counter_Id.
3784 (Build_Finalize_Statements): Initialize Bod_Stmts.
3785 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
3787 2017-04-27 Claire Dross <dross@adacore.com>
3789 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
3790 allow the use of regular equality over elements in contracts.
3791 (Formal_Model): Ghost package containing model functions that are
3792 used in subprogram contracts.
3793 (Current_To_Last): Removed, model
3794 functions should be used instead.
3795 (First_To_Previous): Removed, model functions should be used instead.
3796 (Strict_Equal): Removed, model functions should be used instead.
3797 (No_Overlap): Removed, model functions should be used instead.
3798 (Equivalent_Keys): Functions over cursors are removed. They were
3799 awkward with explicit container parameters.
3800 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
3801 (proof only) procedure to help GNATprove when equivalence over
3802 keys is not equality.
3804 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3806 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
3807 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
3808 Minor reformatting and code cleanups.
3810 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3812 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
3813 subsidiary of Check_Inherited_Conditions, to build pragmas for an
3814 operation whose ancestor has classwide pre/postconditions. This
3815 is used both to check the legality of the inheritance in Ada
3816 and in SPARK, and to determine whether a wrapper is needed for
3817 an inherited operation.
3818 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
3819 Improve placement of error message for inherited classwide
3820 conditions that become illegal on type derivation.
3822 2017-04-27 Yannick Moy <moy@adacore.com>
3824 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
3825 SPARK_Mode from context on generic package.
3826 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
3829 2017-04-27 Claire Dross <dross@adacore.com>
3831 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
3832 overflows in computations.
3833 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
3834 overflows in computations.
3835 (Insert): Rewrite precondition to avoid overflows in computations.
3836 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
3837 overflows in computations.
3838 (Insert): Rewrite precondition to avoid overflows in computations.
3840 2017-04-27 Steve Baird <baird@adacore.com>
3842 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
3843 flag when it is declared in order to avoid confusing CodePeer about
3844 the possibility of an uninitialized variable read.
3846 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3848 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
3849 no dimensionality error if the subtype of the expression is
3850 identical to the nominal subtype in the declaration, even though
3851 the expression itself may have been constant-folded and lack a
3853 * sem_dim.ads: Add comments on setting of dimension vectors and
3854 its interaction with node rewritings and side-effect removal.
3856 2017-04-27 Bob Duff <duff@adacore.com>
3858 * debug.adb: Minor comment correction.
3859 * sem_dim.ads: Minor reformatting and typo fixes.
3861 2017-04-27 Bob Duff <duff@adacore.com>
3863 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
3864 Last of the tables via function calls, rather than relying on layout
3867 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3869 * exp_util.adb: No wrapper in GNATprove mode.
3871 2017-04-27 Yannick Moy <moy@adacore.com>
3873 * sem_res.adb (Resolve_Comparison_Op): Always
3874 evaluate comparisons between values of universal types.
3876 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3878 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
3879 an elaboration counter nor a check when in GNATprove mode.
3880 * sem_util.adb (Build_Elaboration_Entity): Do not create an
3881 elaboration counter when in GNATprove mode.
3883 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3885 * freeze.adb: copy-paste typo.
3887 2017-04-27 Yannick Moy <moy@adacore.com>
3889 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
3890 Use correct test to detect call in GNATprove mode instead of
3893 2017-04-27 Claire Dross <dross@adacore.com>
3895 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
3896 New property function expressing that the element of a
3897 sequence are contained in the union of two sequences.
3898 (Formal_Model.M_Elements_Included): New property function
3899 expressing that the element of a sequence are another sequence.
3900 (Generic_Sorting): Use new property functions to state that
3901 elements are preserved by Sort and Merge.
3902 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
3903 allow the use of regular equality over elements in contracts.
3904 (Formal_Model): Ghost package containing model functions
3905 that are used in subprogram contracts. (Capacity):
3906 On unbounded containers, return the maximal capacity.
3907 (Current_To_Last): Removed, model functions should be used instead.
3908 (First_To_Previous): Removed, model functions should be used instead.
3909 (Append): Default parameter value replaced
3910 by new wrapper to allow more precise contracts.
3911 (Insert): Subprogram restored, it seems it was useful to users even if
3913 (Delete): Subprogram restored, it seems it was useful to users even if
3915 (Prepend): Subprogram restored, it seems it was useful to users even
3916 if it is inefficient.
3917 (Delete_First): Subprogram restored, it seems it
3918 was useful to users even if it is inefficient. (Delete_Last):
3919 Default parameter value replaced by new wrapper to allow more
3921 (Generic_Sorting.Merge): Subprogram restored.
3922 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
3923 allow the use of regular equality over elements in contracts.
3924 (Formal_Model): Ghost package containing model functions
3925 that are used in subprogram contracts. (Capacity):
3926 On unbounded containers, return the maximal capacity.
3927 (Current_To_Last): Removed, model functions should be used
3929 (First_To_Previous): Removed, model functions should be used instead.
3930 (Append): Default parameter value replaced
3931 by new wrapper to allow more precise contracts.
3932 (Insert): Subprogram restored, it seems it was useful to users even if
3934 (Delete): Subprogram restored, it seems it was useful to users even if
3936 (Prepend): Subprogram restored, it seems it was useful to users even
3937 if it is inefficient.
3938 (Delete_First): Subprogram restored, it seems it
3939 was useful to users even if it is inefficient. (Delete_Last):
3940 Default parameter value replaced by new wrapper to allow more
3942 (Generic_Sorting.Merge): Subprogram restored.
3943 (Vector): Do not reuse formal vectors, as it is no longer possible
3944 to supply them with an equality function over elements.
3946 2017-04-27 Bob Duff <duff@adacore.com>
3948 * g-dyntab.adb (Release): When allocating the new
3949 table, use the correct slice of the old table to initialize it.
3951 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3953 * einfo.ads: Minor fixes in comments.
3955 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3957 * sem_prag.adb: disable clones in SPARK_Mode.
3959 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3961 * sem_util.ads, contracts.adb: Minor reformatting.
3963 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3965 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
3966 Build body of subprogram that has a class-wide condition that
3967 contains calls to other primitives.
3968 (Build_Class_Wide_Clone_Call); Build a call to the common
3969 class-wide clone of a subprogram with classwide conditions. The
3970 body of the subprogram becomes a wrapper for a call to the
3971 clone. The inherited operation becomes a similar wrapper to which
3972 modified conditions apply, and the call to the clone includes
3973 the proper conversion in a call the parent operation.
3974 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
3975 subprogram that has a classwide condition that contains calls to
3976 other primitives, build an internal subprogram that is invoked
3977 through a type-specific wrapper for all inherited subprograms
3978 that may have a modified condition.
3979 * sem_prag.adb (Check_References): If subprogram has a classwide
3980 condition, create entity for corresponding clone, to be invoked
3981 through wrapper subprograns.
3982 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
3983 message about placement if pragma isi internally generated.
3984 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
3985 a classwide clone, build body of clone as copy of original body,
3986 and rewrite original body as a wrapper as a wrapper for a call to
3987 the clone, so that it incorporates the original pre/postconditions
3989 * freeze.adb (Check_Inherited_Conditions): For an inherited
3990 subprogram that inherits a classwide condition, build spec and
3991 body of corresponding wrapper so that call to inherited operation
3992 gets the modified conditions.
3993 * contracts.adb (Analyze_Contracts): If analysis of classwide
3994 condition has created a clone for a primitive operation, analyze
3995 declaration of clone.
3997 2017-04-27 Steve Baird <baird@adacore.com>
3999 * exp_util.adb (Build_Allocate_Deallocate_Proc):
4000 Add "Suppress => All_Checks" to avoid generating unnecessary
4003 2017-04-27 Yannick Moy <moy@adacore.com>
4005 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
4006 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
4007 inlining body in GNATprove mode when switch -gnatdm used.
4008 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
4009 in GNATprove mode when switch -gnatdm used.
4011 2017-04-27 Arnaud Charlet <charlet@adacore.com>
4013 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
4014 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
4015 clauses, so that we keep an indication of the address clause
4016 before removing it from the tree.
4018 2017-04-27 Yannick Moy <moy@adacore.com>
4020 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
4021 of expression being qualified, when not an object name, or else
4022 evaluate the underlying name.
4024 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
4026 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
4028 2017-04-27 Justin Squirek <squirek@adacore.com>
4030 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
4031 Process_Component_List_For_Finalization as a local variable.
4032 (Process_Component_For_Finalize): Add an extra parameter to avoid
4034 (Process_Component_List_For_Finalization): Correct calls to
4035 Process_Component_For_Finalize to take Num_Comps as a parameter.
4037 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4039 * sem_ch8.adb (Find_Direct_Name): Account for the case where
4040 a use-visible entity is defined within a nested scope of an
4041 instance when giving priority to entities which were visible in
4042 the original generic.
4043 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
4045 2017-04-27 Tristan Gingold <gingold@adacore.com>
4047 * raise-gcc.c: Don't use unwind.h while compiling
4048 for the frontend, but mimic host behavior.
4050 2017-04-27 Javier Miranda <miranda@adacore.com>
4052 * sem_ch3.adb (Build_Discriminated_Subtype):
4053 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
4055 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4057 * sem_prag.adb (Analyze_Global_Item):
4058 Do not consider discriminants because they are not "entire
4059 objects". Remove the discriminant-related checks because they are
4061 (Analyze_Input_Output): Do not consider discriminants
4062 because they are not "entire objects".
4064 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4066 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
4067 perform check if the current scope does not come from source,
4068 as is the case for a rewritten task body, because check has
4069 been performed already, and may not be doable because of changed
4072 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4074 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
4075 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
4078 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4080 * sem_ch4.adb (Analyze_Call): If the return type of a function
4081 is incomplete in an context in which the full view is available,
4082 replace the type of the call by the full view, to prevent spurious
4084 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
4085 abstract subprogram so that compiler does not reject a parameter
4086 of a primitive operation of a tagged type being frozen, when
4087 the untagged type of that parameter cannot be frozen.
4089 2017-04-27 Bob Duff <duff@adacore.com>
4091 * sem_attr.adb (Compute_Type_Key): Don't walk
4092 representation items for irrelevant types, which could be in a
4093 different source file.
4095 2017-04-27 Steve Baird <baird@adacore.com>
4097 * exp_attr.adb (Expand_N_Attribute_Reference):
4098 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
4101 2017-04-27 Yannick Moy <moy@adacore.com>
4103 * exp_unst.ads: Fix typos in comments.
4105 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4107 * sem_eval.adb (Choice_Matches): Handle properly a real literal
4108 whose type has a defined static predicate.
4110 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4112 * exp_ch4.adb (Insert_Dereference_Action):
4113 Do not adjust the address of a controlled object when the
4114 associated access type is subject to pragma No_Heap_Finalization.
4117 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
4119 * gcc-interface/utils.c (gnat_type_for_size): Set
4120 TYPE_ARTIFICIAL on created types.
4122 2017-04-27 Claire Dross <dross@adacore.com>
4124 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4125 modifications in functional containers.
4126 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4127 to improve readablity. Subprograms are separated between basic
4128 operations, constructors and properties. Universally quantified
4129 formulas in contracts are factorized in independant functions
4130 with a name and a comment. Names of parameters are improved.
4132 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4134 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4136 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4138 * sem_res.adb (Resolve_Type_Conversion): Do not
4139 install a predicate check here since this is already done during
4140 the expansion phase. Verify whether the operand satisfies the
4141 static predicate (if any) of the target type.
4142 * sem_ch3.adb (Analyze_Object_Declaration): Do
4143 not install a predicate check if the object is initialized by
4144 means of a type conversion because the conversion is subjected
4147 2017-04-27 Tristan Gingold <gingold@adacore.com>
4149 * raise.c (__gnat_builtin_longjmp): Remove.
4150 (__gnat_bracktrace):
4151 Add a dummy definition for the compiler (__gnat_eh_personality,
4152 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
4153 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
4154 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
4155 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
4156 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
4157 and a-except-2005.adb.
4158 * raise-gcc.c: Allow build in compiler, compiled as a C++
4160 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
4161 (db): Constify msg_format.
4162 (get_call_site_action_for): Don't use void arithmetic.
4163 * system.ads (Frontend_Exceptions): Set to False.
4164 (ZCX_By_Default): Set to True.
4165 (GCC_ZC_Support): Set to True.
4166 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
4168 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
4169 in gnat1 and gnatbind.
4170 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
4171 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
4172 * s-excmac.ads, s-excmac.adb: Copy of variants.
4173 * a-except.o: Adjust preequisites.
4174 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
4176 2017-04-27 Claire Dross <dross@adacore.com>
4178 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4179 modifications in functional containers.
4180 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4181 to improve readablity. Subprograms are separated between basic
4182 operations, constructors and properties. Universally quantified
4183 formulas in contracts are factorized in independant functions
4184 with a name and a comment. Names of parameters are improved.
4186 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4188 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4190 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4192 * sem_res.adb (Resolve_Type_Conversion): Do not
4193 install a predicate check here since this is already done during
4194 the expansion phase. Verify whether the operand satisfies the
4195 static predicate (if any) of the target type.
4196 * sem_ch3.adb (Analyze_Object_Declaration): Do
4197 not install a predicate check if the object is initialized by
4198 means of a type conversion because the conversion is subjected
4201 2017-04-27 Tristan Gingold <gingold@adacore.com>
4203 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
4204 replaced by their variants).
4206 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4208 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
4209 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
4210 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
4212 2017-04-27 Tristan Gingold <gingold@adacore.com>
4214 * s-excmac-gcc.ads, s-excmac-gcc.adb,
4215 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
4218 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4220 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
4221 the loop which detects potential enclosing transient scopes. The
4222 loop now terminates much earlier as transient scopes are bounded
4223 by packages and subprograms.
4225 2017-04-27 Claire Dross <dross@adacore.com>
4227 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
4228 allow the use of regular equality over elements in contracts.
4229 (Cursor): Type is now public so that it can be used in
4231 (Formal_Model): Ghost package containing
4232 model functions that are used in subprogram contracts.
4233 (Current_To_Last): Removed, model functions should be used
4235 (First_To_Previous): Removed, model functions should
4237 (Strict_Equal): Removed, model functions
4238 should be used instead.
4239 (Append): Default parameter value
4240 replaced by new wrapper to allow more precise contracts.
4241 (Insert): Default parameter value replaced by new wrapper to
4242 allow more precise contracts.
4243 (Delete): Default parameter
4244 value replaced by new wrapper to allow more precise contracts.
4245 (Prepend): Default parameter value replaced by new wrapper to
4246 allow more precise contracts.
4247 (Delete_First): Default parameter
4248 value replaced by new wrapper to allow more precise contracts.
4249 (Delete_Last): Default parameter value replaced by new wrapper
4250 to allow more precise contracts.
4252 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4254 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
4255 for object declarations.
4256 (Expand_SPARK_N_Object_Declaration): New routine.
4257 * sem_elab.adb (Check_A_Call): Include calls to the
4258 Default_Initial_Condition procedure of a type under the SPARK
4259 elaboration checks umbrella.
4261 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4263 * sem.adb (Analyze): Diagnose an illegal iterated component
4265 * sem_util.ads, sem_util.adb
4266 (Diagnose_Iterated_Component_Association): New routine.
4268 2017-04-27 Bob Duff <duff@adacore.com>
4270 * adaint.c (__gnat_get_current_dir): Return 0 in length if
4272 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
4273 exception if getcwd failed.
4275 2017-04-27 Yannick Moy <moy@adacore.com>
4277 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
4278 entities with special prefix.
4280 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4282 * debug.adb Change the documentation of switch -gnatd.s.
4283 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
4284 to manage the secondary stack when an enclosing scope already
4285 performs this functionality (aka relaxed management). Switch
4286 -gnatd.s may be used to force strict management in which case
4287 the block will manage the secondary stack unconditionally. Add
4288 a guard to stop the traversal when encountering a package or a
4291 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4293 * sem_res.adb (Resolve_Call): Refine further the handling of
4294 limited views of return types in function calls. If the function
4295 that returns a limited view appears in the current unit,
4296 we do not replace its type by the non-limited view because
4297 this transformation is performed int the back-end. However,
4298 the type of the call itself must be the non-limited view, to
4299 prevent spurious resolution errors.
4301 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4303 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
4304 Removed, proposed implementation using generics for class-wide
4305 preconditions proved impractical.
4306 (Class_Wide_Clone): New attribute of subprogram. Designates
4307 subprogram created for primitive operations with class-wide
4308 pre/postconditions that contain calls to other primitives. The
4309 clone holds the body of the original primitive, but the
4310 pre/postonditions do not apply to it. The original body is
4311 rewritten as a wrapper for a call to the clone.
4312 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
4313 the flag is set, no code for the corresponding pre/postconditions
4314 is inserted into its body.
4316 2017-04-27 Bob Duff <duff@adacore.com>
4318 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
4319 Scalar_Storage_Order if -gnatI is given.
4320 * sem_prag.adb (Analyze_Pragma): Ignore
4321 Default_Scalar_Storage_Order if -gnatI is given.
4323 2017-04-27 Claire Dross <dross@adacore.com>
4325 * a-cofuba.ads (Add): Take as an additional input parameter
4326 the position where the element should be inserted.
4327 (Remove): New function that removes an element from the container.
4328 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
4329 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
4330 (Remove): New function that removes an element from a set.
4331 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
4332 (Remove): New function that removes an element from a sequence.
4333 (Insert): New function that adds anywhere in a sequence.
4335 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4337 * checks.adb (Generate_Range_Check): Revert previous change.
4339 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4341 * sem_util.adb: Minor reformatting/rewording.
4343 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4345 * lib-xref.adb (Generate_Reference): The use
4346 of attribute 'Result is not considered a violation of pragma
4349 2017-04-27 Justin Squirek <squirek@adacore.com>
4351 * cstand.adb (Create_Standard): Correctly set
4352 Directly_Designated_Type for Any_Access.
4353 * sem_type.adb (Covers): Minor grammar fixes.
4355 2017-04-27 Bob Duff <duff@adacore.com>
4357 * sem_attr.adb: Minor cleanup.
4359 2017-04-27 Claire Dross <dross@adacore.com>
4361 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
4362 private child of Ada.Containers used to implement all functional
4364 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
4365 child of Ada.Containers. It provides functional indefinite unbounded
4366 maps which can be used as high level models for specification
4368 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
4369 child of Ada.Containers. It provides functional indefinite unbounded
4370 sets which can be used as high level models for specification
4372 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
4373 child of Ada.Containers. It provides functional indefinite unbounded
4374 vectors which can be used as high level models for specification
4376 * Makefile.rtl: Add new packages.
4377 * impunit.adb: Add new packages.
4379 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4381 * sem_ch4.adb: Minor reformatting.
4383 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4385 * sem_ch12.adb (Analyze_Associations): minor reformatting.
4386 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
4387 point type actual that has user-defined arithmetic primitives,
4388 when there is a previous actual for a formal package that defines
4389 a fixed-point type with the parent user-defined operator.
4391 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4393 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
4394 * sem_attr.adb (Resolve_Attribute): Generate a range check when
4395 the component type allows range checks.
4397 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4399 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
4400 corresponding declaration, because formal derived types are
4401 rewritten as private extensions.
4403 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4405 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
4406 dimensions of operands if node has been analyzed already, because
4407 previous analysis and dimension checking will have removed the
4408 dimension information from the operands.
4410 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4412 * debug.adb: Document the use of switch -gnatd.s.
4413 * einfo.ads Update the documentation on attribute
4414 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
4415 the uses of these attributes from certain entities.
4416 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
4417 which determines whether the block should continue to manage
4418 the secondary stack.
4419 (Manages_Sec_Stack): New routine.
4421 2017-04-27 Bob Duff <duff@adacore.com>
4423 * atree.ads: Minor edit.
4425 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4427 * sinfo.ads: Update the section on Ghost mode. Add
4428 a section on SPARK mode. Update the placement of section on
4429 expression functions.
4431 2017-04-27 Bob Duff <duff@adacore.com>
4433 * sinput.adb (Get_Source_File_Index): Don't
4434 assert that S is in the right range in the case where this is
4435 a .dg file under construction.
4437 2017-04-27 Yannick Moy <moy@adacore.com>
4439 * sem_util.adb (Check_Result_And_Post_State):
4440 Handle more precisely each conjunct in expressions formed by
4441 and'ing sub-expressions.
4443 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4445 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
4447 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4449 * gnat_rm.texi, gnat_ugn.texi,
4450 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4451 doc/gnat_ugn/platform_specific_information.rst,
4452 doc/gnat_ugn/gnat_and_program_execution.rst,
4453 doc/gnat_ugn/gnat_utility_programs.rst,
4454 doc/gnat_ugn/the_gnat_compilation_model.rst,
4455 doc/gnat_rm/implementation_defined_attributes.rst,
4456 doc/gnat_rm/the_gnat_library.rst,
4457 doc/gnat_rm/implementation_defined_pragmas.rst,
4458 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4459 doc/gnat_rm/implementation_of_specific_ada_features.rst,
4460 doc/gnat_rm/implementation_defined_aspects.rst,
4461 doc/gnat_rm/implementation_defined_characteristics.rst: Update
4464 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4466 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
4467 generating C code on complex case expressions.
4469 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4471 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
4472 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
4473 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
4474 Ada_2012 instead of Ada_2005 to be compatible with the above
4476 * bindgen.adb: Silence new warning on pragma Ada_95.
4478 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4480 * checks.adb (Generate_Range_Check): Revert part of previous change.
4482 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4484 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
4485 container indexing operation that appears as a an actual in a
4486 parameter association in a procedure call.
4488 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
4490 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
4491 Fix spelling mistakes.
4493 2017-04-25 Bob Duff <duff@adacore.com>
4495 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
4496 * sinput-p.adb: Use regular fat pointers, with bounds checking,
4497 for source buffers. Fix misc obscure bugs.
4498 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
4499 checking, for source buffers. Modify representation clause for
4500 Source_File_Record as appropriate. Move Source_File_Index_Table
4501 from spec to body, because it is not used outside the body.
4502 Move Set_Source_File_Index_Table into the private part, because
4503 it is used only in the body and in children. Use trickery to
4504 modify the dope in the generic instantiation case. It's ugly,
4505 but not as ugly as the previous method. Fix documentation.
4506 Remove obsolete code.
4507 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
4508 indexing in source buffers.
4509 * fmap.adb: Avoid conversions from one string type to another.
4510 Remove a use of global name buffer.
4511 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
4514 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4516 * exp_util.adb, exp_ch4.adb: Minor reformatting.
4518 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4520 * checks.adb: Code clean up in various routines.
4521 (Generate_Range_Check): Do not generate a range check when the
4522 expander is not active or when index/range checks are suppressed
4524 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
4525 Remove variants that include a Supress parameter. These routines
4526 are never used, and were introduced before the current scope-based
4527 check suppression method.
4529 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
4531 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
4532 code and some subprogram calls that are now noop.
4534 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4536 * exp_ch4.adb (Expand_N_Case_Expression): Take
4537 Minimize_Expression_With_Actions into account when possible.
4539 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4541 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
4542 (Known_Null): Moved to Sem_Util.
4543 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
4544 (Known_Null): Moved to Sem_Util.
4545 * sem_util.adb Add new enumeration type Null_Status_Kind.
4546 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
4547 this routine is now carried out by Null_Status.
4548 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
4549 is now carried out by Null_Status.
4550 (Null_Status): New routine.
4551 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
4552 (Known_Null): Moved from Exp_Util.
4554 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4556 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
4557 error on the return type of an expression function that is a
4558 completion, if the type is derived from a generic formal type.
4560 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4562 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
4563 conversion are those of the target type.
4565 2017-04-25 Bob Duff <duff@adacore.com>
4567 * a-clrefi.adb: Minor cleanup.
4569 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4571 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
4573 2017-04-25 Bob Duff <duff@adacore.com>
4575 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
4576 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
4577 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
4578 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
4579 the Internal_Source buffer. This removes the incorrect call to "="
4580 the customer noticed.
4581 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
4582 eventually need to eliminate them altogether. Or else get rid
4583 of zero-origin addressing.
4585 2017-04-25 Claire Dross <dross@adacore.com>
4587 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
4588 function used in GNATprove to know if an expression contains
4589 non-dispatching calls on primitives of a tagged type.
4591 2017-04-25 Bob Duff <duff@adacore.com>
4593 * rtsfind.adb (Initialize): Initialize
4594 First_Implicit_With. Building the compiler with Normalize_Scalars
4595 and validity checking finds this being used as an uninitialized
4598 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4600 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
4601 Add a warning about SPARK mode management. The routine now
4602 saves and restores both the mode and associated pragma.
4603 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
4604 SPARK mode management. The routine now saves and restores both
4605 the mode and associated pragma.
4606 (Analyze_Object_Contract):
4607 Add a warning about SPARK mode management. The routine
4608 now saves and restores both the mode and associated pragma.
4609 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
4610 management. The routine now saves and restores both the mode
4611 and associated pragma. (Analyze_Package_Contract): Add a warning
4612 about SPARK mode management. The routine now saves and restores
4613 both the mode and associated pragma.
4614 (Analyze_Task_Contract):
4615 Add a warning about SPARK mode management. The routine now saves
4616 and restores both the mode and associated pragma.
4617 * expander.adb (Expand): Change the way the Ghost mode is saved
4619 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
4621 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
4623 * exp_util.adb (Build_DIC_Procedure_Body):
4624 Change the way the Ghost mode is saved and restored.
4625 (Build_DIC_Procedure_Declaration): Change the way the Ghost
4626 mode is saved and restored.
4627 (Build_Invariant_Procedure_Body):
4628 Change the way the Ghost mode is saved and restored.
4629 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
4630 mode is saved and restored.
4631 (Make_Predicate_Call): Change the
4632 way the Ghost mode is saved and restored.
4633 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
4635 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4637 (Mark_And_Set_Ghost_Body): Remove parameter
4638 Mode and its assignment.
4639 (Mark_And_Set_Ghost_Completion):
4640 Remove parameter Mode and its assignment.
4641 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
4643 (Mark_And_Set_Ghost_Instantiation): Remove parameter
4644 Mode and its assignment.
4645 (Mark_And_Set_Ghost_Procedure_Call):
4646 Remove parameter Mode and its assignment.
4648 Remove parameter Mode and its assignment.
4649 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4650 and update the comment on usage.
4651 (Mark_And_Set_Ghost_Body):
4652 Remove parameter Mode and update the comment on usage.
4653 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
4654 update the comment on usage.
4655 (Mark_And_Set_Ghost_Declaration):
4656 Remove parameter Mode and update the comment on usage.
4657 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
4658 update the comment on usage.
4659 (Mark_And_Set_Ghost_Procedure_Call):
4660 Remove parameter Mode and update the comment on usage.
4661 (Set_Ghost_Mode): Remove parameter Mode and update the comment
4663 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
4665 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
4666 of obsolete field SPARK_Mode_Pragma.
4667 (Load_Main_Source): Remove
4668 the assignment of obsolete field SPARK_Mode_Pragma.
4669 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
4670 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
4671 the assignment of obsolete field SPARK_Mode_Pragma.
4672 (Ensure_System_Dependency): Remove the assignment of obsolete
4673 field SPARK_Mode_Pragma.
4674 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
4675 mode management. Change the way Ghost and SPARK modes are saved
4677 * sem.adb (Analyze): Change the way the Ghost mode is saved
4679 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
4680 Ghost mode is saved and restored.
4681 (Process_Full_View): Change
4682 the way the Ghost mode is saved and restored.
4683 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
4684 mode is saved and restored.
4685 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
4686 mode is saved and restored.
4687 (Analyze_Subprogram_Body_Helper):
4688 Change the way the Ghost mode is saved and restored.
4689 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
4690 Ghost mode is saved and restored.
4691 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
4692 management. Save the SPARK mode-related data prior to any changes
4693 to the scope stack and contexts. The mode is then reinstalled
4694 before the subunit is analyzed in order to restore the original
4695 view of the subunit.
4696 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
4697 warning on region management. Change the way the Ghost and
4698 SPARK modes are saved and restored.
4699 (Inline_Instance_Body):
4700 Add a warning about SPARK mode management. Code clean up.
4701 (Analyze_Subprogram_Instantiation): Update the warning on region
4702 management. Change the way the Ghost and SPARK modes are saved
4704 (Instantiate_Package_Body): Update the warning
4705 on region management. Change the way the Ghost and SPARK modes
4706 are saved and restored.
4707 (Instantiate_Subprogram_Body): Update
4708 the warning on region management. Change the way the Ghost and
4709 SPARK modes are saved and restored.
4710 (Set_Instance_Env): Add a
4711 warning about SPARK mode management. Change the way SPARK mode
4712 is saved and restored.
4713 * sem_ch13.adb (Build_Predicate_Functions):
4714 Change the way the Ghost mode is saved and restored.
4715 (Build_Predicate_Function_Declaration): Change the way the Ghost
4716 mode is saved and restored.
4717 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
4718 mode management. Change the way SPARK mode is saved and restored.
4719 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4720 Change the way the Ghost mode is saved and restored.
4721 (Analyze_Initial_Condition_In_Decl_Part): Change the way
4722 the Ghost mode is saved and restored.
4724 Change the way the Ghost mode is saved and restored.
4725 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
4726 Ghost mode is saved and restored.
4727 * sem_util.adb (Install_SPARK_Mode): New routine.
4728 (Restore_SPARK_Mode): New routine.
4729 (Save_SPARK_Mode_And_Set): Removed.
4730 (Set_SPARK_Mode): New routine.
4731 * sem_util.ads (Install_SPARK_Mode): New routine.
4732 (Restore_SPARK_Mode): New routine.
4733 (Save_SPARK_Mode_And_Set): Removed.
4734 (Set_SPARK_Mode): New routine.
4736 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4738 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
4739 to determine whether a type is declared in a local package that
4740 has not yet been frozen.
4741 * freeze.adb (Freeze_Before): Use new predicate to determine
4742 whether a local package must be installed on the scope stack
4743 in order to evaluate in the proper scope actions generated by
4744 aspect specifications, such as Predicate
4745 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
4746 using new predicate.
4748 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4750 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
4751 comparisons between non- scalar expressions expressions because
4752 their values cannot be invalidated.
4753 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
4756 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4758 * par_sco.adb: Minor reformatting.
4760 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4762 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
4763 is a type from an unfrozen local package, install package to
4764 complete the analysis of delayed aspects of the type.
4766 2017-04-25 Tristan Gingold <gingold@adacore.com>
4768 * bingen.adb (System_Version_Control_Used): New variable.
4769 (Resolve_Binder_Options): Set the above variable.
4770 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
4771 (Gen_Elab_Order): Emit blank line before.
4773 2017-04-25 Justin Squirek <squirek@adacore.com>
4775 * sem_cat.adb (Validate_RT_RAT_Component): Added
4776 an extra check to ignore incomplete types.
4778 2017-04-25 Thomas Quinot <quinot@adacore.com>
4780 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
4781 bogus circuitry for the case where Name is Predicate.
4783 2017-04-25 Thomas Quinot <quinot@adacore.com>
4785 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
4786 Create SCOs for Predicate aspects in disabled
4787 state initially, to be enabled later on by...
4788 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
4789 SCO for predicate as enabled.
4791 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4793 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
4794 pragmas Warnings Off / On.
4795 * namet.adb (Finalize): Remove now obsolete pair of pragmas
4797 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
4798 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
4799 consider comparisons between static expressions because their
4800 values cannot be invalidated.
4801 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
4803 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
4804 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
4806 2017-04-25 Bob Duff <duff@adacore.com>
4808 * sem_elab.adb (In_Task_Activation): Trace internal calls in
4811 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4813 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
4816 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4818 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
4819 On/Off to defend against a spurious warning in conditional
4821 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
4822 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
4823 defend against a spurious warning in conditional compilation.
4824 * output.adb Add a pair of pragma Warnings On/Off to defend
4825 against a spurious warning in conditional compilation.
4826 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
4827 (Fold_General_Op): New routine.
4828 (Fold_Static_Real_Op): New routine.
4829 (Test_Comparison): New routine.
4830 * sem_eval.ads (Test_Comparison): New routine.
4831 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
4832 (Warn_On_Constant_Valid_Condition): New routine.
4833 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
4834 to detect a specific case.
4835 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
4836 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
4837 to defend against a spurious warning in conditional compilation.
4838 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
4839 against a spurious warning in conditional compilation.
4840 * usage.adb Add a pair of pragma Warnings On/Off to defend
4841 against a spurious warning in conditional compilation.
4843 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4845 * sinfo.ads, sem_ch13.adb: Update comment.
4847 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4849 * sem_util.adb (Is_Post_State): A reference to a
4850 generic in out parameter is considered a change in the post-state
4853 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4855 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
4856 declaration of a subprogram instance within its wrapper package,
4857 skip over null statements that may result from the rewriting of
4860 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4862 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
4863 If the type is an unchecked_union, replace the attribute with
4864 a Raise_Program_Error (rather than inserting such before the
4865 attribute reference) to handle properly the case where we are
4866 processing a component of a larger record, and we need to prevent
4867 further expansion for the unchecked union.
4868 (Expand_Attribute_Reference, case 'Write): If the type is
4869 an unchecked_union, check whether enclosing scope is a Write
4870 subprogram. Replace attribute with a Raise_Program_Error if the
4871 discriminants of the unchecked_union type have not default values
4872 because such a use is erroneous..
4874 2017-04-25 Tristan Gingold <gingold@adacore.com>
4876 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
4877 Add relative_deadline to task record on edf profile.
4878 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
4879 (Make_Task_Create_Call): Pass relative_deadline value.
4880 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
4881 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
4882 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
4883 * sem_prag.adb (Set_Ravenscar_Profile): Handle
4884 GNAT_Ravenscar_EDF (set scheduling policy).
4885 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
4887 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
4888 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
4890 (Pragma_Deadline_Floor): New pragma.
4891 * targparm.adb (Get_Target_Parameters): Recognize
4892 GNAT_Ravenscar_EDF profile.
4894 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4896 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
4898 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4900 * sem_aux.adb (Nearest_Ancestor): Use original node of type
4901 declaration to locate nearest ancestor, because derived
4902 type declarations for record types are rewritten as record
4904 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
4905 properly derivations that are completions of private types.
4906 (Add_Predicates): If type is private, examine rep. items of full
4907 view, which may include inherited predicates.
4908 (Build_Predicate_Functions): Ditto.
4910 2017-04-25 Javier Miranda <miranda@adacore.com>
4912 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
4913 to generate new entities for subtype declarations located in
4914 Expression_With_Action nodes.
4916 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4918 * sem_elab.adb (Check_A_Call): Remove
4919 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
4920 need for Elaborate_All when SPARK elaboration checks are
4921 required. Update the checks for instances, variables, and calls
4922 to Default_Initial_Condition procedures.
4924 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4926 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
4927 into a boolean aspect, in analogy with the Ada aspect No_Return.
4929 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4931 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
4933 2017-04-25 Bob Duff <duff@adacore.com>
4935 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
4936 Is_True_Constant for an array variable that is passed to a
4937 foreign function as an 'in' parameter.
4938 * debug.adb: Document -gnatd.q.
4940 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4942 * sem_ch6.adb (Analyze_Expression_Function): If expression function
4943 is completion and return type is an access type do not freeze
4944 designated type: this will be done in the process of freezing
4945 the expression if needed.
4946 (Freeze_Expr_Types): Check whether type is complete before
4947 creating freeze node, to provide a better error message if
4948 reference is premature.
4949 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
4950 functions created by type derivations.
4952 2017-04-25 Pascal Obry <obry@adacore.com>
4954 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
4956 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4958 * sem_res.adb (Resolve_Type_Conversion):
4959 When resolving against any fixed type, set the type of the
4960 operand as universal real when the operand is a multiplication
4961 or a division where both operands are of any fixed type.
4962 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
4963 placement of an error message by pointing to the operand of a
4964 type conversion rather than the conversion itself.
4966 2017-04-25 Thomas Quinot <quinot@adacore.com>
4968 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
4969 Needs_Debug_Info when producing SCOs.
4971 2017-04-25 Thomas Quinot <quinot@adacore.com>
4973 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4974 Always pass a null finalization master for a library level named access
4975 type to which a pragme No_Heap_Finalization applies.
4977 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4981 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
4982 set to A'First(2) and vice versa.
4984 2017-04-25 Yannick Moy <moy@adacore.com>
4986 * freeze.adb (Freeze_Record_Type): Remove obsolete
4987 rule on volatile tagged record restriction on SPARK code.
4989 2017-04-25 Yannick Moy <moy@adacore.com>
4991 * sem_prag.adb (minor) Fix SPARK RM reference.
4993 2017-04-25 Yannick Moy <moy@adacore.com>
4995 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
4996 comment to reflect which entity is chosen as unique entity.
4997 (Unique_Entity): Return full view instead of private spec for
4998 protected type or task type. Fix possible incorrect access when
5001 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5003 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
5004 array types only instead of all packed array types.
5006 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5008 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
5009 dimension system, verify that dimensions of both match.
5010 (Check_Conformance): Add error message in case of dimension
5012 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
5015 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5017 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
5020 2017-04-25 Yannick Moy <moy@adacore.com>
5022 * sem_util.adb: Minor refactoring.
5023 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
5025 2017-04-25 Claire Dross <dross@adacore.com>
5027 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
5028 ultimate alias when accessing overridden operation. Indeed, if the
5029 overridden operation is itself inherited, it won't have any explicit
5032 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5034 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
5035 overlap if the two formals have different types, because formally
5036 the corresponding actuals cannot designate the same objects.
5038 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5040 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
5041 dimensions are present from context, use them. b) If operand is
5042 a static constant rewritten as a literal, obtain the dimensions
5043 from the original declaration, otherwise use dimensions of type
5044 established from context.
5046 2017-04-25 Yannick Moy <moy@adacore.com>
5048 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
5049 of array that is private.
5051 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5053 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
5056 2017-04-25 Yannick Moy <moy@adacore.com>
5058 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
5061 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5063 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
5064 the check that recognizes a call to a private overridding and
5065 replaces the called subprogram with its alias.
5067 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5069 * exp_util.adb: Minor reformatting.
5071 2017-04-25 Justin Squirek <squirek@adacore.com>
5073 * exp_ch3.adb (Freeze_Type): Add condition to always treat
5074 interface types as a partial view of a private type for the
5075 generation of invariant procedure bodies.
5076 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
5077 Add a condition to get the Corresponding_Record_Type for
5078 concurrent types, add condition to return in the absence of a
5079 class in the pragma, remove call to Replace_Type_References,
5080 and add call to Replace_References.
5081 (Add_Interface_Invariatns),
5082 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
5083 to including the working type T.
5084 (Add_Own_Invariants): Remove
5085 legacy condition for separate units, remove dispatching for ASIS
5086 and save a copy of the expression in the pragma expression.
5087 (Build_Invariant_Procedure_Body): Default initalize vars,
5088 remove return condition on interfaces, always use the
5089 private type for interfaces, and move the processing of types
5090 until after the processing of invariants for the full view.
5091 (Build_Invariant_Procedure_Declaration): Remove condition
5092 to return if an interface type is encountered and add
5093 condition to convert the formal parameter to its class-wide
5094 counterpart if Work_Typ is abstract.
5095 (Replace_Type): Add call to Remove_Controlling_Arguments.
5096 (Replace_Type_Ref): Remove class-wide dispatching for the current
5097 instance of the type.
5098 (Replace_Type_References): Remove parameter "Derived"
5099 (Remove_Controlling_Arguments): Created in order to removing
5100 the controlliong argument from calls to primitives in the case
5101 of the formal parameter being an class-wide abstract type.
5102 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
5103 to the change made to Freeze_Type in exp_ch3. Add a condition
5104 to treat interface types as a partial view.
5105 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
5106 to Build_Invariant_Procedure_Declaration to properly generate a
5107 "partial" invariant procedure when Typ is an interface.
5109 2017-04-25 Bob Duff <duff@adacore.com>
5111 * a-numeri.ads: Go back to using brackets encoding for the Greek
5114 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5116 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
5117 (10-15): if derived type T with progenitors is abstract,
5118 and primitive P of this type inherits non-trivial classwide
5119 preconditions from both a parent operation and from an interface
5120 operation, then the inherited operation is abstract if the parent
5121 operation is not null.
5122 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
5123 with Covered_Interface_Op to yield the actual interface operation
5124 that is implemented by a given inherited operation.
5126 2017-04-25 Javier Miranda <miranda@adacore.com>
5128 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
5129 and right operands after performing the validity checks. Required
5130 because validity checks may remove side effects from the operands.
5132 2017-04-25 Javier Miranda <miranda@adacore.com>
5134 * exp_attr.adb (Attribute_Unrestricted_Access):
5135 Do not disable implicit type conversion. Required to generate
5136 code that displaces the pointer to reference the secondary
5139 2017-04-25 Pascal Obry <obry@adacore.com>
5141 * prj-attr.adb, snames.ads-tmpl: Add package Install's
5142 Required_Artifacts attribute.
5144 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5146 * sem_util.adb (Same_Value): String literals are compile-time
5147 values, and comparing them must use Expr_Value_S.
5149 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5151 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
5152 dereference is introduced for the object, and the object is
5153 overloaded, do not check whether it is aliased, because it may
5154 include an implicit dereference.
5155 * sem_type.adb (Disambiguate): If two interpretations are access
5156 attribute types with the same designated type keep either of
5157 them and do not report an ambiguity. A true ambiguity will be
5160 2017-04-25 Bob Duff <duff@adacore.com>
5162 * a-numeri.ads: Change the encoding of Greek letter Pi from
5163 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
5164 to indicate the encoding. We considered using a byte order mark
5165 (BOM), but that causes various trouble (misc software eats the
5166 BOM, if you have a patch with a BOM, then it's not at the start
5167 of the patch, so it's not a BOM, the BOM affects with-ing files,
5169 * scng.adb, s-wchcnv.adb: Minor.
5171 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5173 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
5174 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5176 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
5177 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
5178 Improve error message on operations that inherit non-conforming
5179 classwide preconditions from ancestor and progenitor.
5180 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
5181 moved here from sem_ch3.
5182 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5183 check given in RM 6.1.1 (17) concerning renamings of overriding
5184 operations that inherits class-wide preconditions from ancestor
5187 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5189 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
5190 (Build_Adjust_Statements): Code cleanup.
5191 (Build_Finalizer): Update the initialization of
5193 (Build_Finalize_Statements): Code cleanup.
5194 (Build_Initialize_Statements): Code cleanup.
5195 (Make_Deep_Array_Body): Update the initialization of
5197 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
5198 (Process_Object_Declaration): Generate a null exception handler only
5199 when exceptions are allowed.
5200 (Process_Transients_In_Scope): Update the initialization of
5202 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
5204 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
5205 restrictions when the handler is internally generated and the
5208 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5210 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
5211 enforce legality rule on classwide preconditions inherited from
5212 both an ancestor and a progenitor (RM 6.1.1 (10-13).
5213 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
5214 subprogram need not be dispatching if it appears in a precondition
5215 for an abstract or null subprogram.
5217 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5219 * sem_ch10.adb: Minor typo fix.
5221 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5223 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
5225 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5227 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
5228 have a length which is a power of 2.
5229 (Is_Predefined_File_Name): Likewise. Adjust comment.
5231 2017-04-25 Bob Duff <duff@adacore.com>
5233 * exp_aggr.adb (Component_Count): Protect the
5234 arithmetic from attempting to convert a value >= 2**31 to Int,
5235 which would otherwise raise Constraint_Error.
5237 2017-04-25 Bob Duff <duff@adacore.com>
5239 * opt.ads (Locking_Policy): Fix incorrect documentation. The
5240 first character of the policy name is not unique.
5242 2017-04-25 Bob Duff <duff@adacore.com>
5244 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
5245 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
5246 about this flag not being used. It was already used, and it is
5249 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5251 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
5252 (Ignore_SPARK_Mode_Pragmas): New routine.
5253 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
5254 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
5255 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
5257 (Ignore_SPARK_Mode_Pragmas): New routine
5258 along with pragma Inline.
5259 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
5260 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
5261 Ignore_SPARK_Mode_Pragmas_In_Instance.
5262 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
5263 Save and restore the value of global flag
5264 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
5265 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
5266 the corresponding spec or the body must ignore all SPARK_Mode
5267 pragmas found within.
5268 (Analyze_Subprogram_Declaration): Mark
5269 the spec when it needs to ignore all SPARK_Mode pragmas found
5270 within to allow the body to infer this property in case it is
5271 instantiated or inlined later.
5272 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
5273 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5274 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5275 when the corresponding spec also ignored all SPARK_Mode pragmas
5277 (Analyze_Package_Declaration): Mark the spec when
5278 it needs to ignore all SPARK_Mode pragmas found within to allow
5279 the body to infer this property in case it is instantiated or
5281 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
5282 Save and restore the value of flag
5283 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5284 formal spec when it needs to ignore all SPARK_Mode
5285 pragmas found within to allow the body to infer this
5286 property in case it is instantiated or inlined later.
5287 (Analyze_Package_Instantiation): Save and restore the value
5288 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
5289 the instance spec when it needs to ignore all SPARK_Mode
5290 pragmas found within to allow the body to infer this
5291 property in case it is instantiated or inlined later.
5292 (Analyze_Subprogram_Instantiation): Save and restore the value
5293 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5294 instance spec and anonymous package when they need to ignore
5295 all SPARK_Mode pragmas found within to allow the body to infer
5296 this property in case it is instantiated or inlined later.
5297 (Instantiate_Package_Body): Save and restore the value of global
5298 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
5299 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
5300 corresponding instance spec also ignored all SPARK_Mode pragmas
5302 (Instantiate_Subprogram_Body): Save and restore the
5303 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5304 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5305 when the corresponding instance spec also ignored all SPARK_Mode
5306 pragmas found within.
5307 * sem_prag.adb (Analyze_Pragma): Update the reference to
5308 Ignore_Pragma_SPARK_Mode.
5309 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
5310 all SPARK_Mode pragmas defined within yields mode "off".
5312 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5314 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
5316 2017-04-25 Bob Duff <duff@adacore.com>
5318 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
5319 All_Checks" to avoid generating unnecessary checks.
5320 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
5322 * sem.ads: Fix comment.
5323 * expander.ads: Fix comment.
5324 * exp_atag.ads: Fix comment: "Index = 0" should be
5327 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5329 * s-taprop-linux.adb: Minor editorial fixes.
5331 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5333 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
5334 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
5335 variable and set it to True whenever the main hash table is
5336 populated. Short- circuit the Assoc function if it is false
5337 and add associated guards.
5339 2017-04-25 Olivier Hainque <hainque@adacore.com>
5341 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
5342 specs without elaboration code that have an elaboration counter
5343 nevertheless, e.g. when compiled with -fpreserve-control-flow.
5344 * sem_ch10.adb (Analyze_Compilation_Unit):
5345 Set_Elaboration_Entity_Required when requested to preserve
5346 control flow, to ensure the unit elaboration is materialized at
5347 bind time, resulting in the inclusion of the unit object file
5348 in the executable closure at link time.
5350 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5352 * exp_dbug.adb: In Debug_Renaming_Declaration,
5353 when dealing with indexed component, accept to produce a renaming
5354 symbol when the index is an IN parameter or when it is a name
5355 defined in an outer scope.
5357 2017-04-25 Yannick Moy <moy@adacore.com>
5359 * errout.adb (Error_Msg): Adapt continuation
5360 message in instantiations and inlined bodies for info messages.
5362 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5364 * fname.adb (Has_Internal_Extension): Add pragma Inline.
5365 Use direct 4-character slice comparisons.
5367 pragma Inline. (Has_Suffix): Delete.
5368 (Is_Internal_File_Name):
5369 Test Is_Predefined_File_Name first.
5370 (Is_Predefined_File_Name):
5371 Use direct slice comparisons as much as possible and limit all
5372 comparisons to at most 8 characters.
5374 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5376 * checks.adb (Insert_Valid_Check): Code cleanup.
5377 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
5378 (Expand_Actuals): Generate proper copy-back for a validation
5379 variable when it acts as the argument of a type conversion.
5380 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
5381 predicate to operate on type qualifications.
5383 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5385 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
5388 2017-04-25 Bob Duff <duff@adacore.com>
5390 * sem_prag.adb (No_Return): Give an error if the pragma applies
5391 to a body. Specialize the error for the specless body case,
5392 as is done for (e.g.) pragma Convention.
5393 * debug.adb: Add switch -gnatd.J to disable the above legality
5394 checks. This is mainly for use in our test suite, to avoid
5395 rewriting a lot of illegal (but working) code. It might also
5396 be useful to customers. Under this switch, if a pragma No_Return
5397 applies to a body, and the procedure raises an exception (as it
5398 should), the pragma has no effect. If the procedure does return,
5399 execution is erroneous.
5401 2017-04-25 Bob Duff <duff@adacore.com>
5403 * exp_ch6.adb (Expand_Actuals): This is the
5404 root of the problem. It took N as an 'in out' parameter, and in
5405 some cases, rewrote N, but then set N to Original_Node(N). So
5406 the node returned in N had no Parent. The caller continued
5407 processing of this orphaned node. In some cases that caused a
5408 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
5409 and trips over the Empty Parent). The solution is to make N an
5410 'in' parameter. Instead of rewriting it, return the list of
5411 post-call actions, so the caller can do the rewriting later,
5412 after N has been fully processed.
5413 (Expand_Call_Helper): Move most of Expand_Call here. It has
5414 too many premature 'return' statements, and we want to do the
5415 rewriting on return.
5416 (Insert_Post_Call_Actions): New procedure to insert the post-call
5417 actions in the appropriate place. In the problematic case,
5418 that involves rewriting N as an Expression_With_Actions.
5419 (Expand_Call): Call the new procedures Expand_Call_Helper and
5420 Insert_Post_Call_Actions.
5422 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5424 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
5425 properly type derived from generic formal types, to handle
5426 properly modified version of ACATS 4.1B B611017.
5428 2017-04-25 Javier Miranda <miranda@adacore.com>
5430 * exp_unst.adb (Subp_Index): Adding missing
5431 support for renamings and functions that return a constrained
5432 array type (i.e. functions for which the frontend built a
5433 procedure with an extra out parameter).
5435 2017-04-25 Pascal Obry <obry@adacore.com>
5437 * s-string.adb: Minor code clean-up.
5439 2017-04-25 Bob Duff <duff@adacore.com>
5441 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
5443 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
5444 function for Non_Blocking_Wait_Process.
5446 2017-04-25 Bob Duff <duff@adacore.com>
5448 * prep.adb (Preprocess): Remove incorrect
5449 Assert. Current character can be ASCII.CR.
5451 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5453 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
5454 convention Stdcall, which has a number of exceptions. Convention
5455 is legal on a component declaration whose type is an anonymous
5456 access to subprogram.
5458 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5460 * sem_ch4.adb: sem_ch4.adb Various reformattings.
5461 (Try_One_Prefix_Interpretation): Use the base type when dealing
5462 with a subtype created for purposes of constraining a private
5463 type with discriminants.
5465 2017-04-25 Javier Miranda <miranda@adacore.com>
5467 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
5468 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
5469 dispatching primitives (Restore_Warnings): Restore warning on
5470 late dispatching primitives (Save_Warnings): Save warning on late
5471 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
5472 to enable/disable this warning.
5473 (WA_Warnings): Set warning on late dispatching primitives.
5474 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
5475 that its parent type has a private extension.
5476 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
5478 * usage.adb: Document -gnatw.j and -gnatw.J.
5480 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5482 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
5485 2017-04-25 Bob Duff <duff@adacore.com>
5487 * binde.adb (Validate): Do not pass dynamic strings
5488 to pragma Assert, because older compilers do not support that.
5490 2017-04-25 Bob Duff <duff@adacore.com>
5492 * s-fileio.adb (Close): When a temp file is
5493 closed, delete it and clean up its Temp_File_Record immediately,
5494 rather than waiting until later.
5495 (Temp_File_Record): Add File
5496 component, so Close can know which Temp_File_Record corresponds
5497 to the file being closed.
5498 (Delete): Don't delete temp files,
5499 because they are deleted by Close.
5500 (Open): Set the File component
5501 of Temp_File_Record. This requires moving the creation of the
5502 Temp_File_Record to the end, after the AFCB has been created.
5504 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5506 * checks.adb (Insert_Valid_Check): Do not generate
5507 a validity check when inside a generic.
5509 2017-04-25 Yannick Moy <moy@adacore.com>
5511 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
5513 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5515 * snames.ads-tmpl (Snames): More names for detecting predefined
5516 potentially blocking subprograms.
5518 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5520 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
5521 concerning inheritance of class-wide preconditions do not apply
5524 2017-04-25 Bob Duff <duff@adacore.com>
5526 * s-ficobl.ads: Minor comment fix.
5528 2017-04-25 Yannick Moy <moy@adacore.com>
5530 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
5531 conversions from float to integer in GNATprove mode.
5532 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
5533 to call Apply_Type_Conversion_Checks, so that range checks
5534 are properly positioned when needed on conversions, including
5535 when converting from float to integer. (Determine_Range): In
5536 GNATprove mode, take into account the possibility of conversion
5537 from float to integer.
5538 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
5539 check on conversions from fixed-point to integer, not anymore
5540 on conversions from floating-point to integer, when in GNATprove
5543 2017-04-25 Yannick Moy <moy@adacore.com>
5545 * checks.adb (Determine_Range_R): Special case type conversions
5546 from integer to float in order to get bounds in that case too.
5547 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
5548 mode, for computations involved in interval checking.
5550 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5552 * checks.adb (Insert_Valid_Check): Partially reimplement validity
5554 * einfo.adb Node36 is now used as Validated_Object.
5555 (Validated_Object): New routine.
5556 (Set_Validated_Object): New routine.
5557 (Write_Field36_Name): Add an entry for Validated_Object.
5558 * einfo.ads Add new attribute Validated_Object along with
5560 (Validated_Object): New routine along with pragma Inline.
5561 (Set_Validated_Object): New routine along with pragma Inline.
5562 * exp_attr.adb (Make_Range_Test): Add processing for validation
5563 variables to avoid extra reads and copies of the prefix.
5564 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
5565 variables in order to reflect any changes done in the variable
5566 back into the original object.
5567 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
5568 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
5570 2017-04-25 Steve Baird <baird@adacore.com>
5572 * exp_ch7.adb (Build_Array_Deep_Procs,
5573 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
5574 generate Finalize_Address routines for CodePeer.
5576 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5578 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
5579 Analyze_Pre_Post_Condition, to implement the legality checks
5580 mandated by AI12-0131: Pre'Class shall not be specified for an
5581 overriding primitive subprogram of a tagged type T unless the
5582 Pre'Class aspect is specified for the corresponding primitive
5583 subprogram of some ancestor of T.
5585 2017-04-25 Bob Duff <duff@adacore.com>
5587 * sem_ch8.adb (Use_One_Type): If a use_type_clause
5588 is redundant, set its Used_Operations to empty. This is only
5589 necessary for use clauses that appear in the parent of a generic
5590 child unit, because those use clauses get reanalyzed when we
5591 instantiate the generic, and we don't want the Used_Operations
5592 carried over from the original context (where it was probably
5595 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5597 * exp_ch6.adb: Minor reformatting.
5599 2017-04-25 Bob Duff <duff@adacore.com>
5601 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5602 Use Source_Index (Current_Sem_Unit) to find the correct casing.
5603 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
5604 (Current_Sem_Unit) to find the correct casing.
5605 * par.adb (Par): Null out Current_Source_File, to ensure that
5606 the above bugs won't rear their ugly heads again.
5608 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5610 * sem_ch8.adb (Find_Type): For an attribute reference
5611 'Class, if prefix type is synchronized and previous errors
5612 have suppressed the creation of the corresponding record type,
5613 create a spurious class-wide for the synchonized type itself,
5614 to catch other misuses of the attribute
5616 2017-04-25 Steve Baird <baird@adacore.com>
5618 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
5619 is True, then don't generate the accessibility check for the
5620 tag of a tagged result.
5621 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
5622 if CodePeer_Mode is True, then don't generate the
5623 tag checks for the result of call to an instance of
5624 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
5625 descendant of" check and the accessibility check).
5627 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5629 * sem_ch13.adb: Code cleanups.
5630 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
5631 * sem_ch8.ads: Minor comment fix.
5633 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5635 * exp_ch4.adb (Library_Level_Target): New function.
5636 (Expand_Concatenate): When optimization is enabled, also expand
5637 the operation out-of-line if the concatenation is present within
5638 the expression of the declaration of a library-level object and
5639 not only if it is the expression of the declaration.
5641 2017-04-25 Bob Duff <duff@adacore.com>
5643 * freeze.adb (Freeze_Object_Declaration): Do
5644 not Remove_Side_Effects if there is a pragma Linker_Section,
5645 because in that case we want static initialization in the
5646 appropriate section.
5648 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5650 * exp_dbug.adb: Minor rewording and reformatting.
5652 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5654 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
5655 handle the proposed changes to rules concerning potentially
5656 unevaluated expressions, to include selected components that
5657 do not depend on discriminants, and indexed components with
5659 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
5660 predicate in quantified expression, and fix bugs in the handling
5661 of case expressions and membership test.
5662 (Analyze_Attribute_Old_Result): use new predicate.
5663 (Analyze_Attribute, case Loop_Entry): ditto.
5665 2017-04-25 Bob Duff <duff@adacore.com>
5667 * s-secsta.adb (SS_Info): Add a comment
5668 explaining why we don't need to walk all the chunks in order to
5669 compute the total size.
5671 2017-04-25 Bob Duff <duff@adacore.com>
5673 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
5674 of the global name buffer to 4*Max_Line_Length.
5676 2017-04-25 Javier Miranda <miranda@adacore.com>
5678 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
5679 renaming entity for debug information, mark the entity as needing debug
5680 info if it comes from sources.
5682 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5684 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
5685 restriction converning the use of 'Address where the prefix is
5686 of a controlled type.
5688 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5690 * exp_dbug.adb: In Debug_Renaming_Declaration,
5691 skip slices that are made redundant by an indexed component
5693 * atree.h: New definition for Original_Node.
5695 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5697 * sem_prag.adb, sem_prag.ads: Minor reformatting.
5699 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5701 * sem_ch3.adb (Check_Entry_Contract): Call
5702 Preanalyze_Spec_Expression so that resolution takes place as well.
5703 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
5704 internal calls that appear in preconditions of protected
5705 operations, in default values for same, and in contract guards
5706 for contract cases in SPARK.
5708 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5710 * a-numaux.ads: Fix description of a-numaux-darwin
5712 (Double): Define to Long_Float.
5713 * a-numaux-vxworks.ads (Double): Likewise.
5714 * a-numaux-darwin.ads
5716 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
5717 * a-numaux-x86.ads: Fix package description.
5718 * a-numaux-x86.adb (Is_Nan): Minor tweak.
5719 (Reduce): Adjust and complete description. Call Is_Nan instead of
5720 testing manually. Use an integer temporary to hold rounded value.
5721 * a-numaux-darwin.adb (Reduce): Likewise.
5722 (Is_Nan): New function.
5724 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5726 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
5727 on analysis of prefix whose type is a current instance of a
5728 synchronized type, but where the prefix itself is an entity that
5731 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5733 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
5734 the identity of callable entities therein, because they have been
5735 properly resolved, and prefixed calls may have been rewritten
5738 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
5740 * exp_ch3.adb (Build_Init_Statements): Convert
5741 the expression of the pragma/aspect Secondary_Stack_Size to
5742 internal type System.Parameters.Size_Type before assigning
5743 it to the Secondary_Stack_Size component of the task type's
5744 corresponding record.
5746 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5748 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
5749 (etc) optimizations when the type is modular and the offsets
5752 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5754 * s-osinte-freebsd.ads: Minor comment tweaks
5756 2017-04-25 Javier Miranda <miranda@adacore.com>
5758 * urealp.adb (UR_Write): Reverse previous patch
5759 adding documentation on why we generate multiplications instead
5760 of divisions (needed to avoid expressions whose computation with
5761 large numbers may cause division by 0).
5763 2017-04-25 Bob Duff <duff@adacore.com>
5765 * erroutc.adb (Set_Specific_Warning_Off,
5766 Set_Warnings_Mode_Off): Use the correct source file for
5767 Stop. Was using Current_Source_File, which is only valid during
5768 parsing. Current_Source_File will have a leftover value from
5769 whatever file happened to be parsed last, because of a with_clause
5772 2017-04-25 Bob Duff <duff@adacore.com>
5774 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
5775 to In_Predefined_Unit, but including GNAT units.
5776 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
5777 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
5778 because Should_Ignore_Pragma was not working reliably outside
5779 the parser, because Current_Source_File is not valid.
5780 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
5781 * par-prag.adb: Call Should_Ignore_Pragma_Par.
5783 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5785 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
5788 2017-04-25 Javier Miranda <miranda@adacore.com>
5790 * urealp.adb (UR_Write): Fix output of constants with a base other
5793 2017-04-25 Justin Squirek <squirek@adacore.com>
5795 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
5796 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
5797 Add extra parameter for Process_Interface_Name.
5798 (Process_Interface_Name): Add parameter for pragma to analyze
5799 corresponding aspect.
5800 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
5803 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5805 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
5808 2017-04-25 Yannick Moy <moy@adacore.com>
5810 * sem_res.adb (Resolve_Comparison_Op): Do not
5811 attempt evaluation of relational operations inside assertions.
5813 2017-04-25 Justin Squirek <squirek@adacore.com>
5815 * exp_util.adb (Add_Interface_Invariants):
5816 Restored, code moved back from Build_Invariant_Procedure_Body.
5817 (Add_Parent_Invariants): Restored, code moved back from
5818 Build_Invariant_Procedure_Body.
5819 (Build_Invariant_Procedure_Body):
5820 Remove refactored calls and integrated code from
5821 Add_Parent_Invariants and Add_Interface_Invariants.
5823 2017-04-25 Johannes Kanig <kanig@adacore.com>
5825 * errout.adb (Output_Messages): Adjust computation of total
5827 * erroutc.adb (Error_Msg): In statistics counts, deal
5828 correctly with informational messages that are not warnings.
5829 * errutil.adb (Finalize): adjust computation of total errors.
5831 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5833 * terminals.c (__gnat_terminate_pid): New.
5834 * g-exptty.ads (Terminate_Process): New. Update comments.
5836 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5838 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
5840 2017-04-25 Justin Squirek <squirek@adacore.com>
5842 * sem_ch3.adb (Analyze_Declarations): Minor
5843 correction to comments, move out large conditional and scope
5844 traversal into a predicate.
5845 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
5848 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5850 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
5851 of prefix whose type is a current instance of a synchronized
5852 type. If the prefix is an object this is an external call (or
5853 requeue) that can only access public operations of the object. The
5854 previous predicate was too restrictive, and did not allow public
5855 protected operations, only task entries.
5857 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5859 * sem_ch5.adb, fname.adb: Minor reformatting.
5861 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5863 * einfo.adb (Is_Anonymous_Access_Type): New routine.
5864 * einfo.ads Update the placement of
5865 E_Anonymous_Access_Subprogram_Type along with all subtypes that
5867 (Is_Anonymous_Access_Type): New routine.
5868 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
5869 master for an access type subject to pragma No_Heap_Finalization.
5870 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
5871 allocated or deallocated does not finalization actions if the
5872 associated access type is subject to pragma No_Heap_Finalization.
5873 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
5874 * par-prag.adb Pragma No_Heap_Finalization does not need special
5875 processing from the parser.
5876 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
5877 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
5878 * sem_prag.adb Add an entry in table Sig_Flags for pragma
5879 No_Heap_Finalization.
5880 (Analyze_Pragma): Add processing for
5881 pragma No_Heap_Finalization. Update various error messages to
5882 use Duplication_Error.
5883 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
5884 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
5885 and corresponding pragma id.
5887 2017-04-25 Bob Duff <duff@adacore.com>
5889 * freeze.adb (Freeze_Record_Type): Use the
5890 underlying type of the component type to determine whether it's
5891 elementary. For representation clause purposes, a private type
5892 should behave the same as its full type.
5893 * fname.ads, fname.adb (Is_Predefined_File_Name):
5894 Make sure things like "system.ali" are recognized as predefined.
5896 2017-04-25 Javier Miranda <miranda@adacore.com>
5898 * debug.adb: Update documentation of -gnatd.6.
5900 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5902 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
5903 element iterator when the name is an overloaded function call,
5904 one of whose interpretations yields an array.
5906 2017-04-25 Bob Duff <duff@adacore.com>
5908 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
5909 Is_Internal_Unit_Name): New functions for operating on unit
5910 names, as opposed to file names. There's some duplicated code
5911 with fname.adb, which is unfortunate, but it seems like we don't
5912 want to add dependencies here.
5913 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
5914 to Is_Predefined_Unit_Name; the former was wrong, because Uname
5915 is not a file name at all.
5916 * fname.ads, fname.adb: Document the fact that
5917 Is_Predefined_File_Name and Is_Internal_File_Name can be called
5918 for ALI files, and fix the code so it works properly for ALI
5919 files. E.g. these should return True for "system.ali".
5921 2017-04-25 Justin Squirek <squirek@adacore.com>
5923 * exp_util.adb (Add_Invariant): Removed,
5924 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
5925 and Add_Own_Invariant. (Add_Invariant_Check): Used
5926 for adding runtime checks from any kind of invariant.
5927 (Add_Inherited_Invariant): Generates invariant checks for
5928 class-wide invariants (Add_Interface_Invariants): Removed, code
5929 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
5930 Create a types own invariant procedure (Add_Parent_Invariants):
5931 Removed, code moved to Build_Invariant_Procedure_Body
5932 (Build_Invariant_Procedure_Body): Add refactored calls
5933 and integrated code from Add_Parent_Invariants and
5934 Add_Interface_Invariants.
5935 (Process_Type): Removed, the
5936 relavant code was inlined into both Add_Own_Invariant and
5937 Add_Inherited_Invariant.
5939 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5941 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
5942 scn.adb, osint.adb, fname.adb: Minor reformatting.
5944 2017-04-25 Pascal Obry <obry@adacore.com>
5946 * s-taprop-mingw.adb: Do not check for CloseHandle in
5949 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5951 * sem_util.adb (Check_Part_Of_Reference):
5952 Continue to examine the context if the reference appears within
5953 an expression function.
5955 2017-04-25 Justin Squirek <squirek@adacore.com>
5957 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
5958 and Build_Invariant_Procedure_Declaration.
5959 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
5960 and Build_Invariant_Procedure_Declaration from exp_ch7
5961 and break-out Is_Untagged_Private_Derivation from
5962 Build_Invariant_Procedure_Body.
5963 (Replace_Type_References):
5964 Append an extra parameter to allow for dispatching replacements
5965 and add the corrasponding logic.
5966 (Type_Invariant): Remove
5967 Replace_Typ_Refs and replace its references with calls to
5968 Replace_Type_References.
5969 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
5971 2017-04-25 Bob Duff <duff@adacore.com>
5973 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
5974 that returns True when appropriate.
5975 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
5976 when compiling predefined files.
5977 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
5978 "gnat.adc" should not be considered a predefined file name.
5979 That required (or at least encouraged) a lot of cleanup of global
5980 variable usage. We shouldn't be communicating information via
5981 the global name buffer.
5982 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
5983 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
5984 required by the above-mentioned cleanup.
5986 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5988 * osint.adb (Find_File): Handle properly a request for a
5989 configuration file whose name is a directory.
5991 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5993 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
5995 2017-04-25 Bob Duff <duff@adacore.com>
5997 * types.ads: Minor: Fix '???' comment.
5998 * sem_ch8.adb: Minor comment fix.
6000 2017-04-25 Bob Duff <duff@adacore.com>
6002 * sem_prag.adb: Remove suspicious uses of Name_Buf.
6003 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
6004 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
6005 Add String_To_Name with no side effects.
6007 2017-04-25 Justin Squirek <squirek@adacore.com>
6009 * sem_ch3.adb (Analyze_Declarations): Add
6010 additional condition for edge case.
6012 2017-04-25 Bob Duff <duff@adacore.com>
6014 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
6015 reserved words inside pragmas. This is necessary to allow the
6016 pragma name Interface to be used in pragma Ignore_Pragma.
6017 * par.adb: Minor comment fix.
6019 2017-04-25 Javier Miranda <miranda@adacore.com>
6021 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
6022 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
6023 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
6024 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
6025 occurrences of RE_Type_Is_Abstract
6027 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6029 * exp_util.adb (Build_Chain): Account for ancestor
6030 subtypes while traversing the derivation chain.
6032 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6034 * sem_attr.adb: minor reformatting.
6036 2017-04-25 Doug Rupp <rupp@adacore.com>
6038 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
6040 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6042 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
6043 the first pass over an assignment statement with target names,
6044 to prevent the generation of subtypes (such as discriminated
6045 record components)that may carry the target name outside of the
6046 tree for the assignment. The subtypes will be generated when
6047 the assignment is reanalyzed in full.
6048 (Analyze_Target_Name): Handle properly class-wide types.
6050 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6052 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
6053 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6054 the purposes of freezing.
6055 * exp_util.adb Update the documentation and structure of the
6056 type map used in class-wide semantics of assertion expressions.
6057 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6058 and resolve the triaged expression because all substitutions
6059 refer to the proper entities. Update the replacement of
6061 (Build_DIC_Procedure_Body): Add formal parameter
6062 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6063 are now only processed when freezing occurs. Build a body only
6065 (Entity_Hash): Removed.
6066 (Map_Types): New routine.
6067 (Replace_Object_And_Primitive_References): Removed.
6068 (Replace_References): New routine.
6069 (Replace_Type_References): Moved to the library level of Exp_Util.
6070 (Type_Map_Hash): New routine.
6071 (Update_Primitives_Mapping): Update the mapping call.
6072 (Update_Primitives_Mapping_Of_Types): Removed.
6073 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6074 parameter For_Freeze and update the comment on usage.
6075 (Map_Types): New routine.
6076 (Replace_References): New routine.
6077 (Replace_Type_References): Moved to the library level of Exp_Util.
6078 (Update_Primitives_Mapping_Of_Types): Removed.
6079 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6080 properties of the private type to the full view in case the full
6081 view derives from a parent type and inherits a DIC pragma.
6082 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6083 DIC pragma is placed at the top of a declarative region.
6085 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6087 * a-tasatt.adb: Complete previous change and use an unsigned
6088 int to avoid overflow checks.
6090 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6092 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
6093 the error message when the attribute reference is an actual in
6094 a call to a subprogram inherited from a generic formal type with
6095 unknown discriminants, which makes the subprogram and its formal
6096 parameters intrinsic (see RM 6.3.1 (8) and (13)).
6098 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6100 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
6101 sem_prag.adb: Minor reformatting.
6103 2017-04-25 Bob Duff <duff@adacore.com>
6105 * sem_attr.adb (Type_Key): Add code in the
6106 recursive Compute_Type_Key to protect against fetching the source
6107 code for Standard, in case a component of the type is declared
6108 in Standard. There was already code to do this for the original
6109 type, but not for its components.
6111 2017-04-25 Javier Miranda <miranda@adacore.com>
6113 * exp_ch3.adb (Build_Initialization_Call): Handle
6114 subtypes of private types when searching for the underlying full
6115 view of a private type.
6117 2017-04-25 Javier Miranda <miranda@adacore.com>
6119 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
6120 real conditional expression can appear in a fixed-type context
6121 and must be resolved with that context to facilitate the code
6122 generation to the backend.
6124 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6126 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
6127 to indicate whether during inline processing, when some unit U1
6128 appears in the context of a unit U2 compiled for instantiation
6129 or inlining purposes, the body of U1 needs to be compiled as well.
6130 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
6131 context is a package declaration.
6132 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
6133 Analyze_Generic_Package_Declaration): ditto.
6134 * inline.adb (Analyze_Inlined_Bodies): Check
6135 Body_Needed_For_Inlining.
6137 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6139 * par.adb (Current_Assign_Node): Global variable use to record
6140 the presence of a target_name in the right hand side of the
6141 assignment being parsed.
6142 * par-ch4.adb (P_Name): If the name is a target_name, mark the
6143 enclosing assignment node accordingly.
6144 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
6146 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
6147 analyzing RHS if the statement has target_names.
6148 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
6149 properly choices that are subtype marks.
6150 * exp_ch5.adb: Code cleanup.
6152 2017-04-25 Bob Duff <duff@adacore.com>
6154 * s-memory.adb: Add a comment regarding efficiency.
6155 * atree.adb: Fix the assertion, and combine 2 assertions into one,
6156 "the source has an extension if and only if the destination does."
6157 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
6159 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6161 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
6164 2017-04-25 Doug Rupp <rupp@adacore.com>
6166 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
6167 handling for ppc64-vx7.
6168 * sigtramp-vxworks-target.inc
6169 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
6171 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6173 * ada_get_targ.adb: New file.
6175 2017-04-25 Bob Duff <duff@adacore.com>
6177 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
6178 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
6179 (UI_GCD): Remove ??? comment involving possible efficiency
6180 improvements. This just isn't important after all these years.
6182 * uintp.ads: Minor cleanup.
6184 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6186 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
6187 Revert previous changes.
6188 * scng.adb: Minor reformatting.
6189 * s-stratt.ads: Fix unbalanced parens in comment.
6191 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6193 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
6196 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6198 * scng.adb (Scan): Handle '@' appropriately.
6199 * sem_ch5.adb: Code cleanup.
6201 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6203 * freeze.adb (Check_Expression_Function): Do not check for the
6204 use of deferred constants if the freezing of the expression
6205 function is triggered by its generated body, rather than a
6208 2017-04-25 Javier Miranda <miranda@adacore.com>
6210 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
6211 subtypes of private types when performing the view conversion.
6213 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6215 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6216 the purposes of freezing.
6217 * exp_util.adb Update the documentation and structure of the
6218 type map used in class-wide semantics of assertion expressions.
6219 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6220 and resolve the triaged expression because all substitutions
6221 refer to the proper entities. Update the replacement of
6223 (Build_DIC_Procedure_Body): Add formal parameter
6224 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6225 are now only processed when freezing occurs. Build a body only
6227 (Entity_Hash): Removed.
6228 (Map_Types): New routine.
6229 (Replace_Object_And_Primitive_References): Removed.
6230 (Replace_References): New routine.
6231 (Replace_Type_References): Moved to the library level of Exp_Util.
6232 (Type_Map_Hash): New routine.
6233 (Update_Primitives_Mapping): Update the mapping call.
6234 (Update_Primitives_Mapping_Of_Types): Removed.
6235 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6236 parameter For_Freeze and update the comment on usage.
6237 (Map_Types): New routine.
6238 (Replace_References): New routine.
6239 (Replace_Type_References): Moved to the library level of Exp_Util.
6240 (Update_Primitives_Mapping_Of_Types): Removed.
6241 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6242 properties of the private type to the full view in case the full
6243 view derives from a parent type and inherits a DIC pragma.
6244 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6245 DIC pragma is placed at the top of a declarative region.
6247 2017-04-25 Tristan Gingold <gingold@adacore.com>
6249 * s-mmap.ads (Data): Add pragma Inline.
6251 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6253 * checks.adb (Insert_Valid_Check): Do not use
6254 a renaming to alias a volatile name because this will lead to
6255 multiple evaluations of the volatile name. Use a constant to
6256 capture the value instead.
6258 2017-04-25 Doug Rupp <rupp@adacore.com>
6260 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
6262 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6264 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
6265 Add out parameter to indicate to caller that a wrapper must
6266 be constructed for an inherited primitive whose inherited
6267 pre/postcondition has called to overridden primitives.
6268 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
6269 for inherited primitive that requires it.
6270 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
6271 legal primitive operations and belong to the list of bodies
6272 generated after the freeze point of a type.
6273 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
6274 of Build_Class_Wide_Expression.
6275 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
6276 to construct the specification of the wrapper subprogram created
6277 for an inherited operation.
6279 2017-04-25 Bob Duff <duff@adacore.com>
6281 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
6282 pthread_mutexattr_setprioceiling): Add new interfaces for these
6284 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
6285 protocols as appropriate for Locking_Policy 'C' and 'I'.
6286 * s-taprop-posix.adb: Minor reformatting to make it more similar
6287 to s-taprop-linux.adb.
6289 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6291 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
6292 Handle properly a multi- level derivation involving both renamed
6293 and constrained parent discriminants, when the type to be
6294 constrained has fewer discriminants that the ultimate ancestor.
6296 2017-04-25 Bob Duff <duff@adacore.com>
6298 * sem_util.adb (Is_Object_Reference): In the
6299 case of N_Explicit_Dereference, return False if it came from a
6300 conditional expression.
6302 2017-04-25 Bob Duff <duff@adacore.com>
6304 * par-ch4.adb (P_Case_Expression): If a semicolon
6305 is followed by "when", assume that ";" was meant to be ",".
6307 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6309 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
6312 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6314 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
6315 loading of an entity.
6316 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
6317 previously repeated in the analysis.
6318 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
6319 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
6320 use new procedure SPARK_Implicit_Load.
6321 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
6322 SPARK_Implicit_Load.
6324 2017-04-25 Javier Miranda <miranda@adacore.com>
6326 * sem_util.adb (New_Copy_Tree): By default
6327 copying of defining identifiers is prohibited because
6328 this would introduce an entirely new entity into the
6329 tree. This patch introduces an exception to this general
6330 rule: the declaration of constants and variables located in
6331 Expression_With_Action nodes.
6332 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
6333 (In_Map): New subprogram.
6334 (Visit_Entity): New subprogram.
6335 (Visit_Node): Handle EWA_Level,
6336 EWA_Inner_Scope_Level, and take care of defining entities defined
6337 in Expression_With_Action nodes.
6339 2017-04-25 Thomas Quinot <quinot@adacore.com>
6341 * exp_ch6.adb: minor comment edit.
6342 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
6343 procedure specifications that come from source.
6344 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
6345 Null_Statement attribute.
6346 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
6347 procedure, generate statement SCO for the generated NULL statement.
6348 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
6349 parser, if available.
6351 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6353 * system-linux-s390.ads: Use Long_Integer'Size to define
6356 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
6358 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
6360 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6362 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
6363 * g-socket.adb (To_Host_Entry): Fix typo in comment.
6364 * gnat_ugn.texi: Fix typo.
6365 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
6366 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
6367 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
6368 * sem_util.adb (Mark_Coextensions): Likewise.
6369 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
6371 2017-03-28 Andreas Schwab <schwab@suse.de>
6374 * system-linux-aarch64-ilp32.ads: New file.
6375 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6376 from LIBGNAT_TARGET_PAIRS.
6377 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6378 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6379 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6380 or -mabi=ilp32, resp.
6382 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
6384 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
6386 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
6389 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
6391 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
6394 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
6396 * system-linux-arm.ads (Default_Bit_Order): Likewise.
6397 * system-linux-mips.ads (Default_Bit_Order): Likewise.
6398 * system-linux-armeb.ads: Delete.
6399 * system-linux-mipsel.ads: Likewise.
6400 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
6401 (ARM/Linux): Likewise.
6403 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6406 * gcc-interface/misc.c (gnat_handle_option): Pass true to
6407 handle_generated_option GENERATED_P.
6409 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6411 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
6412 around a justified modular type if it doesn't have the same scalar
6413 storage order as the enclosing record type.
6415 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6417 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
6418 of boolean rvalues to function calls.
6420 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6422 * gcc-interface/utils.c (fold_bit_position): New function.
6423 (rest_of_record_type_compilation): Call it instead of bit_position to
6424 compute the field position and remove the call to remove_conversions.
6425 (compute_related_constant): Factor out the multiplication in both
6426 operands, if any, and streamline the final test.
6428 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6430 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
6432 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6434 * gcc-interface/decl.c: Include demangle.h.
6435 (is_cplusplus_method): Return again true for a primitive operation
6436 only if it is dispatching. For a subprogram with an interface name,
6437 call the demangler to get the number of C++ parameters and compare it
6438 with the number of Ada parameters.
6440 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6442 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
6443 there is no end label, put the location of the At_End procedure on
6444 the call to the procedure.
6446 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6448 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
6449 value for array types with TYPE_INDEX_TYPE set on their domain type.
6450 * gcc-interface/utils.c (max_size): For operations and expressions, do
6451 not build a new node if the operands have not changed or are missing.
6453 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6455 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
6456 argument when recursing on TRUTH_NOT_EXPR.
6458 2017-02-12 John Marino <gnugcc@marino.st>
6460 * system-freebsd-x86.ads: Rename into...
6461 * system-freebsd.ads: ...this.
6462 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
6463 * gcc-interface/Makefile.in: Support aarch64-freebsd.
6464 (x86-64/FreeBSD): Adjust to above renaming.
6465 (i386/FreeBSD): Likewise.
6467 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
6469 * comperr.adb: Update FSF bug reporting URL.
6471 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
6472 Jakub Jelinek <jakub@redhat.com>
6475 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
6477 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
6480 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
6481 to build_translation_unit_decl.
6483 2017-01-23 Javier Miranda <miranda@adacore.com>
6485 * sem_util.adb (New_Copy_Tree): Code cleanup:
6486 removal of the internal map (ie. variable Actual_Map, its
6487 associated local variables, and all the code handling it).
6488 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
6489 force loading of the System package when processing a task type.
6490 (Analyze_Protected_Type_Declaration): in GNATprove mode force
6491 loading of the System package when processing a protected type.
6492 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
6493 force loading of the System package when processing compilation
6494 unit with a main-like subprogram.
6495 * frontend.adb (Frontend): remove forced loading of the System
6498 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6500 * sem_prag.adb (Default_Initial_Condition): If the desired type
6501 declaration is a derived type declaration with discriminants,
6502 it is rewritten as a private type declaration.
6503 * sem_ch13.adb (Replace_Type_References_Generic,
6504 Visible_Component): A discriminated private type with descriminnts
6505 has components that must be rewritten as selected components
6506 if they appear as identifiers in an aspect expression such as
6507 a Default_Initial_Condition.
6508 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
6511 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6513 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
6514 * gnat1drv.adb Generate an empty object file for an ignored
6515 Ghost compilation unit.
6516 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
6518 2017-01-23 Yannick Moy <moy@adacore.com>
6520 * sem_ch4.adb (Analyze_Indexed_Component_Form):
6521 Adapt to inlined prefix with string literal subtype.
6522 * inline.adb (Expand_Inlined_Call): Keep unchecked
6523 conversion inside inlined call when formal type is constrained.
6525 2017-01-23 Javier Miranda <miranda@adacore.com>
6527 * sem_util.adb (New_Copy_Tree): Code cleanup:
6528 removal of global variables. All the global variables, global
6529 functions and tables of this subprogram are now declared locally.
6531 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6533 * exp_strm.ads: Minor reformatting and typo fixes.
6535 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6537 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
6538 exp_aggr.adb: Minor reformatting.
6539 * g-diopit.adb: minor grammar/punctuation fix in comment.
6540 * g-byorma.ads: minor fix of unbalanced parens in comment.
6542 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6544 * par.adb: Update the documentation of component Labl.
6545 * par-ch6.adb (P_Return_Statement): Set the expected label of
6546 an extended return statement to Error.
6548 2017-01-23 Tristan Gingold <gingold@adacore.com>
6550 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
6552 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6554 * expander.adb: Handle N_Delta_Aggregate.
6556 2017-01-23 Javier Miranda <miranda@adacore.com>
6558 * exp_ch6.adb (Expand_Call): Improve the code that
6559 checks if some formal of the called subprogram is a class-wide
6560 interface, to handle subtypes of class-wide interfaces.
6562 2017-01-23 Javier Miranda <miranda@adacore.com>
6564 * checks.adb (Apply_Parameter_Aliasing_Checks):
6565 Remove side effects of the actuals before generating the overlap
6568 2017-01-23 Justin Squirek <squirek@adacore.com>
6570 * exp_strm.ads, exp_strm.ads
6571 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
6572 as to avoid getting the underlying type by default.
6573 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
6574 underlying type in the Iiput and output attribute cases when
6575 building their respective functions.
6577 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6579 * scng.adb: Minor reformatting of error message.
6581 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6583 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
6584 to freeze the return type of an expression funxtion that is a
6585 completion, if the type is a limited view and the non-limited
6588 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6590 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
6591 aggregate construct.
6592 (P_Record_Or_Array_Component_Association): An array aggregate
6593 can start with an Iterated_Component_Association.
6594 * scng.adb: Modify error message on improper use of @ in earlier
6595 versions of the language.
6596 * sinfo.ads: New node kind N_Delta_Aggregate.
6597 * sinfo.adb: An N_Delta_Aggregate has component associations and
6599 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
6600 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
6601 Create a new index for each one of the choices in the association,
6602 to prevent spurious homonyms in the scope.
6603 (Resolve_Delta_Aggregate): New.
6604 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
6605 * exp_util.adb (Insert_Actions): Take into account
6607 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
6608 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
6609 and local procedures Expand_Delta_Array_Aggregate and
6610 expand_Delta_Record_Aggregate.
6611 * sprint.adb: Handle N_Delta_Aggregate.
6613 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6615 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
6616 empty name when the exception declaration is subject to pragma
6618 (Null_String): New routine.
6620 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6622 * par-ch9.adb (P_Protected_Definition): Parse
6623 any optional and potentially illegal pragmas which appear in
6624 a protected operation declaration list.
6625 (P_Task_Items): Parse
6626 any optional and potentially illegal pragmas which appear in a
6629 2017-01-23 Pascal Obry <obry@adacore.com>
6631 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
6632 is needed when a foreign thread call a Win32 API using a thread handle
6633 like GetThreadTimes() for example.
6635 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6637 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6638 allow an 'Address clause to be specified on a prefix of a
6641 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6643 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6644 attribute 'Valid is a renaming of the original expression when
6645 the expression denotes a name. For all other kinds of expression,
6646 use a constant to capture the value.
6647 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6648 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6650 2017-01-23 Justin Squirek <squirek@adacore.com>
6652 * sem_eval.adb (Eval_Integer_Literal): Add special
6653 case to avoid optimizing out check if the literal appears in
6656 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6658 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6659 allow an 'Address clause to be specified on a prefix of a
6662 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6664 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6665 attribute 'Valid is a renaming of the original expression when
6666 the expression denotes a name. For all other kinds of expression,
6667 use a constant to capture the value.
6668 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6669 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6671 2017-01-23 Justin Squirek <squirek@adacore.com>
6673 * sem_eval.adb (Eval_Integer_Literal): Add special
6674 case to avoid optimizing out check if the literal appears in
6677 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6679 * sem_ch4.adb (Try_Primitive_Operations,
6680 Is_Valid_First_Argument_Of): argument is valid if it is a derived
6681 type with unknown discriminants that matches its underlying
6683 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
6684 expression if its type is derived from a limited type with
6685 unknown discriminants, because the expansion (which is a call)
6686 must be expanded in the enclosing context to add the proper build-
6687 in-place parameters to the call.
6688 * lib.ads, exp_ch9.adb: Minor fixes in comments.
6690 2017-01-23 Yannick Moy <moy@adacore.com>
6692 * frontend.adb (Frontend): Do not load runtime
6693 unit for GNATprove when parsing failed.
6694 * exp_ch9.adb: minor removal of extra whitespace
6695 * exp_ch6.adb: minor typo in comment
6696 * sem_util.adb: Code cleanup.
6697 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
6698 * a-ngcefu.adb: minor style fix in whitespace
6700 2017-01-23 Thomas Quinot <quinot@adacore.com>
6702 * scos.ads: Document usage of 'd' as default SCO kind for
6704 * par_sco.adb (Traverse_Declarations_Or_Statements.
6705 Traverse_Degenerate_Subprogram): New supporting routine for expression
6706 functions and null procedures.
6707 (Traverse_Declarations_Or_Statements.Traverse_One): Add
6708 N_Expression_Function to the subprogram case; add required
6709 support for null procedures and expression functions.
6711 2017-01-23 Bob Duff <duff@adacore.com>
6713 * namet.ads (Bounded_String): Decrease the size of type
6714 Bounded_String to avoid running out of stack space.
6715 * namet.ads (Append): Don't ignore buffer overflow; raise
6716 Program_Error instead.
6718 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6720 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
6721 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
6723 * exp_ch9.adb: minor style fix in comment.
6725 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6727 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
6728 for a limited record extension with unknown discriminants whose
6729 full view has no discriminants.
6731 2017-01-23 Yannick Moy <moy@adacore.com>
6733 * exp_spark.adb: Alphabetize with clauses.
6735 2017-01-23 Yannick Moy <moy@adacore.com>
6737 * sem_util.adb (Has_Enabled_Property): Treat
6738 protected objects and variables differently from other variables.
6740 2017-01-23 Thomas Quinot <quinot@adacore.com>
6742 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
6743 Split original Ada 95 part off into new subprogram
6744 below. Call that subprogram (instead of proceeding with
6745 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
6746 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
6747 * debug.adb Document new switch -gnatd.p
6748 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
6749 record for reverse bit order if an error has already been posted
6750 on the record type. This avoids generating extraneous "info:"
6751 messages for illegal code.
6753 2017-01-23 Justin Squirek <squirek@adacore.com>
6755 * sem_ch3.adb (Analyze_Declarations): Correct comments
6756 * freeze.adb (Find_Constant): Add detection of deferred constants
6757 so they are not incorrectly flagged as premature.
6759 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6761 * scans.ads: New token At_Sign. Remove '@' from list of illegal
6762 characters for future version of the language. '@' is legal name.
6763 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
6764 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
6765 denotes a Target_Name.
6766 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
6767 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
6768 (Has_Target_Names): New flag on N_Assignment_Statement, to
6769 indicate that RHS has occurrences of N_Target_Name.
6770 * sem.adb: Call Analyze_Target_Name.
6771 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
6772 (urrent_LHS): Global variable that denotes LHS of assignment,
6773 used in the analysis of Target_Name nodes.
6774 * sem_res.adb (Resolve_Target_Name): New procedure.
6775 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
6776 N is an assignment statement whose RHS contains occurences of @
6777 that designate the value of the LHS of the assignment. If the
6778 LHS is side-effect free the target names can be replaced with
6779 a copy of the LHS; otherwise the semantics of the assignment
6780 is described in terms of a procedure with an in-out parameter,
6781 and expanded as such.
6782 (Expand_N_Assignment_Statement): Call
6783 Expand_Assign_With_Target_Names when needed.
6784 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
6785 * sprint.adb: Handle N_Target_Name.
6787 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
6789 * checks.adb: Minor fix in comment.
6791 2017-01-23 Philippe Gil <gil@adacore.com>
6793 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
6794 count in Sort = Memory_Usage or Allocations_Count
6796 2017-01-23 Justin Squirek <squirek@adacore.com>
6798 * sem_ch3.adb: Code cleanup.
6800 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6802 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
6803 variables to the local variable section. Update the profile
6804 of various nested routine that previously had visibility
6805 of those globals. One the matching phase has completed,
6806 remove certain classes of clauses which are considered noise.
6807 (Check_Dependency_Clause): Properly detect a match between two
6808 'Result attributes. Update the various post-match cases to use
6809 Is_Already_Matched as this routine now automatically recognizes
6810 a previously matched 'Result attribute.
6811 (Is_Already_Matched): New routine.
6812 (Remove_Extra_Clauses): New routine.
6813 (Report_Extra_Clauses): Remove the detection of ... => null
6814 clauses as this is now done in Remove_Extra_Clauses.
6816 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6818 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
6819 report on spurious overlaps between values involving a subtype
6820 with a static predicate, because the expansion of such a subtype
6821 into individual ranges in inhibited in ASIS mode.
6823 2017-01-23 Justin Squirek <squirek@adacore.com>
6825 * sem_ch3.adb (Analyze_Declarations): Add detection
6826 of an edge case and delay freezing if it is present.
6828 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6830 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
6831 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
6833 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6835 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
6836 access-to-subprogram types inherit the convention of the
6837 associated subprogram. (Set_Profile_Convention): New routine.
6838 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
6839 of the two entities directly, use Conventions_Match to account
6840 for anonymous access-to-subprogram and subprogram types.
6841 (Conventions_Match): New routine.
6843 2017-01-23 Claire Dross <dross@adacore.com>
6845 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
6846 which return Universal_Integer, force the overflow check flag for
6847 Length and Range_Length for types as big as Long_Long_Integer.
6849 2017-01-23 Claire Dross <dross@adacore.com>
6851 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
6852 attributes which return Universal_Integer, introduce a conversion
6853 to the expected type with the appropriate check flags set.
6854 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
6855 base type if the range is null. It may still be invalid if it
6856 is higher than the lower bound. This is checked later in the
6857 context in which the range appears.
6859 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
6861 * scos.ads: Introduce a constant to represent ignored
6862 dependencies in SCO_Unit_Table_Entry.
6864 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6866 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
6867 spaces from error messages.
6869 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6871 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
6872 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
6873 an object declaration for an array type with a modular index type
6874 with the size of Long_Long_Integer. Special processing is needed
6875 in this case to compute reliably the size of the object, and
6876 eventually to raise Storage_Error, when wrap-around arithmetic
6877 might compute a meangingless size for the object.
6879 2017-01-23 Justin Squirek <squirek@adacore.com>
6881 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
6882 sem_type.adb: Code cleanups.
6884 2017-01-23 Bob Duff <duff@adacore.com>
6886 * sem_res.adb (Resolve_Call): In the part of the code where
6887 it is deciding whether to turn the call into an indexed
6888 component, avoid doing so if the call is to an instance of
6889 Unchecked_Conversion. Otherwise, the compiler turns it into an
6890 indexed component, and resolution of that turns it back into a
6891 function call, and so on, resulting in infinite recursion.
6892 * sem_util.adb (Needs_One_Actual): If the first formal has a
6893 default, then return False.
6895 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
6897 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
6898 optimizations when the type is modular and the offsets are equal.
6900 2017-01-20 Thomas Quinot <quinot@adacore.com>
6902 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
6905 2017-01-20 Nicolas Roche <roche@adacore.com>
6907 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
6909 2017-01-20 Bob Duff <duff@adacore.com>
6911 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
6912 (etc) optimizations when the type is modular.
6914 2017-01-20 Yannick Moy <moy@adacore.com>
6916 * sem_ch6.adb (Move_Pragmas): move some pragmas,
6917 but copy the SPARK_Mode pragma instead of moving it.
6918 (Build_Subprogram_Declaration): Ensure that the generated spec
6919 and original body share the same SPARK_Pragma aspect/pragma.
6920 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
6921 procedure to copy SPARK_Mode aspect.
6923 2017-01-20 Bob Duff <duff@adacore.com>
6925 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
6927 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
6928 Empty even in ASIS mode.
6930 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6932 * exp_ch9.adb: minor style fixes in comments.
6933 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
6934 relative statement introduces an implicit dependency on
6935 Ada.Real_Time.Clock_Time.
6936 * sem_util.adb: Minor reformatting.
6938 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6940 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
6941 must be treated as delayed aspect even if the expression is
6942 a literal, because the aspect affects the freezing and the
6943 elaboration of the object to which it applies.
6945 2017-01-20 Tristan Gingold <gingold@adacore.com>
6947 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
6949 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6951 * lib-xref.adb (Generate_Reference): Do not warn about the
6952 presence of a pragma Unreferenced if the entity appears as the
6953 actual in a procedure call that does not come from source.
6955 2017-01-20 Pascal Obry <obry@adacore.com>
6957 * expect.c, terminals.c: Fix some warnings about unused variables.
6958 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
6961 2017-01-20 Bob Duff <duff@adacore.com>
6963 * exp_attr.adb (Constrained): Apply an access check (check that
6964 the prefix is not null) when the prefix denotes an object of an
6965 access type; that is, when there is an implicit dereference.
6967 2017-01-20 Gary Dismukes <dismukes@adacore.com>
6969 * s-rident.ads (constant Profile_Info): Remove
6970 No_Calendar from GNAT_Extended_Ravenscar restrictions.
6972 2017-01-20 Tristan Gingold <gingold@adacore.com>
6974 * s-maccod.ads: Add pragma No_Elaboration_Code_All
6976 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6978 * ghost.adb (Mark_Ghost_Clause): New routine.
6979 (Prune_Node): Do not prune compilation unit nodes.
6980 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
6981 This does not touch the node itself, but does prune all its fields.
6982 * ghost.ads (Mark_Ghost_Clause): New routine.
6983 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
6984 package clause mentions Ghost and non-Ghost packages. Mark a
6985 use package clause as Ghost when it mentions a Ghost package.
6986 (Analyze_Use_Type): Emit an error when a use type clause mentions
6987 Ghost and non-Ghost types. Mark a use type clause as Ghost when
6988 it mentions a Ghost type.
6989 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
6990 Ghost when it withs a Ghost unit.
6992 2017-01-20 Javier Miranda <miranda@adacore.com>
6994 * sem_res.adb (Resolve_Call): If a function call
6995 returns a limited view of a type and at the point of the call the
6996 function is not declared in the extended main unit then replace
6997 it with the non-limited view, which must be available. If the
6998 called function is in the extended main unit then no action is
6999 needed since the back-end handles this case.
7001 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
7003 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
7004 (Contains_Subprograms_Refs): ...this. Adjust comment
7005 for constants. (Is_Subp_Or_Const_Ref): Rename into...
7006 (Is_Subprogram_Ref): ...this.
7007 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
7008 Has_Non_Subprograms_Referencer and adjust comment. Remove
7009 incorrect shortcut for package declarations and bodies.
7011 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7013 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
7014 base type differs from that of the completion and the private
7015 subtype is an itype (created for a constraint on an access
7016 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
7019 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7021 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7022 When inheriting the SPARK_Mode of a prior expression function,
7023 look at the properly resolved entity rather than the initial
7024 candidate which may denote a homonym.
7026 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7028 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
7029 Precondition or Postcondition, and the context is pragma
7030 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
7031 and suggest the standard names Assertion_Policy /Pre /Post
7034 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7036 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
7038 2017-01-20 Javier Miranda <miranda@adacore.com>
7040 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
7042 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
7043 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
7046 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7048 * sem_ch13.adb (Analyze_Aspect_Specification, case
7049 Dynamic_Predicate): If the entity E is a subtype that inherits
7050 a static predicate for its parent P,, the inherited and the
7051 new predicate combine in the generated predicate function,
7052 and E only has a dynamic predicate.
7054 2017-01-20 Tristan Gingold <gingold@adacore.com>
7056 * s-boustr.ads, s-boustr.adb: New package.
7057 * Makefile.rtl: Add s-boustr.
7059 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7061 * inline.adb (Process_Formals): Qualify the
7062 expression of a return statement when it yields a universal type.
7064 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7066 * freeze.adb (Freeze_All): Freeze the default
7067 expressions of all eligible formal parameters that appear in
7068 entries, entry families, and protected subprograms.
7070 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7072 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
7073 for illegal inherited Implicit_Dereference aspects with renamed
7076 2017-01-20 Javier Miranda <miranda@adacore.com>
7078 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
7079 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
7080 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
7081 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
7082 Set_Prev, Tree_Read): Adding assertion.
7083 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
7084 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
7085 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
7086 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
7087 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
7088 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
7089 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
7090 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
7091 Set_ListN_With_Parent): Adding assertion.
7093 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7095 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
7096 import that applies to several homograph subprograms. when one
7097 of them is declared by a subprogram body.
7099 2017-01-20 Justin Squirek <squirek@adacore.com>
7101 * exp_ch6.adb (Expand_Call): Remove optimization
7102 that nulls out calls to null procedures.
7104 2017-01-20 Yannick Moy <moy@adacore.com>
7106 * inline.adb (Expand_Inlined_Call): Keep more
7107 precise type of actual for inlining whenever possible. In
7108 particular, do not switch to the formal type in GNATprove mode in
7109 some case where the GNAT backend might require it for visibility.
7111 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7113 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
7114 aspect Implicit_Dereference can be inherited by a full view if
7115 the partial view has no discriminants, because there is no way
7116 to apply the aspect to the partial view.
7117 (Build_Derived_Record_Type): If derived type renames discriminants
7118 of the parent, the new discriminant inherits the aspect from
7120 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
7121 call through an access discriminant designating a subprogram.
7122 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
7123 properly a parameterless call through an access discriminant on
7124 the left-hand side of an assignment.
7125 * sem_res.adb (resolve): If an interpreation involves a
7126 discriminant with an implicit dereference and the expression is an
7127 entity, resolution takes place later in the appropriate routine.
7128 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
7129 access discriminants that designate a subprogram type.
7131 2017-01-20 Pascal Obry <obry@adacore.com>
7133 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
7135 2017-01-20 Yannick Moy <moy@adacore.com>
7137 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
7138 on implicitly with'ed units in GNATprove mode.
7139 * sinfo.ads (Implicit_With): Document use of flag for implicitly
7140 with'ed units in GNATprove mode.
7142 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7144 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
7145 unit Do not report an error on a non-static entity that appears
7146 in the context of a spec expression, such as an aspect expression.
7148 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7150 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
7151 (Is_Underlying_Full_View): New routine.
7152 (Set_Is_Underlying_Full_View): New routine.
7153 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
7154 * einfo.ads Add new attribute Is_Underlying_Full_View.
7155 (Is_Underlying_Full_View): New routine along with pragma Inline.
7156 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
7157 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
7158 class-wide types and underlying full views. The first subtype
7159 is used as the working type for all Itypes, not just array base types.
7160 (Build_DIC_Procedure_Declaration): Do not consider
7161 class-wide types and underlying full views. The first subtype
7162 is used as the working type for all Itypes, not just array
7164 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
7165 view or an underlying full view without clobbering the attributes
7166 of a previous freeze node.
7167 (Inherit_Freeze_Node): New routine.
7168 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
7170 (Build_Underlying_Full_View): Mark an underlying full view as such.
7171 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
7174 2017-01-20 Yannick Moy <moy@adacore.com>
7176 * sinfo.ads: Document lack of Do_Division_Check flag
7177 on float exponentiation.
7179 2017-01-19 Javier Miranda <miranda@adacore.com>
7181 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
7182 identifier attribute of a block-statement node. Required to avoid
7183 assertion failure when building the new containers library.
7185 2017-01-19 Bob Duff <duff@adacore.com>
7187 * exp_ch3.adb: Update comment.
7189 2017-01-19 Vincent Celier <celier@adacore.com>
7191 * gprep.adb (Gnatprep): Parse the definition file without
7192 "replace in comments" even when switch -C is used.
7194 2017-01-19 Justin Squirek <squirek@adacore.com>
7196 * exp_ch9.adb (Is_Pure_Barrier): Create function
7197 Is_Count_Attribute to identify an expansion of the 'Count
7200 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7202 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
7203 statements within an element iterator loop are only analyzed
7204 agter the loop is rewritten. Within a generic the analysis must
7205 be performed in any case to complete name capture.
7207 2017-01-19 Bob Duff <duff@adacore.com>
7209 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
7210 before checking for unrecognized pragmas.
7211 Initialize Pname on its declarations; that's always good style.
7213 2017-01-19 Claire Dross <dross@adacore.com>
7215 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
7216 body into the tree for GNATprove by setting its Parent field. The
7217 components invariants of composite types are not checked by
7218 the composite type's invariant procedure in GNATprove mode.
7219 (Build_Invariant_Procedure_Declaration): Semi-insert the
7220 declaration into the tree for GNATprove by setting its Parent
7222 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
7223 the component invariants to the array type invariant procedure
7224 so that the procedure can be used to check the array type
7226 (Freeze_Record_Type): In GNATprove mode, do
7227 not add the component invariants to the record type invariant
7228 procedure so that the procedure can be used to check the record
7229 type invariants if any.
7231 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7233 * lib-xref-spark_specific.adb: Minor reformatting.
7234 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
7236 2017-01-19 Javier Miranda <miranda@adacore.com>
7238 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
7239 Build_Back_End_Aggregate.
7240 (Generate_Aggregate_For_Derived_Type): Code cleanup.
7241 (Prepend_Stored_Values): Code cleanup.
7243 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7245 * sem_ch6.adb (Analyze_Expression_Function): Check for an
7246 incomplete return type after attempting to freeze it, so that
7247 other freeze actiona are generated in the proper order.
7249 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7251 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
7252 type, ie. a type whose component is a character type, and the
7253 aggregate is positional, do not convert into a string literal
7254 if the index type is not an integer type, because the original
7255 type may be required in an enclosing operation.
7257 2017-01-19 Bob Duff <duff@adacore.com>
7259 * binde.adb, debug.adb: Enable new elaboration order algorithm
7260 by default. -dp switch reverts to the old algorithm.
7262 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7264 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
7265 (Analyze_Declarations): Create the DIC and Invariant
7266 procedure bodies s after all freezing has taken place.
7267 (Build_Assertion_Bodies): New routine.
7268 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
7270 (Analyze_Package_Specification): Remove the
7271 generation of the DIC and Invariant procedure bodies. This is
7272 now done by Analyze_Declarations.
7273 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
7274 procedures are never treated as primitives.
7276 2017-01-19 Yannick Moy <moy@adacore.com>
7278 * frontend.adb: Analyze inlined bodies and check elaboration
7279 rules in GNATprove mode too.
7280 * sem_elab.adb (Delay_Element): Add Boolean component to save
7281 indication that call is in SPARK code. (Check_Elab_Calls):
7282 Check elaboration rules in GNATprove mode, and correctly set
7283 the current value of SPARK_Mode.
7284 * lib-xref-spark_specific.adb
7285 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
7287 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7289 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
7290 checks on the expression for the high bound of concatenation
7291 when checks are disabled, to suppress warnings about potential
7292 constraint errors in restricted runtimes.
7294 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7296 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
7297 representation-to-position function as inlined.
7298 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
7299 the purity of an internally generated entity if it has been
7300 explicitly marked as pure for optimization purposes.
7301 * exp_aggr.adb: Minor reformatting.
7303 2017-01-19 Javier Miranda <miranda@adacore.com>
7305 * exp_ch6.adb (Expand_Call): Remove side effects on
7306 actuals that are allocators with qualified expression since the
7307 initialization of the object is performed by means of individual
7308 statements (and hence it must be done before the call).
7310 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7312 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
7313 (Build_Derived_Enumeration_Type): If the derived type inherits a
7314 dynamic predicate from its parent, the bounds of the type must
7315 freeze because an explicit constraint is constructed for the
7316 type and the corresponding range is elaborated now.
7318 2017-01-19 Arnaud Charlet <charlet@adacore.com>
7320 * sem_attr.ads: minor fix of inconsistent casing in comment
7321 * lib-writ.ads: minor align comments in columns
7322 * sem_ch3.adb: Minor reformatting.
7323 * spark_xrefs.ads: minor fix typo in SPARK-related comment
7324 * table.ads: minor style fix in comment
7325 * lib-xref-spark_specific.adb
7326 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
7327 * sem_ch12.adb: minor whitespace fix
7328 * freeze.adb: Add comment.
7329 * sem_util.adb (Unique_Name): for instances of
7330 generic subprograms ignore the name of the wrapper package.
7332 2017-01-19 Javier Miranda <miranda@adacore.com>
7334 * exp_aggr.adb (Resolve_Record_Aggregate):
7335 Factorize code needed for aggregates of limited and unlimited
7336 types in a new routine.
7337 (Pass_Aggregate_To_Back_End): New subprogram.
7339 2017-01-19 Yannick Moy <moy@adacore.com>
7341 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
7343 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7345 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
7346 public, for use elsewhere.
7347 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
7348 an Inlined_body, recognize a call that uses object notation
7349 and has not been rewritten as a regular call because regular
7350 expansion has not taken place.
7352 2017-01-19 Bob Duff <duff@adacore.com>
7354 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
7355 in case of generic formal discrete types, because it causes crashes in
7356 the compiler when built with assertions on.
7358 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7360 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
7361 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
7363 2017-01-19 Bob Duff <duff@adacore.com>
7365 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
7366 Increment Warnings_Detected. It was decrementing, which is
7367 wrong since we just issued a warning message.
7368 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
7369 these variables to be of subtype Nat instead of Int, because
7370 they should never be negative.
7372 2017-01-19 Javier Miranda <miranda@adacore.com>
7374 * contracts.adb (Build_Postconditions_Procedure): Replace
7375 Generate_C_Code by Modify_Tree_For_C.
7376 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
7377 Replace Generate_C_Code by Modify_Tree_For_C.
7378 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
7380 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
7381 Generate_C_Code by Modify_Tree_For_C.
7382 * exp_ch4.adb (Expand_Allocator_Expression): Replace
7383 Generate_C_Code by Modify_Tree_For_C.
7384 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
7385 by Modify_Tree_For_C.
7386 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
7387 Generate_C_Code by Modify_Tree_For_C.
7388 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
7389 by Modify_Tree_For_C.
7390 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
7392 2017-01-19 Javier Miranda <miranda@adacore.com>
7394 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
7396 (Is_Inlinable_Expression_Function): New subprogram.
7397 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
7399 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
7401 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7403 * sem_ch4.adb (Diagnose_Call): Improve error message when a
7404 selected component has a prefix that might be interpreted
7405 as a parameterless function call, but none of the candidate
7406 interpretations is parameterless, and there is a hidden homonym
7407 of the prefix that is a package.
7408 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
7409 interpreted as a parameterless function call and its analysis
7410 fails, do not call Analyze_Selected_Component.
7412 2017-01-19 Steve Baird <baird@adacore.com>
7414 * sem_util.ads: Add new Use_Full_View Boolean parameter to
7416 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
7417 calls to a newly-defined Scalar_Range_Of_Right_View function.
7419 2017-01-19 Arnaud Charlet <charlet@adacore.com>
7421 * gnat1drv.adb: minor fix of unbalanced parens in comment
7422 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
7423 to visible part of the package to allow re-use in GNATprove.
7424 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
7425 from repeated code of Traverse_Compilation_Unit.
7426 (Traverse_Declaration_Or_Statement): fixed detection of
7427 generic subprograms and packages; also, iteration over case
7428 statement alternatives rewritten to avoid testing if the first
7429 alternative is present (since it must be present due to Ada
7430 syntax restrictions).
7432 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7434 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
7435 returning by reference not just for subprogram body stubs,
7436 but for all subprogram cases.
7437 * sem_util.adb: Code reformatting.
7438 (Requires_Transient_Scope): Update the call to Results_Differ.
7439 (Results_Differ): Update the parameter profile and the associated
7442 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7444 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
7445 identifier nodes that do not come from source, to handle properly
7446 dimensionality check within an inlined body which inclddes both
7447 original operands and rewritten operands. This removes spurious
7448 dimensionality errors in the presence of front-end inlining,
7449 as well as in SPARK mode.
7451 2017-01-16 Jakub Jelinek <jakub@redhat.com>
7454 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
7456 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7458 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
7460 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7462 * doc/gnat_ugn/getting_started_with_gnat.rst,
7463 doc/gnat_ugn/inline_assembler.rst,
7464 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7465 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
7466 doc/gnat_ugn/about_this_guide.rst,
7467 doc/gnat_ugn/platform_specific_information.rst,
7468 doc/gnat_ugn/example_of_binder_output.rst,
7469 doc/gnat_ugn/gnat_and_program_execution.rst,
7470 doc/gnat_ugn/gnat_utility_programs.rst,
7471 doc/gnat_ugn/the_gnat_compilation_model.rst,
7472 doc/gnat_rm/implementation_defined_attributes.rst,
7473 doc/gnat_rm/compatibility_and_porting_guide.rst,
7474 doc/gnat_rm/standard_library_routines.rst,
7475 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
7476 doc/gnat_rm/implementation_defined_pragmas.rst,
7477 doc/gnat_rm/the_gnat_library.rst,
7478 doc/gnat_rm/obsolescent_features.rst,
7479 doc/gnat_rm/about_this_guide.rst,
7480 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
7481 doc/gnat_rm/implementation_of_ada_2012_features.rst,
7482 doc/gnat_rm/interfacing_to_other_languages.rst,
7483 doc/gnat_rm/implementation_defined_aspects.rst,
7484 doc/gnat_rm.rst: Update documentation.
7485 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
7487 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7489 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
7490 * scil_ll.adb: Minor style fix in comment.
7491 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
7492 even if entity is already set, because the node may be renalyzed
7493 after inlining transformations.
7495 2017-01-13 Javier Miranda <miranda@adacore.com>
7497 * sem_res.adb (Resolve_Call): Do not establish a transient scope
7498 for a call to inlinable expression function (since the call will
7499 be replaced by its returned object).
7500 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
7501 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
7502 (Expand_Call): For inlinable expression function call replace the
7503 call by its returned object.
7504 (Is_Inlinable_Expression_Function): New subprogram.
7506 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7508 * checks.adb: Minor typo fix and reformatting.
7510 2017-01-13 Javier Miranda <miranda@adacore.com>
7512 * contracts.adb (Contract_Only_Subprograms): Remove formal.
7513 (Copy_Original_Specification): Removed.
7514 (Skip_Contract_Only_Subprogram): Move here checks previously
7515 located in the caller of this routine (to leave the code more clean).
7516 (Build_Contract_Only_Subprogram): Code cleanup.
7517 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
7518 (Get_Contract_Only_Missing_Body_Name): Removed.
7520 2017-01-13 Javier Miranda <miranda@adacore.com>
7522 * sem_ch6.adb (Cloned_Expression): New subprogram.
7523 (Freeze_Expr_Types): Complete previous patch since the expression
7524 of an expression-function may have iterators and loops with
7525 defining identifiers which, as part of the preanalysis of the
7526 expression, may be left decorated with itypes that will not be
7527 available in the tree passed to the backend.
7529 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7531 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
7532 conversion to Integer of an expression that is an attribute
7533 reference 'Pos on an enumeration type.
7535 2017-01-13 Bob Duff <duff@adacore.com>
7537 * atree.ads: Minor comment fix.
7539 2017-01-13 Justin Squirek <squirek@adacore.com>
7541 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
7542 calls in accessibility check on return statement.
7544 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7546 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7547 Ensure that the input body is a subprogram body before trying to
7548 determine whether it denoted an expression function. Note that
7549 subprogram body stubs cannot denote expression functions.
7551 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7553 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
7556 2017-01-13 Javier Miranda <miranda@adacore.com>
7558 * einfo.ads (Component_Bit_Offset): Fix documentation.
7559 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
7560 on record holes for components with unknown compile-time offsets.
7562 2017-01-13 Bob Duff <duff@adacore.com>
7564 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
7565 * g-locfil.ads: Minor comment fix.
7567 2017-01-13 Bob Duff <duff@adacore.com>
7569 * binde.adb (Elab_New): New elaboration order algorithm
7570 that is expected to cause fewer ABE issues. This is a work in
7571 progress. The new algorithm is currently disabled, and can be
7572 enable by the -dp switch, or by modifying the Do_Old and Do_New
7573 etc. flags and rebuilding. Experimental code is included to
7574 compare the results of the old and new algorithms.
7575 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
7576 can have multiple of these tables, so the old and new algorithms
7578 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
7579 parameter of type array. This avoids the global variable, and
7580 allows bounds checking (which is normally defeated by the tables
7581 packages). It also ensures that the Elab_Order is read-only
7583 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
7584 subprograms that need it, as above.
7585 * debug.adb: Document new -dp switch. Modify doc of old -do
7587 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
7588 and Bindgen. Move writing of closure (-R and -Ra switches)
7589 to Binde; that's more convenient.
7591 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7593 * sem_ch6.adb (Analyze_Expression_Function): If the expression
7594 function is a completion, all entities referenced in the
7595 expression are frozen. As a consequence, a reference to an
7596 uncompleted private type from an enclosing scope is illegal.
7598 2017-01-13 Javier Miranda <miranda@adacore.com>
7600 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
7601 (Analyze_Subprogram_Body_Helper): At the occurrence of an
7602 expression function declaration that is a completion, its
7603 expression causes freezing (AI12-0103).
7605 2017-01-13 Vadim Godunko <godunko@adacore.com>
7607 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
7608 Reference functions of Ada.Containers.Indefinite_Holders.
7610 2017-01-13 Bob Duff <duff@adacore.com>
7612 * s-os_lib.ads: Minor comment fixes.
7614 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7616 * exp_ch3.adb (Default_Initialize_Object): Do not default
7617 initialize an object when it is of a task type and restriction
7618 No_Tasking is in effect because the initialization is obsolete.
7619 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
7620 restriction No_Tasking is in effect.
7621 (Build_Master_Renaming): Do not rename a master when restriction
7622 No_Tasking is in effect.
7624 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7626 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
7627 the legality of An others clause applies as well to a choice in
7628 an Iterated_component_ association.
7629 (Resolve_Iterated_Component_Association): An others choice
7631 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
7632 Iterated_Component_Association is not static.
7634 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7636 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
7637 control is passed to the expresion handler before the new mode
7639 * sem_ch12.adb (Analyze_Package_Instantiation,
7640 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
7641 in case control is passed to the expresion handler before the
7644 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7646 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
7647 exp_aggr.adb: Minor reformatting.
7649 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7651 * inline.adb: Minor reformatting and typo fix.
7653 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7655 * sem_util.ads, sem_util.adb (Choice_List): Move function here
7656 from sem_aggr.adb, for use elsewhere.
7657 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
7658 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
7659 Iterated_Component_Present.
7660 * exp_aggr.adb: Use Choice_List throughout, to handle
7661 Iterated_Component_Associations.
7662 (Gen_Loop): Generate proper loop for an
7663 Iterated_Component_Association: loop variable has the identifier
7664 of the original association. Generate a loop even for a single
7665 component choice, in order to make loop parameter visible in
7667 (Flatten): An Iterated_Component_Association is not static.
7669 2017-01-13 Yannick Moy <moy@adacore.com>
7671 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
7672 float exponentiation for statically known small negative values
7673 is the reciprocal of the exponentiation for the opposite value
7675 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
7676 Ensure that the value of float exponentiation for negative values
7677 is the reciprocal of the exponentiation for the opposite value
7679 * inline.adb (Expand_Inlined_Call): Fix the count
7680 for the number of generated gotos.
7682 2017-01-13 Yannick Moy <moy@adacore.com>
7684 * inline.adb: Code cleanup.
7685 * sem_util.adb (Is_OK_Volatile_Context): Add
7686 expression in delay statement as OK for volatile context.
7688 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7690 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
7691 mode a choice that is a subtype with a static predicate is
7692 replaced by the values it covers. This transformation must not
7693 be performed in ASIS mode, to preserve the source for analysis.
7695 2017-01-13 Justin Squirek <squirek@adacore.com>
7697 * nlists.ads: Correct minor typo.
7699 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7701 * sem_ch13.adb: Minor reformatting and typo fix.
7703 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7705 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
7706 Iterated_Component_Association is a named association in an
7708 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
7709 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
7710 and resolve the discrete choices and the expression of the
7712 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
7713 Loop_Actions and Box_Present are attributes of
7714 N_Iterated_Component_Association nodes. Box_Present is always
7716 * sprint.adb (Sprint_Node): An Iterated_Component_Association
7717 has a Discrete_Choices list, as specified in the RM. A
7718 Component_Association for aggregate uses instead a Choices list.
7719 We have to live with this small inconsistency because the new
7720 construct also has a defining identifier, and there is no way
7721 to merge the two node structures.
7723 2017-01-13 Yannick Moy <moy@adacore.com>
7725 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
7726 list of pragmas to remove. Remove pragmas from the list of
7727 statements in the body to inline.
7728 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
7730 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7732 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
7733 Analyze_Declarations, to analyze and resolve the expressions of
7734 aspect specifications in the current declarative list, so that
7735 the expressions have proper entity and type info. This is needed
7736 for ASIS when there is no subsequent expansion to generate this
7737 semantic information.
7738 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
7739 original expression, to suppress cascaded errors when expression
7740 has been constant-folded.
7741 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
7742 ASIS mode, because there is no subsequent expansion to decorate
7745 2017-01-13 Yannick Moy <moy@adacore.com>
7747 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
7748 New function to detect when a call may be inlined or not in
7750 (Expand_Inlined_Call): Ensure that a temporary
7751 is always created in the cases where a type conversion may be
7752 needed on an input parameter in GNATprove mode, so that GNATprove
7753 sees the check to perform.
7754 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
7755 when not applicable due to actual requiring type conversion
7756 with possible check but no temporary value can be copied for
7757 GNATprove to see the check.
7759 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7761 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
7762 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
7763 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
7764 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
7765 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
7766 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
7767 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
7768 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
7769 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
7770 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
7771 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
7772 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
7773 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
7774 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
7775 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
7776 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
7777 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
7778 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
7779 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
7780 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
7781 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
7782 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
7783 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
7784 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
7785 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
7786 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
7787 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
7788 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
7789 statements to reflect the new style for case alternatives. Various
7790 code clean up and reformatting.
7792 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7794 * exp_util.adb: Minor reformatting.
7796 2017-01-13 Yannick Moy <moy@adacore.com>
7798 * exp_spark.adb: Code cleanup.
7799 * sem_ch9.adb (Analyze_Delay_Until): Resolve
7800 expression so that calls are identified as such inside delay
7803 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7805 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
7806 * par-ch3.adb (P_Discrete_Choice_List): An
7807 Iterated_Component_Association is an array aggregate component.
7808 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
7809 (Is_Quantified_Expression): New function that performs a lookahead
7810 to distinguish quantified expressions from iterated component
7812 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
7814 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
7815 * sem.adb (Analyze): Handle Iterated_Component_Association.
7816 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
7817 component associations.
7818 * sinfo.ads, sinfo.adb: Entries for for
7819 N_Iterated_Component_Association and its fields.
7820 * sprint.adb (Sprint_Node_Actual): Handle
7821 N_Iterated_Component_Association.
7823 2017-01-13 Justin Squirek <squirek@adacore.com>
7825 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
7826 of the style check until after preanalysis of acutals.
7828 2017-01-13 Yannick Moy <moy@adacore.com>
7830 * sem_ch13.adb: Minor reformatting.
7831 * par-ch11.adb: minor style fix in whitespace
7832 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
7833 reduced to Add_Artificial_ALI_File; style fix in declaration of
7834 Text; grammar fix in comment.
7835 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
7836 * freeze.adb: Cleanup to pass pragma instead of
7838 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
7839 replace System'To_Address by equivalent call.
7841 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7843 * bindusg.adb: Improve usage output for -f switch.
7845 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7847 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
7850 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7852 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
7853 treat comparisons on strings as legal in a Static_Predicate.
7854 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
7855 a function call that is the expansion of a string comparison.The
7856 function call is built when compiling the corresponding predicate
7857 function, but the expression has been found legal as a static
7858 predicate during earlier analysis.
7859 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
7860 properly a function call that is the expansion of a string
7861 comparison operation, in order to recover the Static_Predicate
7862 expression and apply it to a static argument when needed.
7864 2017-01-13 Tristan Gingold <gingold@adacore.com>
7866 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
7867 (Open_Read): Re-implement using Open_Read_No_Exception.
7868 (Open_Write): Raise exception in case of error.
7869 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
7870 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
7872 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
7874 2017-01-13 Yannick Moy <moy@adacore.com>
7876 * checks.adb: Code cleanup.
7878 2017-01-13 Yannick Moy <moy@adacore.com>
7880 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
7881 expression instead of unanalyzed aspect expression for checking
7882 the validity of inheriting an operation. Also copy the expression
7883 being passing it to Build_Class_Wide_Expression, as this call
7884 modifies its argument.
7885 * sem_util.ads Fix comment to reference correct function name
7888 2017-01-13 Javier Miranda <miranda@adacore.com>
7890 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
7891 when we propagate information about the indexes back to the original
7892 indexing mode and the prefix of the index is a function call, do not
7893 remove any parameter from such call.
7895 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7897 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
7898 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
7899 a build-in-place function whose result type is tagged.
7901 2017-01-13 Yannick Moy <moy@adacore.com>
7903 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
7904 Do not generate a wrapper when the only candidate is a class-wide
7906 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
7907 inside a generic context.
7909 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7911 * exp_util.adb (Add_Inherited_Tagged_DIC):
7912 Pass the object parameters of both the parent and the derived
7913 type DIC procedure to the reference replacement circuitry.
7914 (Find_DIC_Type): Modify the circuitry to present the partial
7915 view of a private type in case the private type defines its own
7917 (Replace_Object_And_Primitive_References): Add two
7918 optional formal parameters. Update the comment on usage. Update
7919 the replacement of references to object parameters.
7921 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7923 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
7925 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7927 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
7928 an out parameter that is a type conversion, independently of th
7929 range check that may apply to the expression of the conversion,
7930 for use in GNATProve.
7932 2017-01-13 Yannick Moy <moy@adacore.com>
7934 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
7935 GNATprove_Mode here to Frontend.
7936 * frontend.adb (Frontend): Move the implicit with for System
7937 in GNATprove_Mode here as it ismore correct this way; the old
7938 place only worked by chance, since there were no overloaded names.
7939 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
7940 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
7941 four attributes identified in SRM 9(18), add an implicit with
7942 to Ada.Task_Identification.
7943 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
7944 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
7946 * checks.adb (Apply_Discriminant_Check,
7947 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
7948 In GNATprove mode, we do not apply the checks, but we still
7949 analyze the expression to possibly issue errors on SPARK
7950 code when a run-time error can be detected at compile time.
7951 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
7954 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7956 * expander.adb (Expand): Add a warning about using return
7957 statements in Ghost management code.
7958 * exp_ch3.adb (Freeze_Type): Add a warning about using return
7959 statements in Ghost management code.
7960 * exp_ch7.adb (Build_Invariant_Procedure_Body,
7961 Build_Invariant_Procedure_Declaration): Add a warning about
7962 using return statements in Ghost management code.
7963 * exp_disp.adb (Make_DT): Add a warning about using return
7964 statements in Ghost management code.
7965 * exp_util.adb (Build_DIC_Procedure_Body,
7966 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
7967 warning about using return statements in Ghost management code.
7968 * freeze.adb (Freeze_Entity): Add a warning about using return
7969 statements in Ghost management code.
7970 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
7971 statements in Ghost management code.
7972 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
7973 a warning about using return statements in Ghost management code.
7974 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
7975 return statements in Ghost management code.
7976 * sem_ch6.adb (Analyze_Procedure_Call,
7977 Analyze_Subprogram_Body_Helper): Add a warning about using return
7978 statements in Ghost management code.
7979 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
7980 using return statements in Ghost management code.
7981 * sem_ch12.adb (Analyze_Package_Instantiation,
7982 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
7983 Instantiate_Subprogram_Body): Add a warning about using return
7984 statements in Ghost management code.
7985 * sem_ch13.adb (Build_Predicate_Functions,
7986 Build_Predicate_Function_Declarations): Add a warning about
7987 using return statements in Ghost management code.
7988 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
7989 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
7990 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
7991 using return statements in Ghost management code.
7993 2017-01-13 Tristan Gingold <gingold@adacore.com>
7995 * s-mmosin-mingw.adb: Fix pragma import.
7997 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7999 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
8002 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8004 * atree.adb (Allocate_Initialize_Node): A newly created node is
8005 no longer marked as Ghost at this level.
8006 (Mark_New_Ghost_Node): New routine.
8007 (New_Copy): Mark the copy as Ghost.
8008 (New_Entity): Mark the entity as Ghost.
8009 (New_Node): Mark the node as Ghost.
8010 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
8011 apply to unanalyzed entities.
8012 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
8014 (Set_Is_Checked_Ghost_Entity): This attribute now
8015 applies to all entities as well as unanalyzed entities.
8016 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
8017 all entities as well as unanalyzed entities.
8018 * expander.adb Add with and use clauses for Ghost.
8019 (Expand): Install and revert the Ghost region associated with the node
8021 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
8022 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
8023 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
8024 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
8025 (Freeze_Type): Install and revert the Ghost region associated
8026 with the type being frozen.
8027 * exp_ch5.adb Remove with and use clauses for Ghost.
8028 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
8029 * exp_ch6.adb Remove with and use clauses for Ghost.
8030 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
8031 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
8032 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
8033 Ghost region of the working type.
8034 (Build_Invariant_Procedure_Declaration): Install and revert
8035 the Ghost region of the working type.
8036 (Expand_N_Package_Body): Remove all Ghost-related code.
8037 * exp_ch8.adb Remove with and use clauses for Ghost.
8038 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
8040 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
8041 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
8042 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
8044 * exp_ch13.adb Remove with and use clauses for Ghost.
8045 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
8046 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
8047 the tagged type. Move the generation of various entities within
8048 the Ghost region of the type.
8049 * exp_prag.adb Remove with and use clauses for Ghost.
8050 (Expand_Pragma_Check): Remove all Ghost-related code.
8051 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
8052 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
8053 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
8054 * exp_util.adb (Build_DIC_Procedure_Body): Install
8055 and revert the Ghost region of the working types.
8056 (Build_DIC_Procedure_Declaration): Install and revert the
8057 Ghost region of the working type.
8058 (Make_Invariant_Call): Install and revert the Ghost region of the
8060 (Make_Predicate_Call): Reimplemented. Install and revert the
8061 Ghost region of the associated type.
8062 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
8063 of the entity being frozen.
8064 (New_Freeze_Node): Removed.
8065 * ghost.adb Remove with and use clauses for Opt.
8066 (Check_Ghost_Completion): Update the parameter profile
8067 and all references to formal parameters.
8068 (Ghost_Entity): Update the comment on usage.
8069 (Install_Ghost_Mode): New routines.
8070 (Is_Ghost_Assignment): New routine.
8071 (Is_Ghost_Declaration): New routine.
8072 (Is_Ghost_Pragma): New routine.
8073 (Is_Ghost_Procedure_Call): New routine.
8074 (Is_Ghost_Renaming): Removed.
8075 (Is_OK_Declaration): Reimplemented.
8076 (Is_OK_Pragma): Reimplemented.
8077 (Is_OK_Statement): Reimplemented.
8078 (Is_Subject_To_Ghost): Update the comment on usage.
8079 (Mark_And_Set_Ghost_Assignment): New routine.
8080 (Mark_And_Set_Ghost_Body): New routine.
8081 (Mark_And_Set_Ghost_Completion): New routine.
8082 (Mark_And_Set_Ghost_Declaration): New routine.
8083 (Mark_And_Set_Ghost_Instantiation): New routine.
8084 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8085 (Mark_Full_View_As_Ghost): Removed.
8086 (Mark_Ghost_Declaration_Or_Body): New routine.
8087 (Mark_Ghost_Pragma): New routine.
8088 (Mark_Ghost_Renaming): New routine.
8089 (Mark_Pragma_As_Ghost): Removed.
8090 (Mark_Renaming_As_Ghost): Removed.
8091 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
8092 (Prune_Node): Freeze nodes no longer need special pruning, they
8093 are processed by the general ignored Ghost code mechanism.
8094 (Restore_Ghost_Mode): New routine.
8095 (Set_Ghost_Mode): Reimplemented.
8096 (Set_Ghost_Mode_From_Entity): Removed.
8097 * ghost.ads Add with and use clauses for Ghost.
8098 (Check_Ghost_Completion): Update the parameter profile
8099 along with the comment on usage.
8100 (Install_Ghost_Mode): New routine.
8101 (Is_Ghost_Assignment): New routine.
8102 (Is_Ghost_Declaration): New routine.
8103 (Is_Ghost_Pragma): New routine.
8104 (Is_Ghost_Procedure_Call): New routine.
8105 (Mark_And_Set_Ghost_Assignment): New routine.
8106 (Mark_And_Set_Ghost_Body): New routine.
8107 (Mark_And_Set_Ghost_Completion): New routine.
8108 (Mark_And_Set_Ghost_Declaration): New routine.
8109 (Mark_And_Set_Ghost_Instantiation): New routine.
8110 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8111 (Mark_Full_View_As_Ghost): Removed.
8112 (Mark_Ghost_Pragma): New routine.
8113 (Mark_Ghost_Renaming): New routine.
8114 (Mark_Pragma_As_Ghost): Removed.
8115 (Mark_Renaming_As_Ghost): Removed.
8116 (Restore_Ghost_Mode): New routine.
8117 (Set_Ghost_Mode): Redefined.
8118 (Set_Ghost_Mode_From_Entity): Removed.
8119 * sem.adb (Analyze): Install and revert the Ghost region of the
8120 node being analyzed.
8121 (Do_Analyze): Change the way a clean Ghost
8122 region is installed and reverted.
8123 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
8124 all Ghost-related code.
8125 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
8126 (Analyze_Number_Declaration): Remove all Ghost-related code.
8127 (Analyze_Object_Declaration): Install and revert the Ghost region of
8128 a deferred object declaration's completion.
8129 (Array_Type_Declaration): Remove all Ghost-related code.
8130 (Build_Derived_Type): Update the comment on
8131 the propagation of Ghost attributes from a parent to a derived type.
8132 (Derive_Subprogram): Remove all Ghost-related code.
8133 (Make_Class_Wide_Type): Remove all Ghost-related code.
8134 (Make_Implicit_Base): Remove all Ghost-related code.
8135 (Process_Full_View): Install and revert the Ghost region of
8136 the partial view. There is no longer need to check the Ghost
8138 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
8139 region of the left hand side.
8140 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
8141 all Ghost-related code.
8142 (Analyze_Expression_Function): Remove all Ghost-related code.
8143 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
8144 (Analyze_Procedure_Call): Install and revert the Ghost region of
8145 the procedure being called.
8146 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
8147 region of the spec or body.
8148 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
8149 (Build_Subprogram_Declaration): Remove all Ghost-related code.
8150 (Find_Corresponding_Spec): Remove all Ghost-related code.
8151 (Process_Formals): Remove all Ghost-related code.
8152 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
8153 the Ghost region of the spec.
8154 (Analyze_Package_Declaration): Remove all Ghost-related code.
8155 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
8156 Ghost when it aliases a Ghost entity.
8157 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
8159 (Analyze_Object_Renaming): Mark a renaming as Ghost when
8160 it aliases a Ghost entity.
8161 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
8163 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
8164 aliases a Ghost entity.
8165 * sem_ch11.adb Remove with and use clauses for Ghost.
8166 (Analyze_Exception_Declaration): Remove all Ghost-related code.
8167 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
8169 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
8171 (Analyze_Package_Instantiation): Install and revert the Ghost region
8172 of the package instantiation.
8173 (Analyze_Subprogram_Instantiation): Install
8174 and revert the Ghost region of the subprogram instantiation.
8175 (Instantiate_Package_Body): Code clean up. Install and revert the
8176 Ghost region of the package body.
8177 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
8178 Ghost region of the subprogram body.
8179 * sem_ch13.adb (Build_Predicate_Functions): Install
8180 and revert the Ghost region of the related type.
8181 (Build_Predicate_Function_Declaration): Code clean up. Install
8182 and rever the Ghost region of the related type.
8183 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8184 Install and revert the Ghost region of the pragma.
8185 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
8186 Ghost region of the pragma.
8187 (Analyze_Pragma): Install and revert the Ghost region of various
8188 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
8189 or encloses a Ghost entity.
8190 (Analyze_Pre_Post_Condition): Install and revert the Ghost
8191 region of the pragma.
8192 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
8193 Ghost region of the pragma.
8194 * sem_res.adb (Resolve): Remove all Ghost-related code.
8195 * sem_util.adb (Is_Declaration): Reimplemented.
8196 (Is_Declaration_Other_Than_Renaming): New routine.
8197 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
8198 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
8199 (Is_Ghost_Pragma): Removed.
8200 (Is_Ignored_Ghost_Pragma): New routine.
8201 (Set_Is_Checked_Ghost_Pragma): New routine.
8202 (Set_Is_Ghost_Pragma): Removed.
8203 (Set_Is_Ignored_Ghost_Pragma): New routine.
8204 * sinfo.ads: Update the documentation on Ghost mode and
8205 Ghost regions. New attributes Is_Checked_Ghost_Pragma
8206 and Is_Ignored_Ghost_Pragma along with usages in nodes.
8207 Remove attribute Is_Ghost_Pragma along with usages in nodes.
8208 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8209 (Is_Ghost_Pragma): Removed along with pragma Inline.
8210 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8211 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8212 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
8213 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8215 2017-01-12 Tristan Gingold <gingold@adacore.com>
8217 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
8218 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
8220 2017-01-12 Yannick Moy <moy@adacore.com>
8222 * errout.adb, errout.ads (Initialize): Factor common treatment
8224 (Reset_Warnings): New procedure to reset counts related to warnings.
8225 (Record_Compilation_Errors): New variable to store the presence of an
8226 error, used in gnat2why to allow changing the Warning_Mode.
8227 (Compilation_Errors): Use new variable Record_Compilation_Errors to
8228 store the presence of an error.
8230 2017-01-12 Javier Miranda <miranda@adacore.com>
8232 * sem_ch13.adb (Analyze_Aspect_Specifications):
8233 For Interrupt_Handler and Attach_ Handler aspects, decorate the
8234 internally built reference to the protected procedure as coming
8235 from sources and force its analysis.
8237 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8239 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
8240 inherit predicates if any from the first_subtype of the parent,
8241 not from the anonymous parent type.
8242 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
8243 predicate is not a static subtype.
8245 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8247 * freeze.adb (Check_Suspicious_Convention): New procedure
8248 performing a warning check on discriminated record types with
8249 convention C or C++. Factored out of procedure Freeze_Record_Type,
8250 and changed to only apply to base types (to avoid spurious
8251 warnings on subtypes). Minor improvement of warning messages
8252 to refer to discriminated rather than variant record types.
8253 (Freeze_Record_Type): Remove code for performing a suspicious
8255 (Freeze_Entity): Only call Freeze_Record_Type
8256 on types that aren't declared within any enclosing generic units
8257 (rather than just excluding the type when the innermost scope
8258 is generic). Call Check_Suspicious_Convention whether or not
8259 the type is declared within a generic unit.
8260 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
8261 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
8264 2017-01-12 Tristan Gingold <gingold@adacore.com>
8266 * sysdep.c, adaint.c, rtinit.c, ming32.h:
8267 (__gnat_current_codepage): Renamed from CurrentCodePage
8268 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
8270 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8272 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
8273 quantified expressions, following AI12-050: the loop parameters
8274 of two quantified expressions are conformant if they have the
8277 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8279 * gcc-interface/Makefile.in: Clean up VxWorks targets.
8281 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8283 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
8284 Hnadle properly the attribute reference when it appears as part
8285 of an expression in another loop aspect.
8287 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8289 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
8290 subsidiary of Build_Initialization_Call, to complete generation
8291 of predicate checks on discriminants whose (sub)types have
8292 predicates, and to add checks on variants that do not have an
8294 * sem_util.adb (Gather_Components): A missing Others alternative is
8295 not an error when the type of the discriminant is a static predicate
8296 (and coverage has been checked when analyzing the case statement). A
8297 runtime check is generated to verify that a given discriminant
8298 satisfies the predicate (RM 3.8.1. (21.1/2)).
8300 2017-01-12 Yannick Moy <moy@adacore.com>
8302 * gnat1drv.adb (Adjust_Global_Switches): Only
8303 perform checking of exception mechanism when generating code.
8305 2017-01-12 Justin Squirek <squirek@adacore.com>
8307 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
8308 Remove handling of access component with invariant.
8309 (Build_Invariant_Procedure_Declaration): Remove return on class
8311 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
8312 conditional exception for component or array so Has_Own_Invariants
8313 flag is not falsly set.
8314 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
8315 wide type to have no invariant flags.
8317 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8319 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
8320 sem_ch13.adb: Minor reformatting.
8322 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8324 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
8325 adjustment primitive when the ancestor type was not properly frozen.
8326 (Gen_Assign): Guard against a missing initialization
8327 primitive when the component type was not properly frozen.
8328 (Initialize_Array_Component): Guard against a missing adjustment
8329 primitive when the component type was not properly frozen.
8330 (Initialize_Record_Component): Guard against a missing adjustment
8331 primitive when the component type was not properly frozen.
8332 (Process_Transient_Component_Completion): The transient object may
8333 not be finalized when its associated type was not properly frozen.
8334 * exp_ch3.adb (Build_Assignment): Guard against a missing
8335 adjustment primitive when the component type was not properly frozen.
8336 (Build_Initialization_Call): Guard against a missing
8337 initialization primitive when the associated type was not properly
8339 (Expand_N_Object_Declaration): Guard against a missing
8340 adjustment primitive when the base type was not properly frozen.
8341 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
8342 body when there is no adjustment primitive available. Create an
8343 empty Deep_Finalize body when there is no finalization primitive
8345 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
8346 missing finalization primitive when the designated type was
8347 not properly frozen.
8348 (Expand_N_Allocator): Guard against a missing initialization primitive
8349 when the designated type was not properly frozen.
8350 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
8351 only when the corresponding adjustment primitive is available.
8352 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
8353 adjustment/finalization statements only when there is an available
8354 primitive to carry out the action.
8355 (Build_Initialize_Statements): Generate the initialization/finalization
8356 statements only when there is an available primitive to carry out the
8358 (Make_Adjust_Call): Do not generate a call when the underlying
8359 type is not present due to a possible missing full view.
8360 (Make_Final_Call): Do not generate a call when the underlying
8361 type is not present due to a possible missing full view.
8362 (Make_Finalize_Address_Stmts): Generate an empty body when the
8363 designated type lacks a finalization primitive.
8364 (Make_Init_Call): Do not generate a call when the underlying type is
8365 not present due to a possible missing full view.
8366 (Process_Component_For_Adjust): Add the adjustment call only when the
8367 corresponding adjustment primitive is available.
8368 (Process_Component_For_Finalize): Add the finalization call only when
8369 the corresponding finalization primitive is available.
8370 (Process_Object_Declaration): Use a null statement to emulate a
8371 missing call to the finalization primitive of the object type.
8372 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
8373 (Make_Final_Call): Update the comment on usage.
8374 (Make_Init_Call): Update the comment on usage.
8375 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
8377 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8379 * einfo.ads: Update documentation of Address_Taken.
8380 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
8381 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
8382 for subprograms when setting Address_Taken flag.
8384 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
8386 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
8387 Configurable_Run_Time_Mode off when analysing with'ed predefined
8390 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8392 * sem_prag.adb: Minor reformatting.
8393 * sem_util.adb (Unique_Entity): fix result for
8394 bodies of entry families.
8396 2017-01-12 Justin Squirek <squirek@adacore.com>
8398 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
8399 Resolve_Suppressible in the pragma Assertion_Policy case.
8400 (Resolve_Suppressible): Created this function to factor out
8401 common code used to resolve Suppress to either Ignore or Check
8402 * snames.ads-tmpl: Add name for Suppressible.
8404 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8406 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
8408 * debug.adb: Minor comment fixes.
8410 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8412 * sem_util.adb (Unique_Entity): For concurrent
8413 bodies that are defined with stubs and complete a declaration
8414 of a single concurrent object return the entity of an implicit
8415 concurrent type, not the entity of the anonymous concurrent
8417 * debug.adb: -gnatd.J is no longer used.
8418 * make.adb (Globalize): Removed, no longer used.
8419 * sem_ch9.adb: minor typo in comment for entry index
8421 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
8423 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8424 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8425 the value record of a task, set its _Secondary_Stack_Size field
8427 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8428 a _Secondary_Stack_Size field in the value record of
8429 the task if a Secondary_Stack_Size rep item is present.
8430 (Make_Task_Create_Call): Include secondary stack size
8431 parameter. If No_Secondary_Stack restriction is in place, passes
8433 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8434 Secondary_Stack_Size.
8435 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8436 function to define the overhead of the secondary stack.
8437 * s-tarest.adb (Create_Restricted_Task,
8438 Create_Restricted_Task_Sequential): Functions now include
8439 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8440 * s-tarest.adb (Create_Restricted_Task,
8441 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
8442 include Secondary_Stack_Size parameter.
8443 (Task_Wrapper): Secondary stack now allocated to the size specified by
8444 the Secondary_Stack_Size parameter in the task's ATCB.
8445 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
8446 Secondary_Stack_Size component.
8447 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8448 Create_Restricted_Task_Sequential): Function now include
8449 Secondary_Stack_Size parameter.
8450 (Task_Wrapper): Secondary stack now allocated to the size
8451 specified by the Secondary_Stack_Size parameter in the task's
8453 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
8454 to include Secondary_Stack_Size parameter.
8455 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
8456 Secondary_Stack_Size aspect, turning the aspect into its corresponding
8458 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
8459 * snames.adb-tmpl, snames.ads-tmpl: Added names
8460 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8461 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8463 2017-01-12 Yannick Moy <moy@adacore.com>
8465 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
8468 2017-01-12 Justin Squirek <squirek@adacore.com>
8470 * exp_attr.adb (Expand_N_Attribute_Reference):
8471 Fix Finalization_Size case by properly resolving the type after
8472 rewritting the node.
8474 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8476 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
8478 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
8479 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
8480 exp_sel.ads: Minor reformatting.
8482 2017-01-12 Justin Squirek <squirek@adacore.com>
8484 * exp_ch6.adb (Expand_Call): Add guard to prevent
8485 invariant checks from being created for internally generated
8488 2017-01-12 Bob Duff <duff@adacore.com>
8490 * lib-writ.ads: Remove incorrect comment.
8492 2017-01-12 Javier Miranda <miranda@adacore.com>
8494 * debug.adb (-gnatd.K): Enable generation of contract-only
8495 procedures in CodePeer mode.
8496 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
8498 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
8500 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
8502 (Get_Contract_Only_Missing_Body_Name): New subprogram.
8503 (Get_Contract_Only_Body): New subprogram.
8504 (Set_Contract_Only_Body): New subprogram.
8505 (Is_Contract_Only_Body): New subprogram.
8506 (Set_Is_Contract_Only_Body): New subprogram.
8507 (SCIL_Nodes): Replace table by hash-table.
8509 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8511 * exp_ch6.adb: Minor reformatting.
8512 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
8514 2017-01-12 Bob Duff <duff@adacore.com>
8516 * binde.adb (Forced): New reason for a dependence.
8517 (Force_Elab_Order): Implementation of the new switch.
8518 * binde.ads: Minor comment fixes.
8519 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
8520 long ago that is no longer supported; removed comment about that.
8521 * opt.ads (Force_Elab_Order_File): Name of file specified for
8523 * switch-b.adb: Parse -f switch.
8525 2017-01-12 Justin Squirek <squirek@adacore.com>
8527 * exp_ch6.adb (Check_View_Conversion): Created this function
8528 to properly chain calls to check type invariants that may be
8529 present in a subprogram call after the subprogram.
8530 (Expand_Call): Add a conditional to identify when a view conversion
8531 needs to be checked.
8532 * nlists.adb, nlists.ads (Prepend_New): New routine.
8533 (Prepend_New_To): New routine.
8535 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8537 * sinfo.ads: Minor reformatting.
8539 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8541 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
8544 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8546 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
8547 variable Definite. Create a local object and pass its 'Access to the
8548 BIP function when the result type is either definite or it does not
8549 require any finalization or secondary stack management.
8551 2017-01-12 Bob Duff <duff@adacore.com>
8553 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
8554 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
8555 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
8556 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
8557 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
8558 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
8559 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8560 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
8561 Change name to Pragma_Name_Unmapped.
8562 (Pragma_Name_Mapped): Change name to Pragma_Name.
8563 This is because the "mapped" version should be the usual case.
8565 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
8567 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
8568 Is_Default_Init_Cond_Procedure, and
8569 Has_Inherited_Default_Init_Cond. Add uses of flags
8570 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
8571 (Default_Init_Cond_Procedure): Removed.
8572 (DIC_Procedure): New routine.
8573 (Has_Default_Init_Cond): Removed.
8574 (Has_DIC): New routine.
8575 (Has_Inheritable_Invariants): The attribute applies to the base type.
8576 (Has_Inherited_Default_Init_Cond): Removed.
8577 (Has_Inherited_DIC): New routine.
8578 (Has_Inherited_Invariants): The attribute applies to the base type.
8579 (Has_Own_DIC): New routine.
8580 (Has_Own_Invariants): The attribute applies to the base type.
8581 (Is_Default_Init_Cond_Procedure): Removed.
8582 (Is_DIC_Procedure): New routine.
8583 (Set_Default_Init_Cond_Procedure): Removed.
8584 (Set_DIC_Procedure): New routine.
8585 (Set_Has_Default_Init_Cond): Removed.
8586 (Set_Has_Inheritable_Invariants): The attribute applies
8588 (Set_Has_Inherited_Default_Init_Cond): Removed.
8589 (Set_Has_Inherited_DIC): New routine.
8590 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
8591 (Set_Has_Own_DIC): New routine.
8592 (Set_Has_Own_Invariants): The attribute applies to the base type.
8593 (Set_Is_Default_Init_Cond_Procedure): Removed.
8594 (Set_Is_DIC_Procedure): New routine.
8595 (Write_Entity_Flags): Update the output of all flags related to
8596 default initial condition.
8597 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
8598 of the call to the DIC procedure.
8599 (Freeze_Type): Generate the body of the DIC procedure.
8600 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
8601 all occurrences of Create_Append with Append_New_To. Do
8602 not generate an invariant procedure for a class-wide type.
8603 The generated body acts as a freeze action of the working type.
8604 (Build_Invariant_Procedure_Declaration): Do not generate an
8605 invariant procedure for a class-wide type.
8606 (Create_Append): Removed.
8607 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
8608 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
8609 class-wide pre/postcondition description and data structures from
8611 (Build_Class_Wide_Expression): Moved from Sem_Prag.
8612 (Build_DIC_Call): New routine.
8613 (Build_DIC_Procedure_Body): New routine.
8614 (Build_DIC_Procedure_Declaration): New routine.
8615 (Entity_Hash): Moved from Sem_Prag.
8616 (Find_DIC_Type): New routine.
8617 (Update_Primitives_Mapping): Reimplemented.
8618 (Update_Primitives_Mapping_Of_Types): New routine.
8619 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
8620 (Build_DIC_Call): New routine.
8621 (Build_DIC_Procedure_Body): New routine.
8622 (Build_DIC_Procedure_Declaration): New routine.
8623 (Update_Primitives_Mapping): Moved from Sem_Prag.
8624 (Update_Primitives_Mapping_Of_Types): New routine.
8625 * nlists.adb (Append_New): New routine.
8626 (Append_New_To): New routine.
8627 * nlists.ads (Append_New): New routine.
8628 (Append_New_To): New routine.
8629 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
8630 of DIC procedures here. This is now done at the end of the
8631 visible declarations, private declarations, and at the freeze
8633 (Analyze_Private_Extension_Declaration):
8634 A private extension inherits the DIC pragma of a parent type.
8635 (Analyze_Subtype_Declaration): No need to propagate invariant
8636 attributes to a subtype as those apply to the base type.
8637 (Build_Derived_Record_Type): No need to inherit invariants here
8638 as this is now done in Build_Derived_Type.
8639 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
8641 (Process_Full_View): Update the propagation of DIC attributes.
8642 (Propagate_Default_Init_Cond_Attributes): Removed.
8643 * sem_ch7.adb Add with and use clauses for Exp_Util.
8644 (Analyze_Package_Specification): Create the body of the DIC
8645 procedure at the end of the visible and private declarations.
8646 (Preserve_Full_Attributes): Propagate DIC attributes.
8647 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
8649 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
8650 * sem_elab.adb (Check_A_Call): Update the call to
8651 Is_Nontrivial_Default_Init_Cond_Procedure.
8652 * sem_prag.adb Remove the with and use clauses for
8653 GNAT.HTable. Move the handling of class- wide pre/postcondition
8654 description and data structures to Exp_Util.
8655 (Analyze_Pragma): Create the declaration of the DIC procedure. There
8656 is no need to propagate invariant-related attributes at this point
8657 as this is done in Build_Invariant_Procedure_Declaration.
8658 (Build_Class_Wide_Expression): Moved to Exp_Util.
8659 (Entity_Hash): Moved to Exp_Util.
8660 (Update_Primitives_Mapping): Moved to Exp_Util.
8661 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
8662 (Update_Primitives_Mapping): Moved to Exp_Util.
8663 * sem_util.adb: Remove with and use clauses for Ghost
8665 (Build_Default_Init_Cond_Call): Removed.
8666 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8667 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8668 (Get_Views): Reimplemented.
8669 (Has_Full_Default_Initialization): Reimplement the section on DIC.
8670 (Inherit_Default_Init_Cond_Procedure): Removed.
8671 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8672 (Is_Nontrivial_DIC_Procedure): New routine.
8673 (Is_Verifiable_DIC_Pragma): New routine.
8674 (Propagate_DIC_Attributes): New routine.
8675 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
8676 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8677 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8678 (Inherit_Default_Init_Cond_Procedure): Removed.
8679 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8680 (Is_Nontrivial_DIC_Procedure): New routine.
8681 (Is_Verifiable_DIC_Pragma): New routine.
8682 (Propagate_DIC_Attributes): New routine.
8683 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
8685 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
8687 (Expression_Copy): New routine along with pragma Inline.
8688 (Set_Expression_Copy): New routine along with pragma Inline.
8690 2017-01-06 Bob Duff <duff@adacore.com>
8692 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
8693 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
8694 we won't generate the call to s_stalib_adafinal when the main
8695 is not written in Ada.
8697 2017-01-06 Bob Duff <duff@adacore.com>
8699 * sem_prag.adb: Minor: remove pragma Warnings.
8701 2017-01-06 Tristan Gingold <gingold@adacore.com>
8703 * Makefile.rtl: Do not compile s-stchop by default.
8705 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8707 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
8708 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
8709 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
8710 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
8711 Reverted previous change for now.
8713 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8715 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
8716 check to default discriminant value if checks are enabled.
8717 (Build_Assignment): If type of component has static predicate,
8718 apply check to its default value, if any.
8720 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8722 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8723 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8724 the value record of a task, set its _Secondary_Stack_Size field
8726 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8727 a _Secondary_Stack_Size field in the value record of
8728 the task if a Secondary_Stack_Size rep item is present.
8729 (Make_Task_Create_Call): Include secondary stack size
8730 parameter. If No_Secondary_Stack restriction is in place, passes
8732 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8733 Secondary_Stack_Size.
8734 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8735 function to define the overhead of the secondary stack.
8736 * s-tarest.adb (Create_Restricted_Task,
8737 Create_Restricted_Task_Sequential): Functions now include
8738 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8739 * s-tarest.adb (Create_Restricted_Task,
8740 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
8741 now include Secondary_Stack_Size parameter.
8743 Secondary stack now allocated to the size specified by the
8744 Secondary_Stack_Size parameter in the task's ATCB.
8745 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
8746 Secondary_Stack_Size component.
8747 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8748 Create_Restricted_Task_Sequential): Function now include
8749 Secondary_Stack_Size parameter.
8750 (Task_Wrapper): Secondary stack
8751 now allocated to the size specified by the Secondary_Stack_Size
8752 parameter in the task's ATCB.
8753 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
8754 for Secondary_Stack_Size aspect, turning the aspect into its
8755 corresponding internal attribute.
8756 (Analyze_Attribute_Definition):
8757 Process Secondary_Stack_Size attribute.
8758 * snames.adb-tmpl, snames.ads-tmpl: Added names
8759 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8760 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8762 2017-01-06 Pascal Obry <obry@adacore.com>
8764 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
8765 Sequential_IO and Direct_IO.
8767 2017-01-06 Bob Duff <duff@adacore.com>
8769 * snames.ads-tmpl (Renamed): New name for the pragma argument.
8770 * par-ch2.adb: Allow the new pragma (with analysis deferred
8772 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
8773 Keep a mapping from new pragma names to old names.
8774 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
8775 implement it by calling Map_Pragma_Name.
8776 * checks.adb, contracts.adb, einfo.adb, errout.adb,
8777 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
8778 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
8779 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
8780 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
8781 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8782 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
8785 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8787 * exp_ch9.adb: Minor reformatting.
8789 2017-01-06 Tristan Gingold <gingold@adacore.com>
8791 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
8792 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
8793 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
8795 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
8796 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
8797 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
8798 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
8800 2017-01-06 Bob Duff <duff@adacore.com>
8802 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
8803 dummy implementation of Map_Pragma_Name.
8805 2017-01-06 Tristan Gingold <gingold@adacore.com>
8807 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
8808 entry_body variable constant.
8809 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
8810 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
8812 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
8813 now access to constant.
8815 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8817 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
8818 reformatting and typo fixes.
8820 2017-01-06 Bob Duff <duff@adacore.com>
8822 * snames.ads-tmpl: New names for pragma renaming.
8823 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
8824 * par-prag.adb: Add new pragma name to case statement.
8825 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
8827 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
8828 Dummy implementation of Pragma_Name_Mapped.
8830 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8832 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
8833 better detect call within an entry_wrapper.
8834 * sem_res.adb (Resolve_Call): A protected call within an
8835 entity_wrapper is analyzed in the context of the protected
8836 object but corresponds to a pre-analysis and is not an access
8838 * sem_attr.adb: Minor reformatting.
8840 2017-01-06 Justin Squirek <squirek@adacore.com>
8842 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
8843 Finalization_Size to allow a prefix of any non-class-wide type.
8844 * sem_attr.ads Modify comment for Finalization_Size to include
8845 definite type use case.
8847 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8849 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
8850 on procedures that are wrappers created for entries that have
8852 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
8853 body is an entry_wrapper, compile it in the context of the
8854 synchronized type, because a precondition may refer to funtions
8856 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
8858 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
8859 within an Entry_Wrapper this is an external call whose target
8860 is the synchronized object that is the actual in the call to
8863 2017-01-06 Yannick Moy <moy@adacore.com>
8865 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
8866 in tree, which means not analyzing the previous prefix if the node has
8867 been rewritten into its prefix.
8869 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8871 * s-tpobop.adb: Minor reformatting.
8873 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8875 * checks.adb (Ensure_Valid): Do not generate a validity check
8876 within a generated predicate function, validity checks will have
8877 been applied earlier when required.
8879 2017-01-06 Tristan Gingold <gingold@adacore.com>
8881 * s-tpoben.ads (Protection_Entries): Add comment and reorder
8882 components for performances.
8883 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
8886 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8888 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
8889 If expression is compile-time known and obeys a static predicate
8890 it must be labelled as static, to prevent spurious warnings and
8891 run-time errors, e.g. in case statements. This is relevant when
8892 the expression is the result of constant-folding a type conversion
8893 whose expression is a variable with a known static value.
8895 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8897 * exp_attr.adb, sem_attr.ads: Minor reformatting.
8899 2017-01-06 Justin Squirek <squirek@adacore.com>
8901 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
8902 expansion of Finalization_Size attribute.
8903 * sem_attr.adb (Analyze_Attribute): Add entry to check the
8904 semantics of Finalization_Size.
8905 (Eval_Attribute): Add null entry for Finalization_Size.
8906 * sem_attr.ads: Add Finalization_Size to the implementation
8907 dependent attribute list.
8908 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
8910 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8912 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
8913 iterator specification with a serious syntactic error, transform
8914 construct into an infinite loop in order to continue analysis
8915 and prevent a compiler abort.
8917 2017-01-06 Tristan Gingold <gingold@adacore.com>
8919 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
8920 max_queue_lengths_array if unused.
8922 2017-01-06 Bob Duff <duff@adacore.com>
8924 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
8925 array access, in case "\" is at the end of Text.
8926 * stylesw.adb (Set_Style_Check_Options): Don't include input
8927 characters in the error message template, because they could
8928 be control characters such as "\", which Errout will try to
8931 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8933 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
8934 For a private type examine the visible declarations that follow
8935 the partial view, not just the private declarations that follow
8938 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8940 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
8943 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8945 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
8946 alias of the inherited op is the parent iterator, no need to
8947 examine dispatch table positions which might not be established
8948 yet if type is not frozen.
8949 * sem_disp.adb (Check_Controlling_Formals): The formal of a
8950 predicate function may be a subtype of a tagged type.
8951 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
8952 of representation items for the completion of a type extension
8953 where a predicate applies to the partial view.
8954 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
8955 parameter that designates function whose actual receives a
8956 predicate check, to improve warning message when the check will
8957 lead to infinite recursion.
8958 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
8959 Apply_Predicate_Check.
8961 2017-01-06 Tristan Gingold <gingold@adacore.com>
8963 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
8964 Gnat_Extended_Ravenscar.
8965 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
8967 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8969 * sem_util.ads: Minor typo fix and reformatting.
8971 2017-01-06 Yannick Moy <moy@adacore.com>
8973 * ghost.adb Minor fixing of references to SPARK RM.
8974 (Check_Ghost_Context): Check whether reference is to a lvalue
8975 before issuing an error about violation of SPARK RM 6.9(13)
8976 when declaration has Ghost policy Check and reference has Ghost
8978 * sem_util.adb Minor indentation.
8979 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
8980 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
8981 * sem_util.ads (Unique_Defining_Entity): Document the result
8982 for package body stubs.
8984 2017-01-06 Tristan Gingold <gingold@adacore.com>
8986 * raise-gcc.c (abort): Macro to call Abort_Propagation.
8987 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
8989 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
8990 Do not generate the Entry_Max_Queue_Lengths_Array if all default
8992 * exp_util.adb (Corresponding_Runtime_Package): Consider
8993 Max_Queue_Length pragma.
8995 2017-01-06 Justin Squirek <squirek@adacore.com>
8997 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
8998 Remove declaration generation in the case of
8999 System_Tasking_Protected_Objects_Single_Entry being used,
9000 and add a warning message when this is detected to occur.
9001 (Make_Initialize_Protection): Remove reference pass in the case
9002 of System_Tasking_Protected_Objects_Single_Entry.
9003 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
9004 * s-tposen.adb (Initialize_Protection_Entry): Remove
9005 Entry_Queue_Max parameter.
9006 * s-tposen.ads: Remove the types use to store the entry queue
9008 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
9010 2017-01-06 Yannick Moy <moy@adacore.com>
9012 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
9013 behavior of function, to also accept out of range positions
9014 and raise Constraint_Error in such case, and to copy sloc from
9015 literal if No_Location passed as location.
9016 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
9017 of functions to raise Constraint_Error in case of value not in
9020 2017-01-06 Tristan Gingold <gingold@adacore.com>
9022 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
9023 Invalidate_Stack_Cache.
9025 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
9027 * s-os_lib.adb: Minor fix to the signature of Readlink.
9029 2017-01-06 Javier Miranda <miranda@adacore.com>
9031 * sem_ch6.adb (Conforming_Types): Handle another
9032 confusion between views in a nested instance with an actual
9033 private type whose full view is not in scope.
9035 2017-01-06 Arnaud Charlet <charlet@adacore.com>
9037 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
9038 mark a rewritten if statement as explicit (Comes_From_Source).
9040 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9042 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
9044 2017-01-06 Tristan Gingold <gingold@adacore.com>
9046 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
9048 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9050 * sem_case.adb: Minor reformatting.
9052 2017-01-06 Thomas Quinot <quinot@adacore.com>
9054 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
9056 2017-01-06 Justin Squirek <squirek@adacore.com>
9058 * aspects.adb: Register aspect in Canonical_Aspect.
9059 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
9060 into respective tables.
9061 * einfo.ads, einfo.adb: Add a new attribute for
9062 handling the parameters for Pragma_Max_Entry_Queue
9063 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
9064 for accessing and setting were added as well.
9065 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
9066 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
9067 declaration for pramga arguments and store them in the protected
9069 (Make_Initialize_Protection): Pass a reference to
9070 the Entry_Max_Queue_Lengths_Array in the protected type node to
9072 * rtsfind.adb: Minor grammar fix.
9073 * rtsfind.ads: Register new types taken from the
9074 runtime libraries RE_Protected_Entry_Queue_Max and
9075 RE_Protected_Entry_Queue_Max_Array
9076 * s-tposen.adb, s-tpoben.adb
9077 (Initialize_Protection_Entry/Initialize_Protection_Entries):
9078 Add extra parameter and add assignment to local object.
9079 * s-tposen.ads, s-tpoben.ads: Add new types to
9080 store entry queue maximums and a field to the entry object record.
9081 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
9082 for Aspect_Max_Queue_Length.
9083 (Check_Aspect_At_Freeze_Point):
9084 Add aspect to list of aspects that don't require delayed analysis.
9085 * sem_prag.adb (Analyze_Pragma): Add case statement for
9086 Pragma_Max_Queue_Length, check semantics, and register arugments
9087 in the respective entry nodes.
9088 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
9089 and Has_Max_Queue_Length
9090 * snames.ads-tmpl: Add constant for the new aspect-name
9091 Name_Max_Queue_Length and corrasponding pragma.
9093 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9095 * exp_util.adb (Is_Controlled_Function_Call):
9096 Reimplemented. Consider any node which has an entity as the
9097 function call may appear in various ways.
9099 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9101 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
9102 an unchecked type conversion when performing a view conversion
9103 to/from a private type. In all other cases use a regular type
9104 conversion to ensure that any relevant checks are properly
9107 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9109 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
9111 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9113 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
9114 error on case expression that is an entity, when coverage is
9115 incomplete and entity has a static value obtained by local
9117 (Handle_Static_Predicate): New procedure, subsidiary of
9118 Check_Choices, to handle case alternatives that are either
9119 subtype names or subtype indications involving subtypes that
9120 have static predicates.
9122 2017-01-06 Thomas Quinot <quinot@adacore.com>
9124 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
9125 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
9127 2017-01-06 Bob Duff <duff@adacore.com>
9129 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
9130 Elaborate_All(P) to P itself. That could happen in obscure cases,
9131 and always introduced a cycle (P body must be elaborated before
9133 * lib-writ.ads: Comment clarification.
9134 * ali-util.ads: Minor comment fix.
9135 * ali.adb: Minor reformatting.
9137 2017-01-06 Tristan Gingold <gingold@adacore.com>
9139 * a-exexpr-gcc.adb: Improve comment.
9141 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9143 * s-linux-mips.ads: Use correct signal and errno constants.
9144 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
9146 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9148 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
9149 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
9152 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
9154 * gnatvsn.ads: Bump copyright year.
9156 2017-01-01 Jakub Jelinek <jakub@redhat.com>
9158 * gnat_ugn.texi: Bump @copying's copyright year.
9159 * gnat_rm.texi: Likewise.
9161 Copyright (C) 2017 Free Software Foundation, Inc.
9163 Copying and distribution of this file, with or without modification,
9164 are permitted in any medium without royalty provided the copyright
9165 notice and this notice are preserved.