1 2017-09-11 Yannick Moy <moy@adacore.com>
3 * sem_util.adb (Check_Result_And_Post_State):
4 Do not issue a warning about missing reference to an outcome if
5 the subprogram is ghost and has no outputs.
6 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
9 2017-09-11 Yannick Moy <moy@adacore.com>
11 * gnat1drv.adb (Adjust_Global_Switches): Set
12 Check_Validity_Of_Parameters to False in GNATprove mode.
13 * opt.ads (Check_Validity_Of_Parameters): Document switch to
16 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
18 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
19 generate debug info for inner record types if -fgnat-encodings=minimal.
20 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
21 type as the debug type.
23 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
25 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
26 packed record types if pragma Optimize_Alignment (Space) is enabled.
28 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
30 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
31 limits for expression functions.
32 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
34 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
36 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
37 layout of the record from the parent type only if both are or are not
39 (is_stored_discriminant): Return false for an unchecked union.
41 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
43 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
46 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
48 * gcc-interface/decl.c (promote_object_alignment): New function taken
50 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
51 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
52 create a padding type on success before doing the atomic check.
54 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
56 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
57 promotion to static memory earlier in the processing.
59 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
61 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
62 and TYPE_BY_REFERENCE_P flags on types after various promotions.
63 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
64 Consider all kinds of entities.
66 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
68 * gcc-interface/utils.c (convert): When converting to a padding type,
69 reuse an existing CONSTRUCTOR if it has got the right size.
71 2017-09-08 Nicolas Roche <roche@adacore.com>
73 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
75 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
76 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
77 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
78 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
79 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
80 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
81 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
82 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
83 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
84 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
85 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
86 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
87 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
88 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
89 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
90 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
91 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
92 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
93 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
94 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
95 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
96 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
97 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
98 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
99 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
100 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
101 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
102 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
103 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
104 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
105 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
106 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
107 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
108 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
109 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
110 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
111 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
112 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
113 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
114 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
115 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
116 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
117 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
118 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
119 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
120 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
121 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
122 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
123 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
124 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
125 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
126 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
127 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
128 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
129 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
130 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
131 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
132 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
133 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
134 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
135 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
136 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
137 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
138 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
139 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
140 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
141 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
142 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
143 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
144 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
145 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
146 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
147 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
148 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
149 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
150 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
151 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
152 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
153 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
154 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
155 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
156 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
157 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
158 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
159 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
160 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
161 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
162 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
163 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
164 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
165 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
166 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
167 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
168 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
169 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
170 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
171 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
172 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
173 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
174 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
175 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
176 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
177 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
178 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
179 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
180 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
181 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
182 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
183 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
184 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
185 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
186 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
187 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
188 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
189 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
190 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
191 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
192 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
193 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
194 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
195 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
196 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
197 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
198 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
199 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
200 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
201 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
202 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
203 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
204 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
205 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
206 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
207 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
208 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
209 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
210 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
211 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
212 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
213 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
214 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
215 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
216 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
217 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
218 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
219 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
220 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
221 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
222 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
223 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
224 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
225 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
226 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
227 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
228 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
229 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
230 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
231 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
232 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
233 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
234 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
235 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
236 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
237 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
238 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
239 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
240 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
241 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
242 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
243 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
244 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
245 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
246 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
247 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
248 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
249 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
250 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
251 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
252 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
253 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
254 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
255 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
256 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
257 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
258 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
259 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
260 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
261 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
262 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
263 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
264 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
265 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
266 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
267 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
268 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
269 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
270 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
271 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
272 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
273 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
274 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
275 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
276 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
277 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
278 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
279 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
280 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
281 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
282 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
283 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
284 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
285 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
286 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
287 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
288 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
289 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
290 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
291 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
292 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
293 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
294 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
295 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
296 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
297 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
298 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
299 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
300 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
301 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
302 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
303 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
304 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
305 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
306 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
307 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
308 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
309 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
310 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
311 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
312 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
313 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
314 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
315 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
316 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
317 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
318 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
319 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
320 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
321 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
322 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
323 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
324 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
325 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
326 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
327 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
328 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
329 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
330 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
331 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
332 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
333 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
334 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
335 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
336 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
337 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
338 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
339 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
340 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
341 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
342 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
343 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
344 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
345 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
346 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
347 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
348 to libgnat subdirectory.
350 2017-09-08 Yannick Moy <moy@adacore.com>
352 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
353 return the entity associated with the call.
354 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
355 Replace the internal Get_Function_Id with the new
356 Sem_Aux.Get_Called_Entity.
357 (Iterate_Call_Parameters): New
358 procedure to iterate on formals and actuals at the same time.
359 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
360 Set SPARK_Mode from spec when set, for analysis
361 of instance. Restore after analysis of instance.
362 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
363 set, for analysis of body instance. Restored automatically at
364 the end of the subprogram.
365 * gnat1drv.adb (Adjust_Global_Switches): Set
366 Check_Validity_Of_Parameters to False in GNATprove mode.
367 * opt.ads (Check_Validity_Of_Parameters): Document switch to
370 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
372 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
373 (New_Copy_Tree): ...there. Reset the hash tables only if they
374 were used in the previous invocation.
375 * s-htable.adb: Fix typo.
377 2017-09-08 Bob Duff <duff@adacore.com>
379 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
381 2017-09-08 Arnaud Charlet <charlet@adacore.com>
383 * sem_aggr.adb: minor style fix.
385 2017-09-08 Bob Duff <duff@adacore.com>
387 * sprint.adb (Write_Corresponding_Source): Ignore if there is
388 no current source file.
389 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
390 Print something helpful in case N is invalid.
391 * sprint.ads: Minor comment fix.
393 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
395 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
398 2017-09-08 Bob Duff <duff@adacore.com>
400 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
401 Ada_2020, along the same lines as the other Ada version pragmas.
403 2017-09-08 Gary Dismukes <dismukes@adacore.com>
405 * sem_ch12.adb: Minor typo fixes and reformatting.
407 2017-09-08 Yannick Moy <moy@adacore.com>
409 * sem_aggr.adb (Resolve_Record_Aggregate):
410 Rewrite bounds of aggregate subexpressions which may depend on
411 discriminants of the enclosing aggregate.
413 2017-09-08 Yannick Moy <moy@adacore.com>
415 * sem_ch5.adb: Prevent assertion failure on illegal code.
417 2017-09-08 Yannick Moy <moy@adacore.com>
419 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
420 calling Renamed_Entity on an entity which cannot be a renaming.
422 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
424 * exp_aggr.adb: Add with & use clause for Urealp.
425 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
426 elementary types instead of just discrete types.
427 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
428 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
429 Be prepared for the FP zero value in the memset case. Add small
432 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
434 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
437 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
439 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
440 of New_Copy because the latter leaves the syntactic structure of
441 the tree inconsistent (a child is accessible through two parents)
442 and prevents proper replication of itypes by subsequent calls
444 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
445 New_Copy because the latter leaves the syntactic structure of the
446 tree inconsistent (a child is accessible through two parents)
447 and prevents proper replication of itypes by subsequent calls
449 * sem_util.adb (In_Subtree): New routine.
450 (New_Copy_Tree): Reimplemented.
451 * sem_util.ads (In_Subtree): New routine.
452 (New_Copy_Tree): Reimplemented.
454 2017-09-08 Ed Schonberg <schonberg@adacore.com>
456 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
457 for aspect Default_Value is a static scalar value, but it does
458 not freeze the type. Yhis allows for subsequent representation
459 clauses for the type.
461 2017-09-08 Javier Miranda <miranda@adacore.com>
463 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
464 not add entries into the undefined reference table when we are
465 compiling with errors ignored.
467 2017-09-08 Ed Schonberg <schonberg@adacore.com>
469 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
470 check if the instance is within an enclosing instance body. The
471 formal package was legal in the enclosing generic, and is
472 legal in the enclosing instantiation. This optimisation may be
473 applicable elsewhere, and it also removes spurious errors that
474 may arise with on-the-fly processing of instantiations that
475 contain Inline_Always subprograms.
477 2017-09-08 Vincent Celier <celier@adacore.com>
479 * gnatcmd.adb: Disregard empty argument of GNAT driver.
481 2017-09-08 Justin Squirek <squirek@adacore.com>
483 * checks.adb (Insert_Valid_Check): Manually decorate
484 the generated temporary for range valdity checks.
486 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
488 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
490 2017-09-08 Justin Squirek <squirek@adacore.com>
492 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
493 case to handle underscore flags.
494 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
495 new procedure to handle underscores.
497 2017-09-08 Javier Miranda <miranda@adacore.com>
499 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
500 divisions with fixed point results to avoid generating twice
501 the runtime check on divide by zero.
502 * checks.adb (Apply_Divide_Checks): Ensure that operands are
503 not evaluated twice (once for their runtime checks and once for
504 their regular computation).
506 2017-09-08 Yannick Moy <moy@adacore.com>
508 * sem_prag.adb (Analyze_Part_Of): Add missing
509 return statements after issuing errors. Add detection of
510 out-of-order item and single concurrent type.
512 2017-09-08 Nicolas Roche <roche@adacore.com>
514 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
515 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
516 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
517 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
518 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
519 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
520 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
521 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
522 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
523 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
524 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
525 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
526 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
527 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
528 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
529 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
530 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
531 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
532 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
533 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
534 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
535 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
536 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
537 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
538 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
539 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
540 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
541 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
542 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
543 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
544 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
545 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
546 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
547 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
548 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
549 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
550 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
551 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
552 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
553 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
554 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
555 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
556 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
557 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
558 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
559 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
560 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
561 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
562 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
563 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
564 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
565 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
566 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
567 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
569 2017-09-08 Arnaud Charlet <charlet@adacore.com>
571 * doc/share/conf.py, doc/share/latex_elements.py,
572 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
575 2017-09-08 Arnaud Charlet <charlet@adacore.com>
577 * gnat_rm.texi, gnat_ugn.texi,
578 doc/gnat_ugn/the_gnat_compilation_model.rst,
579 doc/gnat_ugn/getting_started_with_gnat.rst,
580 doc/gnat_ugn/inline_assembler.rst,
581 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
582 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
583 doc/gnat_ugn/about_this_guide.rst,
584 doc/gnat_ugn/platform_specific_information.rst,
585 doc/gnat_ugn/example_of_binder_output.rst,
586 doc/gnat_ugn/gnat_and_program_execution.rst,
587 doc/gnat_ugn/gnat_utility_programs.rst,
588 doc/gnat_rm/implementation_of_specific_ada_features.rst,
589 doc/gnat_rm/interfacing_to_other_languages.rst,
590 doc/gnat_rm/implementation_defined_aspects.rst,
591 doc/gnat_rm/intrinsic_subprograms.rst,
592 doc/gnat_rm/implementation_defined_characteristics.rst,
593 doc/gnat_rm/implementation_advice.rst,
594 doc/gnat_rm/implementation_defined_attributes.rst,
595 doc/gnat_rm/compatibility_and_porting_guide.rst,
596 doc/gnat_rm/standard_library_routines.rst,
597 doc/gnat_rm/the_gnat_library.rst,
598 doc/gnat_rm/implementation_defined_pragmas.rst,
599 doc/gnat_rm/representation_clauses_and_pragmas.rst,
600 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
601 doc/gnat_rm/obsolescent_features.rst,
602 doc/gnat_rm/about_this_guide.rst,
603 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
604 doc/gnat_rm/implementation_of_ada_2012_features.rst,
606 doc/gnat_rm.rst: Update documentation.
608 2017-09-08 Arnaud Charlet <charlet@adacore.com>
610 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
611 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
612 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
614 2017-09-08 Bob Duff <duff@adacore.com>
616 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
617 New routine to read the Tag robustly.
618 * exp_attr.adb (Input): Change the expansion of 'Input,
619 in the class-wide case, to call String_Input_Tag instead of
622 2017-09-08 Arnaud Charlet <charlet@adacore.com>
624 * s-rident.ads (Restriction_Id): reorder enum
625 literals, so that Pure_Barriers is no longer in range of the
626 Cunit_Boolean_Restrictions subtype.
628 2017-09-08 Nicolas Roche <roche@adacore.com>
630 * a-taster.ads, a-taster.adb: Move to libgnarl
631 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
632 Add support for files in libgnarl.
634 2017-09-08 Ed Schonberg <schonberg@adacore.com>
636 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
637 accessibility check to an interface conversion, whose purpose
638 is to perform a pointer adjustment in a dispatching call.
639 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
640 when the actual is a construct that involves a dereference of an
641 expression that includes a formal of the enclosing subprogram,
642 In such cases, the accessibility level of the actual is that of
643 the corresponding formal, which is passed in as an additional
644 actual in the outer call.
646 2017-09-08 Bob Duff <duff@adacore.com>
648 * exp_intr.adb (Add_Source_Info): Do not decode
649 file names; they were not encoded in the first place.
651 2017-09-08 Bob Duff <duff@adacore.com>
653 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
654 exceptions instead of crashes. Check for absurdly long strings
655 and empty strings. Empty strings cause trouble because they can
656 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
657 be empty, which causes an array index out of bounds.
658 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
661 2017-09-08 Arnaud Charlet <charlet@adacore.com>
663 * sem_util.adb (Is_CCT_Instance): allow use in
664 the context of protected types.
666 2017-09-08 Arnaud Charlet <charlet@adacore.com>
668 * a-tigeli.adb: minor remove extra whitespace.
670 2017-09-08 Gary Dismukes <dismukes@adacore.com>
672 * par-ch4.adb: Reformatting of an error message.
674 2017-09-08 Javier Miranda <miranda@adacore.com>
676 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
677 identifiers to ensure their correct decoration of names on
680 2017-09-08 Yannick Moy <moy@adacore.com>
682 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
683 not skip a loop coming from source which is rewritten into a loop.
685 2017-09-08 Ed Schonberg <schonberg@adacore.com>
687 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
688 wrapper has convention Ada, to prevent spurious warnings on
689 unconstrained array parameters.
691 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
693 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
694 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
696 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
698 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
700 2017-09-08 Arnaud Charlet <charlet@adacore.com>
702 * exp_intr.adb (Append_Entity_Name): Move to ...
703 * sem_util.ads, sem_util.adb: ... here to share it.
704 (Subprogram_Name): New subprogram, to compute the name of the enclosing
706 * errutil.adb (Error_Msg): Fill new field Node.
707 * erroutc.ads (Subprogram_Name_Ptr): New.
708 (Error_Msg_Object): New field Node.
709 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
710 * errout.adb (Error_Msg): New variant with node id parameter.
711 Fill new parameter Node when emitting messages. Revert previous
712 changes for Include_Subprogram_In_Messages.
713 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
714 generating warning message.
716 2017-09-08 Ed Schonberg <schonberg@adacore.com>
718 * par-ch4.adb (P_Iterated_Component_Association): Place construct
719 under -gnat2020 flag, given that it is a future feature of
721 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
722 defining identifier as referenced to prevent spurious warnings:
723 corresponding loop is expanded into one or more loops whose
724 variable has the same name, and the expression uses those names
725 and not the original one.
727 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
729 * sem_elab.adb (Check_A_Call): Do not consider
730 references to internal variables for SPARK semantics.
732 2017-09-08 Arnaud Charlet <charlet@adacore.com>
734 * inline.adb (In_Package_Spec): refine type of
735 the parameter from Node_Id to Entity_Id.
737 2017-09-08 Justin Squirek <squirek@adacore.com>
739 * exp_ch5.adb (Expand_Formal_Container_Loop):
740 Reset the scope of the loop parameter after it is reanalyzed.
742 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
744 * sem_util.ads (Set_Rep_Info): New inline procedure.
745 * sem_util.adb (Set_Rep_Info): Implement it.
746 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
747 always copy the representation aspects onto the subtype.
749 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
751 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
752 Correction of the return type from access type to option type.
753 (Simple_HTable): Moving the Instance_Data to ads file.
755 2017-09-08 Yannick Moy <moy@adacore.com>
757 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
759 2017-09-08 Arnaud Charlet <charlet@adacore.com>
761 * opt.ads (Include_Subprogram_In_Messages): New variable.
762 * errout.ads (Current_Subprogram_Ptr): New variable.
763 * errout.adb (Error_Msg): Prepend current subprogram info
764 in messages if Include_Subprogram_In_Messages is set.
765 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
767 * gnat1drv.adb (Adjust_Global_Switches): Set
768 Include_Subprogram_In_Messages when -gnatdJ is set.
769 * debug.adb: Document and reserve -gnatdJ.
771 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
773 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
774 functions to iterate over simple hastables.
775 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
777 2017-09-08 Javier Miranda <miranda@adacore.com>
779 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
780 missing checks on the presence of Entity() before checking the
783 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
785 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
786 statements, use local variable and remove unnecessary processing.
788 2017-09-08 Javier Miranda <miranda@adacore.com>
790 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
792 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
793 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
795 (Unqual_BIP_Iface_Function_Call): New subprogram.
796 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
797 subprogram containing code that was previously inside
798 Make_Build_In_Place_Call_In_Object_Declaration since it is also
799 required for one of the new subprograms.
801 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
802 (Expand_N_Extended_Return_Statement): Extend the
803 cases covered by an assertion on expected BIP object
805 (Make_Build_In_Place_Call_In_Assignment):
806 Removing unused code; found working on this ticket.
807 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
808 that replaces the internal name of the renaming declaration
809 into the new subprogram Replace_Renaming_Declaration_Id.
810 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
811 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
813 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
815 (Unqual_BIP_Iface_Function_Call): New subprogram.
816 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
817 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
818 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
819 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
820 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
821 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
822 (Expand_N_Indexed_Component): Invoke the new subprogram
823 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
824 (Expand_N_Selected_Component): Invoke the new subprogram
825 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
826 (Expand_N_Slice): Invoke the new subprogram
827 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
828 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
829 Invoke the new subprogram
830 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
832 2017-09-08 Javier Miranda <miranda@adacore.com>
834 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
835 access to interface types. Remove also the accessibility check.
837 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
839 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
840 all the types that are referenced by the expression.
841 (Analyze_Expression_Function): Call Freeze_Expr_Types for
842 a completion instead of manually freezing the type of the
844 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
846 2017-09-08 Ed Schonberg <schonberg@adacore.com>
848 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
849 New procedure, auxiliary to Expand_Pragma_Check, to handle
850 references to the discriminants of a protected type within a
851 precondition of a protected operation. This is needed because
852 the original precondition has been analyzed in the context of
853 the protected declaration, but in the body of the operation
854 references to the discriminants have been replaved by references
855 to the discriminants of the target object, and these references
856 are only created when expanding the protected body.
858 2017-09-08 Yannick Moy <moy@adacore.com>
860 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
863 2017-09-08 Ed Schonberg <schonberg@adacore.com>
865 * exp_attr.adb (Build_Record_VS_Func): If the record is an
866 unchecked union, do not emit checks for its (non-existent)
867 discriminants, or for variant parts that depend on them.
869 2017-09-08 Justin Squirek <squirek@adacore.com>
871 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
872 Find_Comparison_Type.Try_One_Interp): Add check for generic
875 2017-09-08 Arnaud Charlet <charlet@adacore.com>
877 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
878 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
879 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
880 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
881 remaining references to AAMP_On_Target.
883 2017-09-08 Ed Schonberg <schonberg@adacore.com>
885 * style.adb: Fix typo.
887 2017-09-08 Javier Miranda <miranda@adacore.com>
889 * einfo.adb (Underlying_Type): Add missing support for class-wide
890 types that come from the limited view.
891 * exp_attr.adb (Attribute_Address): Check class-wide type
892 interfaces using the underlying type to handle limited-withed
894 (Attribute_Tag): Check class-wide type interfaces using
895 the underlying type to handle limited-withed types.
897 2017-09-08 Ed Schonberg <schonberg@adacore.com>
899 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
900 over a subtype of a type with a static predicate, taking into
901 account the predicate function of the parent type and the bounds
902 given in the loop specification.
903 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
904 a loop specification that is a subtype indication whose type mark
905 is a type with a static predicate, inherit predicate function,
906 used to build case statement for rewritten loop.
908 2017-09-08 Justin Squirek <squirek@adacore.com>
910 * lib-load.adb: Modify printing of error message to exclude file
913 2017-09-08 Arnaud Charlet <charlet@adacore.com>
915 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
916 don't inline subprograms declared in both visible and private
918 (In_Package_Spec): previously In_Package_Visible_Spec; now
919 detects subprograms declared both in visible and private parts
922 2017-09-08 Ed Schonberg <schonberg@adacore.com>
924 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
925 the type is an anonymous array in an object declaration, whose
926 component type has an invariant, use the object declaration
927 as the insertion point for the invariant procedure, given that
928 there is no explicit type declaration for an anonymous array type.
930 2017-09-08 Bob Duff <duff@adacore.com>
932 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
934 2017-09-08 Bob Duff <duff@adacore.com>
936 * a-strfix.adb (Trim): Compute Low and High only if needed.
938 2017-09-08 Justin Squirek <squirek@adacore.com>
940 * lib-load.adb (Load_Main_Source): Add error output in the case a
941 source file is missing.
943 2017-09-08 Bob Duff <duff@adacore.com>
946 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
947 Default_WCEM by default (i.e. if the encoding is not specified
950 2017-09-08 Bob Duff <duff@adacore.com>
952 * s-trasym.ads (Hexa_Traceback): If
953 Suppress_Hex is True, print "..." instead of a hexadecimal
955 * s-trasym.adb: Ignore No_Hex in this version.
958 2017-09-08 Bob Duff <duff@adacore.com>
960 * debug.adb: Minor reformatting.
962 2017-09-08 Bob Duff <duff@adacore.com>
964 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
965 code so it doesn't trigger an "uninit var" warning.
967 2017-09-08 Nicolas Roche <roche@adacore.com>
969 * s-hibaen.ads: Remove obsolete file.
971 2017-09-08 Arnaud Charlet <charlet@adacore.com>
973 * a-locale.ads: Add comment explaining the state of this package.
975 2017-09-08 Arnaud Charlet <charlet@adacore.com>
977 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
979 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
980 allow calls in the context of package spec (for pragma
981 Initializes) and bodies (for pragma Refined_State).
983 2017-09-08 Bob Duff <duff@adacore.com>
985 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
988 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
990 * debug.adb (dA): Adjust comment.
991 * gnat1drv.adb (Gnat1drv): Likewise.
992 * opt.ads (List_Representation_Info_Extended): New variable.
993 * repinfo.adb (List_Record_Info): Split implementation into...
994 (Compute_Max_Length): ...this. Recurse on records if requested.
995 (List_Record_Layout): Likewise.
996 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
997 statement, accept '0' and set List_Representation_Info_Extended
999 * usage.adb (Usage): Document new -gnatRe variant.
1001 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1003 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1004 Do not save the given entity in the global variable Default_Pool
1005 if the pragma appears within a generic unit.
1007 2017-09-08 Bob Duff <duff@adacore.com>
1009 * errout.adb (Delete_Warning): Do not
1010 decrement Warnings_Treated_As_Errors. This is called before
1011 Warnings_Treated_As_Errors has been incremented to account for
1012 this warning. Decrementing it here can lead to negative values
1013 of Warnings_Treated_As_Errors, raising Constraint_Error in
1014 checks-on builds, and causing the compiler to return an error
1015 code in checks-off builds.
1017 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1019 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
1020 entities of named concurrent types as Ref_Id and not of anonymous
1021 concurrent objects (because callers already know when a conversion
1022 is necessary and can easily do it); also, do not expect protected
1023 types or protected objects as Context_Id (because no flow-related
1024 SPARK pragmas are attached there); reflect these changes in a
1025 more precise comment.
1027 2017-09-08 Olivier Hainque <hainque@adacore.com>
1029 * g-altive.ads: Add documentation.
1031 2017-09-08 Bob Duff <duff@adacore.com>
1033 * sem_util.ads, debug.adb: Minor comment fix.
1034 * erroutc.ads: Comment fix.
1036 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1038 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
1039 for compatibility of component types of formal and actual in an
1040 instantiation of a child unit, when the component type of the
1041 formal is itself a formal of an enclosing generic.
1043 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1045 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
1046 sem_prag.adb to make it available for GNATprove; for concurrent
1047 types replace custom scope climbing with Scope_Same_Or_Within; for
1048 single concurrent objects add scope climbing (with Scope_Within),
1049 which was not there (that's the primary semantic change of this
1050 commit); also, when comparing a single concurrent object with
1051 its corresponding concurrent type rely on equality of types,
1052 not of objects (because that's simpler to code).
1053 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
1054 (Analyze_Global_Item): adjust special-casing of references to the
1055 current instance of a concurrent unit in the Global contracts
1056 of task types and single tasks objects; similar for references
1057 in the protected operations and entries of protected types and
1058 single protected objects (in all these cases the current instance
1059 behaves as an implicit parameter and must not be mentioned in
1060 the Global contract).
1062 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1064 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
1065 function calls returning a record within a subprogram call,
1068 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1070 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
1071 name that designates the current instance of a child unit in its
1072 own body and appears as the prefix of a reference to an entity
1073 local to the child unit.
1074 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
1077 2017-09-08 Yannick Moy <moy@adacore.com>
1079 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
1082 2017-09-08 Tristan Gingold <gingold@adacore.com>
1084 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
1085 warnings on internal units in configurable run time mode.
1087 2017-09-08 Bob Duff <duff@adacore.com>
1089 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
1090 representation items from interfaces that the derived type
1091 implements, not just from the parent type.
1092 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
1093 this to return an empty list when there are no interfaces.
1094 * einfo.ads, sem_ch13.adb: Minor comment fixes.
1095 * sem_attr.adb: Minor comment fix.
1097 2017-09-08 Doug Rupp <rupp@adacore.com>
1099 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
1102 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1104 * exp_ch4.adb (Expand_N_Allocator): Generate a
1105 call to Allocate_Any_Controlled when the allocation does not
1106 require any initialization.
1108 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1110 * sem_util.adb (Copy_Node_With_Replacement):
1111 Update the Renamed_Object field of a replicated object renaming
1114 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
1116 * exp_ch9.adb (Is_Pure_Barrier): Allow type
1117 conversions and components of objects. Simplified the detection
1118 of the Count attribute by identifying the corresponding run-time
1121 2017-09-08 Yannick Moy <moy@adacore.com>
1123 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
1124 sem_type.adb, sinfo.ads: Minor reformatting.
1126 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1128 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
1129 of Freeze_Profile, used to inhibit the freezing of the profile
1130 of an expression function declared within a nested package, when
1131 some type in the profile depends on a private type declared in
1132 an enclosing package.
1134 2017-09-08 Bob Duff <duff@adacore.com>
1136 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
1137 the subunit case. It's still OK to set it in the "missing subunits"
1138 case, because that won't cause the obsolete .ali files that cause
1141 2017-09-08 Bob Duff <duff@adacore.com>
1143 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
1144 unclear why this didn't cause a warning.
1145 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
1146 pragmas. It's unclear why this didn't cause an error.
1148 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1150 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
1152 (Expand_SPARK_Potential_Renaming): Code clean up.
1153 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
1154 the item does not have a proper entity.
1155 (Analyze_Input_Item): Add a guard in case the item does not have a
1157 (Collect_States_And_Objects): Include object renamings in the
1158 items being collected.
1159 (Resolve_State): Update the documentation of this routine.
1160 * sem_util.adb (Entity_Of): Add circuitry to handle
1161 renamings of function results.
1162 (Remove_Entity): New routine.
1163 (Remove_Overloaded_Entity): Take advantage of factorization.
1164 * sem_util.ads (Entity_Of): Update the documentation
1166 (Remove_Entity): New routine.
1167 (Remove_Overloaded_Entity): Update the documentation of this
1170 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1172 * repinfo.adb (List_Record_Info): During first loop,
1173 do not override the normalized position and first bit
1174 if they have already been set. Move fallback code
1175 for the packed case to the case where it belongs.
1176 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
1177 Also adjust the normalized position of components.
1178 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
1180 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1182 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
1183 the placement of a primitive operation O that renames an operation
1184 R declared in an inner package, and which is thus not a primitive
1185 of the dispatching type of O. In this case O is a new primitive
1186 and does not inherit its dispatch table position from R (which
1189 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1191 * sem_dim.adb (Analyze_Dimension_If_Expression,
1192 Analyze_Dimension_Case_Expression): new subprograms to verify
1193 the dimensional correctness of Ada2012 conditional expressions,
1194 and set properly the dimensions of the construct.
1195 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
1196 call Analyze_Dimension.
1198 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1200 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
1201 loop on an interface declared as a private extension of another
1202 synchronized interface.
1204 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1206 * sem_ch12.adb (Check_Generic_Parent): New procedure within
1207 Analyze_Associations, to handle actual packages that depend on
1208 previous instances. If a package IAP that is an instantiation is
1209 used as an actual in a subsequent instantiation SI in the same
1210 scope, and IAP has a body, IAP must be frozen before SI. If
1211 the generic parent of IAP is itself declared in a previous
1212 instantiation in the same scope, that instantiation must also
1213 be frozen before SI.
1214 (Install_Body): Prevent double insertion of freeze node for
1217 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1219 * sem_prag.adb (Resolve_State): Update the
1220 comment on documentation. Generate a reference to the state once
1221 resolution takes place.
1223 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1225 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1226 Linker_Section): If the aspect applies to an object declaration
1227 with explicit initialization, do not delay the freezing of the
1228 object, to prevent access-before-elaboration in the generated
1229 initialization code.
1231 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1233 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
1234 (Integer_Value (Item)) when the size of the fixed decimal type
1235 is larger than Integer.
1237 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1240 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
1241 in order of increasing position in more cases.
1243 2017-09-07 Yannick Moy <moy@adacore.com>
1245 * a-exetim-mingw.ads: Add contract Global=>null
1246 on all operations that are modeled as having no read or write
1247 of global variables in SPARK.
1249 2017-09-07 Raphael Amiard <amiard@adacore.com>
1251 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
1252 to Hmaps.Generic_Ops.
1253 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
1255 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
1257 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
1258 position in cursors.
1260 2017-09-07 Javier Miranda <miranda@adacore.com>
1262 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
1263 allow disabling the generation of implicit pragma Elaborate_All
1266 2017-09-07 Javier Miranda <miranda@adacore.com>
1268 * exp_disp.adb (Make_Tags): Avoid suffix counter
1269 in the external name of the elaboration flag. Required to fix
1270 the regressions introduced by the initial version of this patch.
1272 2017-09-07 Bob Duff <duff@adacore.com>
1274 * sem_ch6.adb (Analyze_Function_Return): Do not
1275 insert an explicit conversion to force the displacement of the
1276 "this" pointer to reference the secondary dispatch table in the
1277 case where the return statement is returning a raise expression,
1278 as in "return raise ...".
1280 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1282 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
1283 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
1284 procedure from sem_disp.adb.
1285 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
1287 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
1288 return the instantiation node for subprograms. Update references
1289 to Get_Unit_Instantiation_Node.
1290 * sem_ch7.adb (Install_Parent_Private_Declarations): update
1291 reference to Get_Unit_Instantiation_Node.
1292 * exp_dist.adb (Build_Package_Stubs): update reference to
1293 Get_Unit_Instantiation_Node.
1294 * sem_ch9.adb: minor typo in comment.
1295 * lib-xref-spark_specific.adb
1296 (Traverse_Declaration_Or_Statement): traverse into task type
1299 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1301 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
1302 to handle properly various cases of type conversions where the
1303 target type and/or the expression carry dimension information.
1304 (Dimension_System_Root); If a subtype carries dimension
1305 information, obtain the source parent type that carries the
1308 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
1310 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
1312 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1314 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
1315 If the prefix is a reference to an object, rewrite it as an
1316 explicit dereference, as required by 3.7.2 (2) and as is done
1317 with most other attributes whose prefix is an access value.
1319 2017-09-07 Bob Duff <duff@adacore.com>
1321 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
1322 Refined_Depends aspect.
1323 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
1324 Refined_Depends pragma.
1325 * scans.ads: Fix documentation of Inside_Depends flag.
1326 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
1328 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
1330 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
1331 Account for the case where the are no lists to insert, but the
1332 secondary stack still requires management.
1333 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
1334 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
1335 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
1336 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
1339 2017-09-07 Vincent Celier <celier@adacore.com>
1341 * clean.adb: Do not get the target parameters before calling
1344 2017-09-07 Nicolas Roche <roche@adacore.com>
1346 * s-osinte-solaris-posix.ads: Removed.
1348 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1350 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
1351 single concurrent objects.
1353 2017-09-07 Javier Miranda <miranda@adacore.com>
1355 * s-regexp.ads: Fix documentation of the globbing grammar.
1357 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1359 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
1361 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1363 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
1364 in CodePeer mode, to support more legacy code automatically.
1366 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1368 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
1369 and thus not a controlling argument, preserve its type after
1370 rewriting because it may appear in an nested call with a classwide
1373 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1375 * comperr.adb (Delete_SCIL_Files): Handle case of
1376 N_Package_Instantiation.
1378 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1380 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
1381 clause for a unit U appears in a context that includes a regular
1382 with_clause on U, rewrite the redundant private clause into a null
1383 statement, rather than removing it altogether from the context,
1384 so that ASIS tools can reconstruct the original source.
1386 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1388 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
1389 for aspect Small can be of any real type (not only a universal
1390 real literal) as long as it is a static constant.
1392 2017-09-07 Thomas Quinot <quinot@adacore.com>
1394 * par_sco.adb: Minor reformatting.
1396 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1398 * s-parame-ae653.ads: Removed.
1400 2017-09-07 Nicolas Roche <roche@adacore.com>
1402 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
1403 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
1404 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
1405 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
1406 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
1407 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
1409 2017-09-07 Yannick Moy <moy@adacore.com>
1411 * a-ngelfu.ads Add preconditions to all functions
1412 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
1414 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1416 * lib-xref.adb (Generate_Reference): ignore
1417 references to entities which are Part_Of single concurrent
1420 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1422 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
1425 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1427 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
1428 Null_Task_Id is passed.
1430 2017-09-07 Javier Miranda <miranda@adacore.com>
1432 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
1433 attribute. Defined for record types and subtypes.
1434 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
1435 (Init_Tags_List) to facilitate generating separate code in the
1436 IP routine to initialize the object components and for completing
1437 the elaboration of dispatch tables.
1438 * exp_ch3.adb (Build_Init_Procedure): Improve the code
1439 generated in the IP routines by means of keeping separate
1440 the initialization of the object components from the
1441 initialization of its dispatch tables. (Init_Secondary_Tags):
1442 Adding new formal (Init_Tags_List) and adjusting calls to
1443 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
1444 adjusting also calls to Ada.Tags.Register_Interface_Offset
1445 because the type of one of its formals has been changed.
1446 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
1447 modified. Instead of receiving a pointer to an object this
1448 routine receives now a primary tag.
1449 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
1450 additional formal: the tag of the primary dispatch table.
1451 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
1452 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
1453 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
1454 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
1455 formal in calls to Init_Secondary_Tags.
1457 2017-09-07 Javier Miranda <miranda@adacore.com>
1459 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
1461 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
1462 applied to generic subprograms.
1464 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1466 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
1467 (because it refers to the anonymous concurrent object, not its type);
1468 fix condition for emitting error message about task/protected type,
1470 2017-09-07 Bob Duff <duff@adacore.com>
1472 * binde.adb (Debug_Flag_Old): If both -do and -dp
1473 are specified, behave as if just -do was specified, rather than
1476 2017-09-07 Nicolas Roche <roche@adacore.com>
1478 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
1479 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
1481 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1483 * sem_prag.adb (Find_Role): The Global_Seen flag
1484 is now consulted not only for abstract states and variables,
1485 but for all kinds of items.
1486 (Collect_Subprogram_Inputs_Outputs): Do not process formal
1487 generic parameters, because unlike ordinary formal parameters,
1488 generic formals only act as input/ outputs if they are explicitly
1489 mentioned in a Global contract.
1491 2017-09-07 Yannick Moy <moy@adacore.com>
1493 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
1494 predicate procedure. Check predicate pragma/aspect with Ghost entity.
1495 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
1498 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1500 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
1502 * sem_ch3.adb (Build_Derived_Record_Type):i Call
1503 Copy_Dimensions_Of_Components after creating the copy of the
1505 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
1506 derived recor type, copy the dikensions if any of each component
1507 of the parent record to the corresponding component declarations
1508 of the derived record. These expressions are used among other
1509 things as default values in aggregates with box associations.
1510 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
1511 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
1514 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1516 * sem_util.adb: Remove extra space after THEN.
1518 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1520 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
1521 also mark the renamed subprogram as referenced.
1523 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1525 * par-ch6.adb (P_Subprogram): Improve error message on null
1526 procedure with misplaced aspect specification, which the parser
1527 first attempts to interpret as a malformed expression function.
1529 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1531 * sem_attr.adb (Analyze_Attribute_Old_Result):
1532 Allow attributes Result and Old in the case of an expression
1535 2017-09-07 Justin Squirek <squirek@adacore.com>
1537 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
1538 Volatile to subcomponents.
1540 2017-09-07 Bob Duff <duff@adacore.com>
1542 * exp_ch7.adb (Find_Last_Init): Check for the
1543 case where a build-in-place function call has been replaced by a
1544 'Reference attribute reference.
1546 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1548 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
1551 2017-09-07 Bob Duff <duff@adacore.com>
1553 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
1554 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
1555 secondary stack for all functions that return limited tagged
1556 types -- just do it for dispatching calls. Misc cleanup.
1557 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
1558 remove qualifications and type conversions. Fix various bugs
1559 where only a single level of qualification or conversion was
1560 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
1562 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
1565 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1567 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
1568 do not create actual subtypes that may generate further predicate
1570 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
1571 of body is a predicate function as well.
1572 (Resolve_Aspect_Expressions, Resolve_Name): For a component
1573 association, only the expression needs resolution, not the name.
1574 (Resolve_Aspect_Expressions, case Predicates): Construct and
1575 analyze the predicate function declaration in the scope of the
1576 type, before making the type and its discriminants visible.
1578 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1580 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
1581 only if the record type itself comes from source.
1583 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1585 * sem_ch5.adb: Minor reformatting and a typo fix
1587 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1589 * sinput-l.ads: minor remove extra period at the end of comment
1591 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1593 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
1595 (Find_Role): remove support for E_Discriminant.
1597 2017-09-06 Javier Miranda <miranda@adacore.com>
1599 * exp_ch6.adb (Expand_Simple_Function_Return):
1600 Add missing implicit type conversion to force displacement of the
1603 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1605 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
1607 2017-09-06 Yannick Moy <moy@adacore.com>
1609 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
1610 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
1612 2017-09-06 Bob Duff <duff@adacore.com>
1614 * sem_ch8.adb: Change Assert to be consistent with
1617 2017-09-06 Bob Duff <duff@adacore.com>
1619 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
1620 requested. Previously, the -do switch meant "run Elab_New and
1621 Elab_Old and use the order chosen by Elab_Old, possibly with
1622 debugging printouts comparing the two orders." Now it means
1623 "do not run Elab_New." This is of use if there are bugs that
1624 cause Elab_New to crash.
1625 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
1627 * ali.ads (Elab_Position): Change type to Nat, to avoid various
1630 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1632 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
1633 reference to SPARK RM.
1635 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1637 * layout.adb: Use SSU short hand consistently throughout the file.
1639 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1641 * freeze.adb (Freeze_Record_Type)
1642 <Sized_Component_Total_Round_RM_Size>: New local variable to
1643 accumulate the rounded RM_Size of components. Update it for
1644 every component whose RM_Size is statically known. Add missing
1645 guard to check that bit packing is really required before issuing
1646 the error about packing. Swap condition for clarity's sake.
1647 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
1649 2017-09-06 Fedor Rybin <frybin@adacore.com>
1651 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
1652 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
1653 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
1654 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
1655 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
1656 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
1657 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
1658 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
1659 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
1660 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
1661 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
1662 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
1663 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
1664 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
1665 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
1666 project manager sources.
1668 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1670 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
1671 entity of a mutable type and the right-hand side is a conditional
1672 expression, resolve the alternatives of the conditional using
1673 the base type of the target entity, because the alternatives
1674 may have distinct subtypes. This is particularly relevant if
1675 the alternatives are aggregates.
1677 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1679 * checks.adb (Apply_Predicate_Check): If the expression is an
1680 aggregate that is the RHS of an assignment, apply the check to
1681 the LHS after the assignment, rather than to the aggregate. This
1682 is more efficient than creating a temporary for the aggregate,
1683 and prevents back-end crashes when the aggregate includes a
1684 dynamic "others' association.
1686 2017-09-06 Yannick Moy <moy@adacore.com>
1688 * sem_ch12.adb (Analyze_Instance_And_Renamings):
1689 Set variable to ignore SPARK_Mode in instance before the analysis
1690 of the generated package declaration.
1692 2017-09-06 Yannick Moy <moy@adacore.com>
1694 * sem_res.adb (Resolve_Call): Do not issue a
1695 message for calls inside expression function, unless body was
1696 seen and is candidate for inlining.
1698 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1700 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
1701 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
1702 body. do not freeze the formals of the generic unit.
1704 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1706 * errout.adb (Error_Msg): Separate the
1707 treatment for warning vs. style messages in inlinings and
1708 instantiations. Prevents blowups on calls to Warn_Insertion for
1709 style messages, which should not be called in that case because
1710 Warning_Msg_Char is not set.
1712 2017-09-06 Justin Squirek <squirek@adacore.com>
1714 * sem_prag.adb (Check_VFA_Conflicts): Created
1715 to group all Volatile_Full_Access checks relating to other
1716 representation pragmas (Mark_Component_Or_Object): Created
1717 to centeralize the flagging of attributes for the record type
1718 component case, a pragma applied individually to a component, and
1720 (Process_Atomic_Independent_Shared_Volatile):
1721 Add propagation of certain pragmas to record components and move
1722 evaluation of VFA checks
1724 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1726 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
1727 Do not warn on conditions that are not obeyed for Inline_Always
1728 subprograms, when assertions are not enabled.
1730 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1732 * sem_util.adb (Unique_Entity): For abstract states return their
1735 2017-09-06 Bob Duff <duff@adacore.com>
1737 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
1738 that is a proper body corresponding to a stub, we defer the
1739 adjustment of the sloc until after the correct adjustment has
1740 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
1741 the adjustment, because it will be outside the range in (the old,
1742 incorrect) S_Adjustment.
1743 * inline.adb: Use named notation for readability and uniformity.
1744 * sinput-l.adb: Minor improvements to debugging output printed
1746 * sinput-l.ads (Create_Instantiation_Source): Minor comment
1749 2017-09-06 Vincent Celier <celier@adacore.com>
1751 * make.adb: Do not invoke gprbuild for -bargs -P.
1753 2017-09-06 Sylvain Dailler <dailler@adacore.com>
1755 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
1756 case when Op is of kind N_Qualified_Expression. In this case,
1757 the function is called recursively on the subexpression like in
1759 * make.adb: Minor reformatting
1761 2017-09-06 Justin Squirek <squirek@adacore.com>
1763 * einfo.adb (Set_Linker_Section_Pragma): Modify
1764 Set_Linker_Section_Pragma to be consistant with the "getter"
1765 Linker_Section_Pragma.
1766 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
1767 checking for container loops so that the index cursor is not
1768 directly changable by the user with the use of E_Loop_Parameter.
1769 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
1770 * sem_warn.adb (Check_References): Revert previous change.
1772 2017-09-06 Bob Duff <duff@adacore.com>
1774 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
1777 2017-09-06 Yannick Moy <moy@adacore.com>
1779 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
1780 declarations to only consider valid uses of Global/Depends those on
1781 single concurrent objects.
1783 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1785 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
1786 error as soon as one of the specified components overlaps the
1789 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1791 * sem_prag.ads: minor fix typo in comment.
1793 2017-09-06 Justin Squirek <squirek@adacore.com>
1795 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
1796 from source before checking source references.
1797 * sem_warn.adb (Check_References): Add check for internal block
1800 2017-09-06 Vincent Celier <celier@adacore.com>
1802 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
1803 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
1804 gnatname.adb: Remove the Project Manager from the GNAT tools.
1805 * gcc-interface/Makefile.in: ditto.
1807 2017-09-06 Bob Duff <duff@adacore.com>
1809 * sem_util.ads: Minor comment fix.
1811 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1813 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
1814 Generate a freeze node for the actual of a formal package, if
1815 the actual is declared in the same unit and has a corresponding
1816 body, to prevent the current instance from being frozen before
1819 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1821 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
1823 2017-09-06 Yannick Moy <moy@adacore.com>
1825 * sem_warn.adb: Minor refactoring.
1827 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1829 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
1830 to retrieve the inherited classwide precondition/postcondition
1832 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
1833 freezing a subprogram, to complete the generation of the
1834 corresponding checking code.
1836 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1838 * exp_util.adb (Is_Controlled_Indexing): New routine.
1839 (Is_Displace_Call): Use routine Strip to remove indirections.
1840 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
1841 missing case of controlled generalized indexing.
1842 (Is_Source_Object): Use routine Strip to remove indirections.
1843 (Strip): New routine.
1845 2017-09-06 Bob Duff <duff@adacore.com>
1847 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
1848 we include the proper header. Otherwise, we just declare the necessary
1849 things from the capabilities library. This is so we can build on
1850 machines without that library, while still enabling that library.
1851 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
1852 simply return 0 if the library is not present, or not included
1855 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
1857 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
1858 for renamings that involve function calls in prefix form.
1860 2017-09-06 Bob Duff <duff@adacore.com>
1862 * sem_ch3.adb (Analyze_Subtype_Declaration):
1863 Set Has_Delayed_Freeze on a subtype of an incomplete type.
1865 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
1867 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
1868 has no parameter specification and no entry index, use the entry name
1869 as the end of the generated SCO statement.
1871 2017-09-06 Steve Baird <baird@adacore.com>
1873 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
1874 uses of 'Image and related attributes as having side effects in
1875 order to avoid replicating such uses.
1876 * pprint.ads (Expression_Image) Add new generic formal flag
1877 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
1878 (eventually) override the default.
1879 * pprint.adb (Expression_Image) If the new flag is set, then
1880 suppress the ".all" suffix when displaying a dereference whose
1881 prefix is a use of a value-capturing compiler temp of the sort
1882 generated by Expr_Util.Remove_Side_Effects .
1883 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
1884 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
1886 * inline.adb: Minor wording change.
1888 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1890 * sem_ch7.adb: Update comment.
1892 2017-09-06 Yannick Moy <moy@adacore.com>
1894 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
1895 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
1896 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
1897 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
1898 so that applies to any entity.
1900 2017-09-06 Yannick Moy <moy@adacore.com>
1902 * sem_ch3.adb (Derived_Type_Declaration): Use
1903 Incomplete_Or_Partial_View rather than local Find_Partial_View.
1905 2017-09-06 Javier Miranda <miranda@adacore.com>
1907 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
1910 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1912 * sem_dim.adb (Analyze_Dimension): In an instance, a type
1913 conversion takes its dimensions from the expression, not from
1915 (Dimensions_Of_Operand): Ditto.
1917 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1919 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
1920 null procedures when GNAT coverage is used, so that their (empty)
1921 bodies are properly covered.
1923 2017-09-06 Bob Duff <duff@adacore.com>
1925 * sem_ch13.adb (Resolve_Aspect_Expressions): If
1926 the entity is a type with discriminants, make the discriminants
1927 directly visible in aspect clauses.
1929 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1931 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
1932 Universal_Real and the context is a floating-point type, resolve
1933 both operands to the target type.
1935 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1937 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
1938 sem_ch3.adb, sem_util.adb: Minor reformatting.
1940 2017-09-06 Yannick Moy <moy@adacore.com>
1942 * freeze.adb (Check_Inherited_Conditions): Rewriting
1943 of inherited preconditions and postconditions should only occur
1944 in GNATprove mode, that is, when GNATprove_Mode is True, not to
1945 be confused with SPARK_Mode being On.
1947 2017-09-06 Yannick Moy <moy@adacore.com>
1949 * sem_warn.adb (Check_References): Take into
1950 account possibility of attribute reference as original node.
1952 2017-09-06 Yannick Moy <moy@adacore.com>
1954 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
1957 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1959 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
1960 on the procedure created to encapsulate the body.
1961 * sem_ch7.adb: Add with clause for GNAT.HTable.
1962 (Entity_Table_Size): New constant.
1963 (Entity_Hash): New function.
1964 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
1965 (Is_Subprogram_Ref): Rename into...
1966 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
1967 the table instead of bailing out on them. Scan the value of constants
1968 if it is not known at compile time.
1969 (Contains_Subprograms_Refs): Rename into...
1970 (Scan_Subprogram_Refs): ...this.
1971 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
1972 Is_Public flag on subprograms if they are not actually referenced.
1973 (Hide_Public_Entities): Beef up comment on the algorithm.
1974 Reset the table of subprograms on entry.
1976 2017-09-06 Yannick Moy <moy@adacore.com>
1978 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
1980 2017-09-06 Javier Miranda <miranda@adacore.com>
1982 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
1983 cannot handle a type conversion of an array as an aggregate
1986 2017-09-06 Bob Duff <duff@adacore.com>
1988 * g-comlin.adb (Try_Help): Remove ".exe" so we
1989 get the same results on windows and unix.
1991 2017-09-06 Justin Squirek <squirek@adacore.com>
1993 * exp_imgv.adb (Expand_Image_Attribute),
1994 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
1995 Added case to handle new-style 'Image expansion
1996 (Rewrite_Object_Image): Moved from exp_attr.adb
1997 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
1998 attribute cases so that the relevant subprograms in exp_imgv.adb
1999 handle all expansion.
2000 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
2001 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
2002 cases to call common function Analyze_Image_Attribute.
2003 (Analyze_Image_Attribute): Created as a common path for all
2004 image attributes (Check_Object_Reference_Image): Removed
2005 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2006 Removed and refactored into Is_Object_Image (Is_Object_Image):
2007 Created as a replacement for Is_Image_Applied_To_Object
2009 2017-09-06 Yannick Moy <moy@adacore.com>
2011 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
2012 message for missing input.
2014 2017-09-06 Yannick Moy <moy@adacore.com>
2016 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
2017 of protected subprograms and entries.
2018 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
2019 New function to detect when a subprogram of entry is defined
2020 inside a protected object.
2022 2017-09-06 Bob Duff <duff@adacore.com>
2024 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
2025 whether the current process has the CAP_SYS_NICE capability.
2026 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
2027 ceiling priorities if the current process has the CAP_SYS_NICE
2030 2017-09-06 Bob Duff <duff@adacore.com>
2032 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
2033 check back to the body, because SPARK is not yet ready for
2034 "or else raise Constraint_Error".
2036 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2038 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
2039 procedure by a single null statement, after evaluating the
2040 actuals that require it.
2042 2017-09-06 Javier Miranda <miranda@adacore.com>
2044 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
2045 Generating C code improve the code that checks the use of nested
2046 aggregates to initialize object declarations.
2048 2017-09-06 Yannick Moy <moy@adacore.com>
2050 * sem_ch3.adb (Derived_Type_Declaration): Detect
2051 violations of new rule SPARK RM 3.4(1). Also refactor existing
2052 check to use the new function Find_Partial_View.
2054 2017-09-06 Vincent Celier <celier@adacore.com>
2056 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
2057 from the Prj hierarchy has been removed from the GNAT driver.
2059 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2061 * sem_type.adb (Interface_Present_In_Ancestor): Within an
2062 expression function, or within a spec expression (default value,
2063 etc) a reference to an incomplete type is legal: legality of
2064 the operation will be checked when some related entity (type,
2065 object or subprogram) is frozen.
2067 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2069 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
2070 adjustments and a typo fix.
2072 2017-09-06 Yannick Moy <moy@adacore.com>
2074 * sem_res.adb (Resolve_Call): Do not issue info
2075 message about inlining of calls to functions in assertions,
2076 for functions whose body has not been seen yet.
2078 2017-09-06 Bob Duff <duff@adacore.com>
2080 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
2081 we can use modern Ada in this package.
2082 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
2083 Move Ada.Command_Line.Response_File to System.Response_File,
2084 and make Ada.Command_Line.Response_File into a rename of
2085 System.Response_File. This is to avoid having gnatbind depend
2086 Ada.Command_Line, which would damage the bootstrap process now
2087 that Ada.Command_Line contains modern Ada (the raise expression).
2088 * gnatbind.adb: Avoid dependence on
2089 Ada.Command_Line. Depend on System.Response_File instead
2090 of Ada.Command_Line.Response_File. Change one call to
2091 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
2092 to Ada.Command_Line.Argument_Count to use Arg_Count.
2093 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
2095 2017-09-06 Bob Duff <duff@adacore.com>
2097 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
2098 switch, because we've already read gnat.adc by default.
2100 2017-09-06 Bob Duff <duff@adacore.com>
2102 * exp_ch5.adb (Get_Default_Iterator): Replace
2103 "Assert(False)" with "return Iter", because if an iterable
2104 type is derived from a noniterable one, then we won't find an
2105 overriding or inherited default iterator.
2107 2017-09-06 Yannick Moy <moy@adacore.com>
2109 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
2110 literal index used to access a string is null or negative.
2112 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2114 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
2115 allowed on loop parameters.
2116 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
2118 (Write_Field15_Name): Update the output for
2119 Status_Flag_Or_Transient_Decl.
2120 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
2121 to loop parameters. Update the documentation of the attribute
2122 and the E_Loop_Parameter entity.
2123 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
2124 which assumes that cursors can never be controlled.
2125 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
2126 guard which assumes that cursors can never be controlled.
2128 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2130 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
2131 sem_warn.adb: Minor reformatting.
2133 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2135 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
2136 fix and preserve older GNAT warning on overlapping actuals that
2137 are not elementary types.
2139 2017-09-06 Justin Squirek <squirek@adacore.com>
2141 * sem_attr.adb: Comment correction.
2143 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2145 * sem_util.adb: Minor reformatting.
2147 2017-09-06 Yannick Moy <moy@adacore.com>
2149 * a-comlin.ads (Argument): Add precondition for analysis.
2151 2017-09-06 Yannick Moy <moy@adacore.com>
2153 * sem_res.adb (Resolve): Update message for function call as statement.
2155 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2157 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
2158 generated bodies for renamings that are completions, when renamed
2159 procedure is No_Return.
2160 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
2161 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
2162 with No_Return, the renamed entity must be No_Return as well.
2164 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2166 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
2169 2017-09-06 Justin Squirek <squirek@adacore.com>
2171 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2172 attribute cases (Rewrite_Object_Reference_Image): Created to
2173 aid the rewriting of new-style 'Image attributes.
2174 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
2175 (Check_Object_Reference_Image): Created to handle verification of
2176 'Image with object-references as prefixes.
2177 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2178 Create predicate to identify cases where an 'Image attribute's
2179 prefix applies to an object reference.
2181 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2183 * freeze.adb (Freeze_Entity): Do not generate a freeze
2184 node for a generic unit, even if it includes delayed aspect
2185 specifications. Freeze nodes for generic entities must never
2186 appear in the tree that reaches the back-end of the compiler.
2188 2017-09-06 Yannick Moy <moy@adacore.com>
2190 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
2192 2017-09-06 Yannick Moy <moy@adacore.com>
2194 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
2195 to subprograms in other units as possibly inlined.
2197 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2199 * freeze.adb (Freeze_Entity): For a derived type that has no
2200 explicit delayed aspects but may inherit delayed aspects from its
2201 parent type, analyze aspect at freeze point for proper capture
2202 of an inherited aspect.
2204 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2206 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
2207 renamings; also, avoid repeated calls to Renamed_Object when getting
2208 through object renamings.
2210 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2212 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
2213 array type declaration in a private part, when an index is a
2214 subtype indication of a discrete type with a private partial view.
2216 2017-09-06 Javier Miranda <miranda@adacore.com>
2218 * exp_ch4.adb (Expand_Modular_Op): Force generating
2219 temporary to improve the generated code.
2221 2017-09-06 Tristan Gingold <gingold@adacore.com>
2223 * s-fatgen.adb: Minor typo fix in comment.
2225 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2227 * exp_ch5.adb (Make_Field_Assign): If the type
2228 of the right-hand side has stored constraint, use its values
2229 (except for those that are renamings of parent discriminants)
2230 to produce additional assignments for the discriminants of the
2231 left-hand side, which are invisible in the righ-hand side and
2232 not retrievable as selected components.
2234 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2236 * sem_util.adb (Needs_One_Formal): The first formal of such a
2237 function must be a controlling formal, so that Obj.F (X, Y)
2238 can have the interpretation F(Obj)(X, Y).
2239 * sem_util.ads: Clarify documentation.
2241 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2243 * table.ads, table.adb: Restore original implementation.
2244 * namet.h (Names_Ptr): Adjust back.
2245 (Name_Chars_Ptr): Likewise.
2246 * uintp.h (Uints_Ptr): Likewise.
2247 (Udigits_Ptr): Likewise.
2248 * g-table.ads: Remove pragma Compiler_Unit_Warning.
2249 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
2250 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
2251 * spark_xrefs.ads: Likewise.
2252 * scos.h: Undo latest changes.
2254 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2256 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
2257 No_Return flag to instance if pragma applies to generic unit. This
2258 must be done explicitly because the pragma does not appear
2259 directly in the generic declaration (unlike the corresponding
2260 aspect specification).
2262 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2264 * sem_ch7.adb (Has_Referencer): Move up and expand comment
2265 explaining the test used to detect inlining. Use same test
2266 in second occurrence.
2267 (Analyze_Package_Body_Helper): Minor formatting fixes.
2269 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2271 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
2272 derived type with a mixture of renamed and constrained parent
2273 discriminants, the constraint for the target must obtain the
2274 discriminant values from both the operand and from the stored
2275 constraint for it, given that the constrained discriminants are
2276 not visible in the object.
2277 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
2278 side may be derived from that of the left-hand side (as in the
2279 case of an assignment with a change of representation) so the
2280 discriminant to be used in the retrieval of the value of the
2281 component must be the entity in the type of the right-hand side.
2283 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2285 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
2286 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2287 * exp_util.adb (Is_Source_Object): Account for
2288 the cases where the source object may appear as a dereference
2289 or within a type conversion.
2290 * exp_ch6.adb: Fix missing space in error message.
2292 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2294 * sem_prag.adb: Update description of Eliminate.
2296 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2298 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
2299 properly an attribute reference 'Loop_Entry that appears in the
2300 list of indices of an indexed expression, to prevent an infinite
2301 loop in the compiler.
2303 2017-09-06 Bob Duff <duff@adacore.com>
2305 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
2307 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2309 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
2310 in a set membership is an overloaded enumeration literal, and
2311 the type of the alternative is resolved from a previous one,
2312 replace the entity of the alternative as well as the type,
2313 to prevent inconsistencies between the entity and the type.
2315 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2317 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
2318 (No_Component_Reordering_Specified): New switch.
2319 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
2320 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
2321 * bcheck.adb (Check_Consistent_No_Component_Reordering):
2323 (Check_Configuration_Consistency): Invoke it.
2324 * debug.adb (d.r): Toggle the effect of the switch.
2325 (d.v): Change to no-op.
2326 * einfo.ads (Has_Complex_Representation):
2327 Restrict to record types.
2328 (No_Reordering): New alias for Flag239.
2329 (OK_To_Reorder_Components): Delete.
2330 (No_Reordering): Declare.
2331 (Set_No_Reordering): Likewise.
2332 (OK_To_Reorder_Components): Delete.
2333 (Set_OK_To_Reorder_Components): Likewise.
2334 * einfo.adb (Has_Complex_Representation): Expect record types.
2335 (No_Reordering): New function.
2336 (OK_To_Reorder_Components): Delete.
2337 (Set_Has_Complex_Representation): Expect base record types.
2338 (Set_No_Reordering): New procedure.
2339 (Set_OK_To_Reorder_Components): Delete.
2340 (Write_Entity_Flags): Adjust to above change.
2341 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
2342 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
2343 OK_To_Reorder_Components on record types with convention Ada.
2344 * lib-writ.adb (Write_ALI): Deal with NC marker.
2345 * opt.ads (No_Component_Reordering): New flag.
2346 (No_Component_Reordering_Config): Likewise.
2347 (Config_Switches_Type): Add No_Component_Reordering component.
2348 * opt.adb (Register_Opt_Config_Switches): Copy
2349 No_Component_Reordering onto No_Component_Reordering_Config.
2350 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
2351 (Save_Opt_Config_Switches): Save No_Component_Reordering.
2352 (Set_Opt_Config_Switches): Set No_Component_Reordering.
2353 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
2354 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
2355 No_Reordering flag from the default.
2356 (Build_Derived_Private_Type): Likewise.
2357 (Build_Derived_Record_Type): Likewise. Then inherit it
2358 for untagged types and clean up handling of similar flags.
2359 (Record_Type_Declaration): Likewise.
2360 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
2361 remove redundant test on Is_Tagged_Type.
2362 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
2363 (Sig_Flags): Likewise.
2364 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
2365 (Pragma_Id): Add Pragma_No_Component_Reordering value.
2366 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
2367 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
2368 Copy the layout of the parent type only if the No_Reordering
2370 (components_to_record): Reorder record types with
2371 convention Ada by default unless No_Reordering is set or -gnatd.r
2372 is specified and do not warn if No_Reordering is set in GNAT mode.
2374 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2376 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
2377 new predicate to reject declarations that can be completions,
2378 when there is a visible prior homograph that is a null procedure.
2379 * sem_ch6.adb (Analyze_Null_Procedure): use it.
2380 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
2382 2017-09-06 Thomas Quinot <quinot@adacore.com>
2384 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
2385 run of 253 characters or more.
2387 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2389 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
2390 properly incomplete subtypes that may be created by explicit or
2391 implicit declarations.
2392 (Is_Base_Type): Take E_Incomplete_Subtype into account.
2393 (Subtype_Kind): Ditto.
2394 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
2395 Ekind of a subtype of a discriminated incomplete type.
2396 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
2397 incomplete types, to preserve error reporting.
2398 (Process_Incomplete_Dependents): Do not create a subtype
2399 declaration for an incomplete subtype that is created internally.
2400 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
2401 incomplete subtypes that do not require a completion, either
2402 because they are limited views, of they are generic actuals.
2404 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2406 * checks.adb (Insert_Valid_Check): Remove the
2407 suspicious manipulation of the Do_Range_Check flag as ths is
2408 no linger needed. Suppress validity check when analysing the
2409 validation variable.
2411 2017-09-06 Philippe Gil <gil@adacore.com>
2413 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
2416 2017-09-06 Bob Duff <duff@adacore.com>
2418 * sem_elim.adb: Minor comment fix.
2420 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2422 * sem_util.adb (Is_Object_Reference): A function call is an
2423 object reference, and thus attribute references for attributes
2424 that are functions (such as Pred and Succ) as well as predefined
2425 operators are legal in contexts that require an object, such as
2426 the prefix of attribute Img and the Ada2020 version of 'Image.
2428 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2430 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
2431 exp_ch3.adb, xoscons.adb: Minor reformatting.
2433 2017-09-06 Raphael Amiard <amiard@adacore.com>
2435 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
2436 Position parameter. If supplied, use it to provide efficient iteration.
2437 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
2438 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
2441 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2443 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
2444 designated type is class-wide and the expression is an unchecked
2445 conversion, preserve the conversion when checking the tag of the
2446 designated object, to prevent spurious semantic errors when the
2447 expression in the conversion has an untagged type (for example
2448 an address attribute).
2450 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2452 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
2453 operation is subject to a pragma Eliminate.
2455 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2457 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
2459 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2461 * fe.h (Eliminate_Error_Msg): Remove.
2463 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
2465 * gcc-interface/utils.c (make_packable_type): Update call to
2468 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
2470 * gcc-interface/utils2.c (build_load_modify_store):
2471 Use int_mode_for_size.
2473 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2476 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2477 for Itypes that are E_Record_Subtype with a cloned subtype.
2478 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
2480 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2482 * gcc-interface/trans.c (convert_with_check): Use a custom base type
2483 if the base type of the expression has a different machine mode.
2484 Rename a couple of parameters and local variable.
2486 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2488 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
2489 conversions around prefixes that are not references.
2491 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2493 * gcc-interface/utils.c (unchecked_convert): When the result type is a
2494 non-biased integral type with size 0, set the result to 0 directly.
2496 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2498 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
2499 (renaming_from_instantiation_p): ...this.
2500 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
2501 instead of explicit tests on kind of entities. Adjust for renaming.
2502 (gnat_to_gnu_profile_type): Likewise.
2503 (gnat_to_gnu_subprog_type): Likewise.
2504 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
2505 (Case_Statement_to_gnu): Likewise.
2506 (gnat_to_gnu): Likewise.
2507 (process_freeze_entity): Likewise.
2508 (process_type): Likewise.
2509 (add_stmt_with_node): Adjust for renaming.
2510 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
2511 (renaming_from_generic_instantiation_p): Rename to...
2512 (renaming_from_instantiation_p): ...this. Use inline predicate.
2513 (pad_type_hasher::keep_cache_entry): Fold.
2515 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2517 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
2518 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
2519 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
2520 (N_Slice): Likewise.
2521 (N_Selected_Component): Likewise. Do not try again to translate it.
2522 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
2524 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2526 * repinfo.ads: Document new treatment of dynamic values.
2527 (TCode): Bump upper bound to 29.
2528 (Dynamic_Val): New constant set to 29.
2529 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
2530 (Rep_Value) <Dynamic_Val>: Likewise.
2531 * repinfo.h (Dynamic_Val): New macro.
2532 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
2534 <INTEGER_CST>: Set TCODE instead of recursing.
2535 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
2536 <VAR_DECL>: New case.
2537 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
2538 <BIT_AND_EXPR>: Adjust.
2539 <CALL_EXPR>: Do not fall through.
2541 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2543 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
2544 there is no target, do not create a temporary for the return value for
2545 an allocator either.
2547 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2549 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
2550 unconstrained array type.
2552 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2553 Alan Hayward <alan.hayward@arm.com>
2554 David Sherwood <david.sherwood@arm.com>
2556 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
2557 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
2559 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2560 Alan Hayward <alan.hayward@arm.com>
2561 David Sherwood <david.sherwood@arm.com>
2563 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
2564 is_a <scalar_int_mode>.
2565 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
2566 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
2568 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2569 Alan Hayward <alan.hayward@arm.com>
2570 David Sherwood <david.sherwood@arm.com>
2572 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
2573 instead of mode_for_size.
2574 (gnat_to_gnu_subprog_type): Likewise.
2575 * gcc-interface/utils.c (make_type_from_size): Likewise.
2577 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2578 Alan Hayward <alan.hayward@arm.com>
2579 David Sherwood <david.sherwood@arm.com>
2581 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
2582 (fp_size_to_prec): Likewise.
2584 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2585 Alan Hayward <alan.hayward@arm.com>
2586 David Sherwood <david.sherwood@arm.com>
2588 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
2589 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
2591 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2592 Alan Hayward <alan.hayward@arm.com>
2593 David Sherwood <david.sherwood@arm.com>
2595 * gcc-interface/decl.c (validate_size): Update use of
2596 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
2598 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2599 Alan Hayward <alan.hayward@arm.com>
2600 David Sherwood <david.sherwood@arm.com>
2602 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
2603 (fp_size_to_prec): Likewise.
2605 2017-08-29 Martin Liska <mliska@suse.cz>
2608 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
2610 2017-08-08 Martin Liska <mliska@suse.cz>
2612 * gcc-interface/trans.c: Include header files.
2614 2017-07-29 Jakub Jelinek <jakub@redhat.com>
2616 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
2617 as new argument to the imported_module_or_decl debug hook.
2619 2017-07-25 Javier Miranda <miranda@adacore.com>
2621 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
2624 2017-07-19 Jakub Jelinek <jakub@redhat.com>
2626 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
2627 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
2628 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
2630 2017-07-18 Mike Frysinger <vapier@chromium.org>
2632 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
2633 (../../gnatlink$(exeext)): Likewise.
2635 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
2638 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
2639 (Backend_Overflow_Checks): Set to True.
2641 2017-06-23 Jakub Jelinek <jakub@redhat.com>
2643 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
2645 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
2647 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
2649 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
2651 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
2653 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
2654 imported subprograms for the current compilation unit as
2655 definitions. Disable debug info for references to variables.
2656 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
2657 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
2658 not built-in functions to their binding scope.
2659 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
2660 the function as a definition. Update all callers.
2661 (gnat_write_global_declarations): Emit debug info for imported
2662 functions. Filter out external variables for which debug info
2665 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
2668 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
2669 (i[3456]86-pc-gnu): Likewise.
2670 (x86_64 kfreebsd): Likewise.
2672 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2675 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
2677 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2680 * s-interr-hwint.adb: Reinstate.
2681 * gcc-interface/Makefile.in (RTEMS): Use it again.
2683 2017-06-08 Olivier Hainque <hainque@adacore.com>
2685 * vx_crtbegin_auto.c: Update year in copyright notice.
2686 * vx_crtbegin.c: Likewise.
2687 * vx_crtbegin.inc: Likewise.
2688 * vx_crtend.c: Likewise.
2690 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
2692 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
2693 * s-tpopsp-rtems.adb: Delete.
2695 2017-06-02 Olivier Hainque <hainque@adacore.com>
2697 * vx_crtbegin_auto.c: New file.
2698 * vx_crtbegin.c: New file.
2699 * vx_crtbegin.inc: New file.
2700 * vx_crtend.c: New file.
2702 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
2704 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
2705 const qualifiers that cause -Wignored-qualifiers warnings.
2707 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2709 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2710 for Itypes that are E_Access_Subtype.
2711 <E_Access_Subtype>: Use the DECL of the base type directly.
2713 2017-05-22 Ed Schonberg <schonberg@adacore.com>
2714 Eric Botcazou <ebotcazou@adacore.com>
2716 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
2717 limited view may appear in the profile of a function, and a call to
2718 that function in another unit in which the full view is available must
2719 use this full view to spurious type errors at the point of call.
2720 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
2721 of parent body with a with clause for the main unit.
2722 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
2723 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
2724 types declared in external units like types from limited with clauses.
2725 Adjust final processing of defer_limited_with_list accordingly.
2726 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
2727 again to translate the prefix after the field if it is incomplete.
2729 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2731 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
2732 alignment for simple volatile fields and remove associated errors.
2734 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2736 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
2737 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
2739 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
2741 * gcc-interface/utils.c (can_materialize_object_renaming_p):
2742 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
2743 process Original_Node instead of expanded names.
2745 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2747 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
2748 addressability check in the constrained case.
2750 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2752 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
2753 types not coming from a limited context.
2755 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2757 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
2758 the inlined list that are not public.
2759 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
2760 there is a pragma Inline_Always on the subprogram.
2762 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2764 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
2765 <N_Allocator>: Use properly typed constants.
2766 (extract_values): Move around.
2767 (pos_to_constructor): Minor tweaks.
2768 (Sloc_to_locus): Fix formatting.
2769 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
2770 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
2771 (Gigi_Equivalent_Type): Adjust head comment.
2772 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
2774 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2776 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
2777 is a representation clause on an extension, propagate the alignment of
2778 the parent type only if the platform requires strict alignment.
2780 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
2782 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
2783 instead of Word_Size.
2786 2017-03-28 Andreas Schwab <schwab@suse.de>
2789 * system-linux-aarch64-ilp32.ads: New file.
2790 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
2791 from LIBGNAT_TARGET_PAIRS.
2792 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
2793 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
2794 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
2795 or -mabi=ilp32, resp.
2797 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2800 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
2801 instead of Word_Size.
2803 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2805 * raise-gcc.c (exception_class_eq): Make ec parameter const.
2807 2017-05-02 Richard Biener <rguenther@suse.de>
2809 * gcc-interface/misc.c (gnat_post_options): Do not set
2812 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2814 * gcc-interface/trans.c (assoc_to_constructor): Make sure
2815 Corresponding_Discriminant is only called on discriminants.
2816 Skip the saving of the result only for them.
2817 (gnat_to_gnu) <N_Selected_Component>: Likewise.
2818 <N_Unchecked_Type_Conversion>: Translate the result type first.
2819 (gigi): Set TREE_NOTHROW on Begin_Handler.
2820 (stmt_list_cannot_raise_p): New predicate.
2821 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
2822 a cleanup if the statements of the handler cannot raise.
2823 (process_freeze_entity): Use Is_Record_Type.
2824 (process_type): Likewise.
2826 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2828 * einfo.ads (Corresponding_Record_Component): New alias
2829 for Node21 used for E_Component and E_Discriminant.
2830 * einfo.adb (Corresponding_Record_Component): New function.
2831 (Set_Corresponding_Record_Component): New procedure.
2832 (Write_Field21_Name): Handle Corresponding_Record_Component.
2833 * sem_ch3.adb (Inherit_Component): Set
2834 Corresponding_Record_Component for every component in
2835 the untagged case. Clear it afterwards for non-girder
2837 * gcc-interface/decl.c (gnat_to_gnu_entity)
2838 <E_Record_Type>: For a derived untagged type with discriminants
2839 and constraints, apply the constraints to the layout of the
2840 parent type to deduce the layout.
2841 (field_is_aliased): Delete.
2842 (components_to_record): Test DECL_ALIASED_P directly.
2843 (annotate_rep): Check that fields are present except for
2845 (create_field_decl_from): Add DEBUG_INFO_P
2846 parameter and pass it in recursive and other calls. Add guard
2847 for the manual CSE on the size.
2848 (is_stored_discriminant): New predicate.
2849 (copy_and_substitute_in_layout): Consider only
2850 stored discriminants and check that original fields are present
2851 in the old type. Deal with derived types. Adjust call to
2852 create_variant_part_from.
2854 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2856 * exp_ch6.adb (Expand_Call_Helper): When locating the
2857 accessibility entity created for an access parameter, handle
2858 properly a reference to a formal of an enclosing subprogram. if
2859 the reference appears in an inherited class-wide condition, it
2860 is the rewriting of the reference in the ancestor expression,
2861 but the accessibility entity must be that of the current formal.
2863 2017-05-02 Javier Miranda <miranda@adacore.com>
2865 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
2866 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
2867 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
2868 Call Expand_Non_Binary_Modular_Op.
2870 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2872 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
2873 has discriminants, do not override the Stored_Constraint list of
2874 the full view of the derived type with that of the derived type.
2876 2017-05-02 Bob Duff <duff@adacore.com>
2878 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
2880 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2882 * s-os_lib.ads: Minor typo fix.
2884 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2886 * gnatls.adb: Merge and refactor code from Prj.Env and remove
2887 this deprecated dependency.
2889 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2891 * exp_util.ads: minor comment addition.
2893 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2895 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
2896 pastos in part #3 of the head comment.
2898 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2900 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
2901 procedure body for a local (sub)type declaration within a
2902 predicate function. Invariant checks do not apply to these, and
2903 the expansion of the procedure will happen in the wrong scope,
2904 leading to misplaced freeze nodes.
2906 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2908 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
2909 to analyze generated actions. If the main unit is a body,
2910 the required scope is that of the corresponding unit declaration.
2912 2017-05-02 Arnaud Charlet <charlet@adacore.com>
2914 * einfo.adb (Declaration_Node): flip branches of
2915 an IF statement to avoid repeated negations in its condition;
2916 no change in semantics, only to improve readability.
2918 2017-05-02 Arnaud Charlet <charlet@adacore.com>
2920 * sem_case.adb: Remove extra spaces in parameter declarations.
2922 2017-05-02 Justin Squirek <squirek@adacore.com>
2924 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
2925 in usage line for new -gnatwE switch.
2927 2017-05-02 Claire Dross <dross@adacore.com>
2929 * a-cofuve.ads (Remove): Remove unnecessary
2930 conditions in precondition.
2932 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2934 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
2935 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
2937 2017-05-02 Justin Squirek <squirek@adacore.com>
2939 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
2940 alternative expression.
2941 * sem_res.adb (Resolve_Case_Expression): Ditto.
2943 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2945 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
2946 Refine predicate for the case where the primitive operation
2947 is a renaming of equality. An overriding operation that is
2948 a user-defined renaming of predefined equality inherits its
2949 slot from the overridden operation. Otherwise it is treated
2950 as a predefined op and occupies the same predefined slot as
2951 equality. A call to it is transformed into a call to its alias,
2952 which is the predefined equality. A dispatching call thus uses
2953 the proper slot if operation is further inherited and called
2954 with class-wide arguments.
2956 2017-05-02 Justin Squirek <squirek@adacore.com>
2958 * errout.adb (Set_Msg_Text): Add a case to switch the message
2959 type when the character '[' is detected signifying a warning
2960 about a run-time exception.
2961 * opt.ads Add a new Warning_Mode value for new switch
2962 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
2963 to handle new warning mode
2964 * usage.adb (Usage): Add usage entry for -gnatwE
2965 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
2967 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2969 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
2970 declaration that operates on some fixed point type.
2972 2017-05-02 Justin Squirek <squirek@adacore.com>
2974 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
2976 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2978 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
2980 2017-05-02 Justin Squirek <squirek@adacore.com>
2982 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
2983 expression (Analyze_If_Expression): Add check for valid condition
2984 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
2986 * sem_res.adb (Resolve_If_Expression): Add check for valid
2987 condition and then-expression.
2989 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2991 * exp_ch3.adb (Build_Initialization_Call): Generate a null
2992 statement if the initialization call is a null procedure, as
2993 can happen with a controlled type with no explicit Initialize
2994 procedure, or an array of such.
2995 * exp_ch7.adb (Process_Object_Declaration): For a type with
2996 controlled components that has a trivial Initialize procedure,
2997 insert declaration for finalization counter after object
2999 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
3000 finalization block and attendant declarations if component has
3001 a trivial Initialize procedure.
3002 (Make_Init_Call): Do not generate a call if controlled type has
3003 a trivial Initialize procedure.
3005 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3007 * g-forstr.ads (Data): Move Format component last.
3008 * g-forstr.adb ("+"): Adjust for above change.
3009 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
3010 * g-sechas.ads (Context): Move Key last.
3011 * g-socket.ads (Service_Entry_Type): Move Aliases last.
3012 * s-fileio.adb (Temp_File_Record): Move Name last.
3013 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
3014 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
3016 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
3018 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
3019 switch introduced recently. finally not needed.
3021 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3023 * sem_ch6.adb (Analyze_Null_Procedure): Set the
3024 Corresponding_Body link for a null procedure declaration.
3026 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3028 * atree.h (Flag290): Add missing terminating parenthesis.
3029 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
3030 (Set_Is_Class_Wide_Clone): Likewise.
3031 * einfo.ads (Is_Class_Wide_Clone): Likewise.
3033 2017-05-02 Gary Dismukes <dismukes@adacore.com>
3035 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
3036 parameter Array_Comp to indicate the case of an array object
3037 with null-excluding components.
3038 * checks.adb (Null_Exclusion_Static_Checks):
3039 Call Compile_Time_Constraint_Error instead of
3040 Apply_Compile_Time_Constraint_Error in the component case. Also
3041 call that when Array_Comp is True, with an appropriate warning for
3042 the array component case. Only create an explicit initialization
3043 by null in the case of an object of a null-excluding access type
3044 (and no longer do that in the component case).
3045 * sem_ch3.adb (Check_Component): Add a Boolean parameter
3046 Array_Comp defaulted to False. Pass Empty for the Comp
3047 actual when calling Null_Exclusion_Static_Checks in the case
3048 where Comp_Decl matches Object_Decl, because we don't have a
3049 component in that case. In the case of an object or component
3050 of an array type, pass True for Array_Comp on the recursive call
3053 2017-05-02 Bob Duff <duff@adacore.com>
3055 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
3056 compute the linux priority from the Ada priority. Call this everywhere
3057 required. In particular, the previous version was not doing this
3058 computation when setting the ceiling priority in various places. It
3059 was just converting to C.int, which results in a ceiling that is off
3062 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3064 * sem_ch3.adb: Comment predicate inheritance.
3066 2017-05-02 Tristan Gingold <gingold@adacore.com>
3068 * s-trasym.ads: Add comment.
3070 2017-05-02 Bob Duff <duff@adacore.com>
3072 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
3073 * sem_ch4.adb: Minor reformatting.
3074 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
3075 * s-taspri-posix-noaltstack.ads: Minor refactoring.
3076 * sinput.ads: Minor typo fix.
3078 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3080 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
3081 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
3082 here from exp_ch9, to recognize objects whose creation requires
3083 dynamic allocation, so that the proper warning can be emitted
3084 when restriction No_Implicit_Heap_Allocation is in effect.
3085 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
3086 to emit proper warning when an object that requires dynamic
3087 allocation is declared.
3089 2017-05-02 Tristan Gingold <gingold@adacore.com>
3091 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
3093 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3095 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
3096 visibility rules for equality operators that apply within an
3097 instantiation apply within an inlined body.
3098 * sem_type.adb (Add_One_Interp): ditto.
3100 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3102 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
3105 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3108 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
3109 Name_No_Tagged_Streams): Move to regular pragmas. Add
3110 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
3111 and Secondary_Stack_Size.
3112 (Pragma_Id): Move Pragma_Assume,
3113 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
3114 Pragma_No_Tagged_Streams to second part.
3116 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3118 * exp_attr.adb: Minor reformatting.
3120 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3122 * sem_ch4.adb (Analyze_Selected_Component): Improve error
3123 detection for illegal references to private components or
3124 operations of a protected type in the body of the type.
3126 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3128 * opt.ads: Add missing GNAT markers in comments.
3129 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
3130 settings of Optimize_Alignment at the end.
3132 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3134 * checks.adb (Apply_Constraint_Check): Do not apply
3135 a discriminant check when the associated type is a constrained
3136 subtype created for an unconstrained nominal type.
3137 * exp_attr.adb: Minor reformatting.
3139 2017-05-02 Bob Duff <duff@adacore.com>
3141 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
3142 the N_Raise_Expression case.
3143 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
3146 2017-05-02 Yannick Moy <moy@adacore.com>
3148 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
3149 optimize length comparison in GNATprove mode.
3150 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
3151 operator /= into negation of operator = when needed.
3152 (Expand_SPARK): Call new
3153 function to expand operator /=.
3155 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3157 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
3158 Simplify the expression for a fixed-fixed division to remove
3159 divisions by constants whenever possible, as an optimization
3160 for restricted targets.
3162 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3164 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
3166 2017-05-02 Bob Duff <duff@adacore.com>
3168 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
3169 to find primitive ops, instead of using an Identifier that will
3170 later be looked up. This is necessary because these ops are not
3171 necessarily visible at all places where we need to call them.
3172 * exp_util.ads: Minor comment fix.
3174 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3176 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
3177 references are fully conformant if they are both expansions
3178 of the discriminant of a protected type, within one of the
3179 protected operations. One occurrence may be expanded into a
3180 constant declaration while the other is an input parameter to
3181 the corresponding generated subprogram.
3183 2017-05-02 Justin Squirek <squirek@adacore.com>
3185 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
3186 recursivly searching composite-types for null-excluding access
3187 types and verifying them.
3188 (Analyze_Object_Declaration): Add a
3189 call to Check_Null_Excluding_Components for static verification
3190 of non-initialized objects.
3191 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
3192 a parameter for a composite-type's component and an extra case
3193 for printing component information.
3195 2017-05-02 Yannick Moy <moy@adacore.com>
3197 * sem_ch10.adb (Analyze_Subunit): Take
3198 configuration pragma into account when restoring appropriate
3199 pragma for analysis of subunit.
3201 2017-05-02 Justin Squirek <squirek@adacore.com>
3203 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
3204 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
3205 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
3206 clauses from the runtime.
3208 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3210 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
3211 array components specially.
3213 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3215 * sem_ch8.adb (Premature_Usage): If the premature usage of
3216 an entity is as the expression in its own object decaration,
3217 rewrite the reference as Any_Id to prevent cascaded errors or
3218 compiler loops when such an entity is used in an address clause.
3220 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3222 * gcc-interface/decl.c (components_to_record): Add missing guard.
3224 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3226 * gcc-interface/decl.c (components_to_record): Add more comments.
3227 Put back pending fields onto the regular list if the misalignment
3228 happens to cancel itself.
3230 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3232 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
3233 controlling actual in a prefixed call, preserve the original node
3234 information if the prefix itself has been rewritten, for ASIS use.
3236 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3238 * exp_ch6.adb (Insert_Post_Call_Actions):
3239 Code clean up. Insert the post-call actions after an enclosing
3240 procedure call when N denotes a function call and appears as an
3241 actual parameter in the procedure call.
3243 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3245 * freeze.adb (Check_Component_Storage_Order): If there is a clause
3246 for the component, also reject the attribute if the component
3247 doesn't end on a byte boundary and its scalar storage order is
3248 different from that of the enclosing record type.
3250 2017-04-28 Javier Miranda <miranda@adacore.com>
3252 * atree.ads (Info_Messages): Removed.
3253 (Warning_Info_Messages): New counter.
3254 (Report_Info_Messages): New counter.
3255 * err_vars.ads Update documentation.
3256 * errout.adb (Delete_Warning_And_Continuations): Update
3257 Info_Message occurrences.
3258 (Error_Msg_Internal): Update Info_Message occurrences.
3259 (Delete_Warning): Update Info_Message occurrences.
3260 (Write_Error_Summary): Update Info_Message occurrences.
3261 (Output_Messages): Update Info_Message occurrences.
3262 (To_Be_Removed): Update Info_Message occurrences.
3263 (Reset_Warnings): Update Info_Message occurrences.
3264 * errutil.adb (Error_Msg): Update Info_Message occurrences.
3265 (Finalize): Update Info_Message occurrences.
3266 (Initialize): Update Info_Message occurrences.
3267 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
3268 (Compilation_Errors): Update Info_Message_Occurences.
3270 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3272 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
3273 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
3274 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
3275 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
3276 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
3277 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
3279 * sem_eval.adb (Why_Not_Static): Initialize Typ.
3280 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
3282 2017-04-28 Bob Duff <duff@adacore.com>
3284 * sem_util.ads, sem_util.adb (Might_Raise): New function
3285 that replaces Is_Exception_Safe, but has the opposite
3286 sense. Is_Exception_Safe was missing various cases -- calls inside
3287 a pragma Debug, calls inside an 'if' or assignment statement,
3288 etc. Might_Raise now walks the entire subtree looking for things
3290 * exp_ch9.adb (Is_Exception_Safe): Remove.
3291 (Build_Protected_Subprogram_Body): Replace call to
3292 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
3293 constants where possible).
3294 * exp_ch7.adb: Rename Is_Protected_Body -->
3295 Is_Protected_Subp_Body. A protected_body is something different
3298 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3300 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
3301 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
3302 (P_Discrete_Choice_List): Initialize Expr_Node variable.
3303 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
3304 (P_Protected): Likewise.
3305 * sem_case.adb (Check_Duplicates):
3306 Add pragma Warnings on variable.
3307 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
3308 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
3309 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
3310 (Analyze_Exit_Statement): Initialize Scope_Id variable.
3311 (Analyze_Iterator_Specification): Initialize Bas variable.
3312 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
3313 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
3314 (Analyze_Accept_Statement): Initialize Task_Nam.
3316 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3318 * checks.adb (Install_Primitive_Elaboration_Check):
3319 Do not generate an elaboration check if all checks have been
3322 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3324 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3325 Interrupt_Handler and Attach_Handler): Generate reference
3326 to protected operation to prevent spurious warnings about
3327 unreferenced entities. Previous scheme failed with style checks
3330 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3332 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
3333 that follows an expression function must not be relocated to
3334 the generated body, because it applies to the code that follows.
3336 2017-04-28 Gary Dismukes <dismukes@adacore.com>
3338 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
3339 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
3340 code that might violate the more stringent checking for 'Access
3341 introduced in Ada 2005.
3343 2017-04-28 Arnaud Charlet <charlet@adacore.com>
3345 * a-cforse.adb: minor style fix in comment.
3347 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3349 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
3350 initialize Block_Decls variable.
3351 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
3352 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
3353 * exp_disp.adb (Expand_Interface_Actuals): Initialize
3354 Formal_DDT and Actual_DDT variables.
3355 (Expand_Interface_Thunk): Initialize Iface_Formal.
3356 (Make_DT): Initialize Size_Comp.
3357 (Make_Select_Specific_Data_Table): Initialize Decls.
3358 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
3359 Also initialize more RPC_Receiver_* variables.
3360 (Build_To_Any_Function): Initialize Cstr_Formal.
3361 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
3363 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3365 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
3366 node between access types, freeze the designated type as well,
3367 so that dispatch table pointers are created in the proper scope,
3368 and not in the constructed body of the expression function.
3370 2017-04-28 Bob Duff <duff@adacore.com>
3372 * alloc.ads (Nodes_Initial): Go back to previous value. The large
3373 value makes large compilations faster, but small compilations slower.
3375 2017-04-28 Arnaud Charlet <charlet@adacore.com>
3377 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
3379 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3381 * erroutc.adb (Compilation_Errors): Do not consider info messages
3382 as suitable warnings when warnings must be treated as errors.
3383 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
3384 internally-generated packages when outputting completion
3386 * errout.adb (Output_Messages): Do not consider info messages as
3387 suitable warnings when warnings must be treated as errors.
3388 * errutil.adb (Finalize): Do not consider info messages as
3389 suitable warnings when warnings must be treated as errors.
3391 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3393 * warnsw.ads: Minor fix for incorrect wording in comment.
3395 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3397 * sem_res.adb (In_Instance_Code): New predicate in
3398 Valid_Conversion, to determine whether a type conversion appears
3399 as (or within) an actual for a formal object. Type conversions
3400 in instances are not rechecked in Valid_Conversion because
3401 visibility changes between generic location andi instance may
3402 lead to spurious errors, but conversions within an actual must be
3403 fully checked, and they are not fully resolved when pre-analyzing
3406 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3408 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
3409 New_Copy_Tree instead of Relocate_Node as any subsequent copies
3410 of the relocated node will have mangled Parent pointers.
3411 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
3412 tables used in conjunction with entity and itype replication.
3413 (Visit_Entity): Rewrite the restriction on which entities
3414 require duplication. The restriction now includes all types.
3416 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3418 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
3419 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
3420 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
3423 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3425 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
3426 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
3428 2017-04-28 Gary Dismukes <dismukes@adacore.com>
3430 * exp_util.adb: Minor reformatting.
3432 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3434 * sem_ch4.adb: Fix copy/pasto.
3436 2017-04-27 Tristan Gingold <gingold@adacore.com>
3438 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
3439 raise-gcc.c. Fix include search path for raise-gcc.c
3441 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3443 * fe.h (Warn_On_Questionable_Layout): Declare.
3444 * warnsw.ads (Warn_On_Record_Holes): Move down.
3445 (Warn_On_Questionable_Layout): New boolean variable.
3446 (Warning_Record): Add Warn_On_Questionable_Layout field.
3447 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
3448 (Restore_Warnings): Likewise.
3449 (Save_Warnings): Likewise.
3450 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
3451 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
3452 components_to_record.
3453 (gnu_field_to_gnat): New function.
3454 (warn_on_field_placement): Likewise.
3455 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
3456 parameters. Rename local variables and adjust recursive call.
3457 Rework final scan of the field list and implement warnings on the
3458 problematic placement of specific sorts of fields.
3460 2017-04-27 Bob Duff <duff@adacore.com>
3462 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
3463 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
3464 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
3465 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
3466 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
3467 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
3468 For efficiency, cache results of Is_Internal_File_Name and
3469 Is_Predefined_File_Name in the Units table. This avoids a lot
3470 of repeated text processing.
3472 2017-04-27 Emmanuel Briot <briot@adacore.com>
3474 * g-comlin.adb (Sort_Sections): remove useless test.
3476 2017-04-27 Claire Dross <dross@adacore.com>
3478 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
3479 allow the use of regular equality over elements in contracts.
3480 (Formal_Model): Ghost package containing model functions that are
3481 used in subprogram contracts.
3482 (Current_To_Last): Removed, model functions should be used instead.
3483 (First_To_Previous): Removed, model functions should be used instead.
3484 (Strict_Equal): Removed, model functions should be used instead.
3485 (No_Overlap): Removed, model functions should be used instead.
3486 (Equivalent_Keys): Functions over cursors are removed. They were
3487 awkward with explicit container parameters.
3488 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
3489 allow the use of regular equality over elements in contracts.
3490 (Formal_Model): Ghost package containing model functions that
3491 are used in subprogram contracts.
3492 (Current_To_Last): Removed, model functions should be used instead.
3493 (First_To_Previous): Removed, model functions should be used instead.
3494 (Strict_Equal): Removed, model functions should be used instead.
3495 (No_Overlap): Removed, model functions should be used instead.
3497 2017-04-27 Yannick Moy <moy@adacore.com>
3499 * gnat1drv.adb: Code cleanup.
3501 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3503 * exp_util.adb (Replace_Entity): The prefix of a 'Result
3504 attribute reference in a post- condition is the subprogram to
3505 which the condition applies. If the condition is inherited
3506 by a type extension, the prefix becomes a reference to the
3507 inherited operation, but there is no need to create a wrapper
3508 for this operation, because 'Result is expanded independently
3509 when elaborating the postconditions.
3511 2017-04-27 Bob Duff <duff@adacore.com>
3513 * sinput.adb: Minor code cleanup.
3514 * namet.adb (Append): Create faster versions of
3515 Append(String) and Append(Name_Id) by using slice assignment
3517 * sem_util.adb (In_Instance): Speed this up by removing
3518 unnecessary tests; Is_Generic_Instance is defined for all
3520 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
3521 Remove unused function.
3522 * alloc.ads (Nodes_Initial): Use a much larger value, because
3523 the compiler was spending a lot of time copying the nodes table
3524 when it grows. This number was chosen in 1996, so is rather out
3525 of date with current memory sizes. Anyway, it's virtual memory.
3526 Get rid of Orig_Nodes_...; use Node_... instead.
3527 * atree.adb (Lock): Do not release the Nodes tables; it's a
3529 Orig_Nodes_ ==> Nodes_
3530 * nlists.adb: Orig_Nodes_ ==> Nodes_
3531 * g-table.adb: Remove unused "with" clause.
3532 * g-table.ads, table.ads: Remove Big_Table_Type, which should
3533 not be used by clients.
3534 * g-dyntab.adb (Last_Allocated): New function
3535 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
3537 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3539 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
3541 (Subtypes_Statically_Match): Remove duplicate check.
3542 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
3544 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3546 * exp_aggr.adb (Replace_Type): Remove the special processing
3547 for selected components.
3548 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
3549 processing for attributes Fixed_Value and Integer_Value.
3550 * exp_util.adb (Side_Effect_Free): Merge the processing for
3551 qualified expressions, type conversions, and unchecked type
3553 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
3555 * par-ch3.adb (P_Declarative_Items): Merge the processing for
3556 tokens function, not, overriding, and procedure.
3557 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
3558 for qualified expressions, type conversions, and unchecked
3560 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
3561 processing for Ada 83 and instances.
3562 (Object_Access_Level): Merge the processing for indexed components
3563 and selected components.
3564 * uname.adb (Add_Node_Name): Merge the processing for stubs.
3566 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3568 * checks.adb (Install_Primitive_Elaboration_Check):
3569 Do not generate the check when restriction No_Elaboration_Code
3572 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3574 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
3575 of Expand_Dispatching_Call. If the denoted subprogram has a
3576 class-wide precondition, this is the only precondition that
3577 applies to the call, rather that the class-wide preconditions
3578 that may apply to the body that is executed. (This is specified
3581 2017-04-27 Yannick Moy <moy@adacore.com>
3583 * gnat1drv.adb (Adjust_Global_Switches): Issue
3584 a warning in GNATprove mode if the runtime library does not
3585 support IEEE-754 floats.
3587 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3589 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
3590 is itself inherited it does not carry any contract information,
3591 so examine its parent operation which is its Alias.
3593 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3595 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
3596 prefix can be an object reference in which case Obj'Image (X)
3597 can only be interpreted as an indexing of the parameterless
3598 version of the attribute.
3599 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
3600 an indexing or a slice operation if the attribute does not require
3601 parameters. In Ada2012 'Image also belongs in this category,
3602 and A'Image (lo .. hi) is legal and must be parsed as a slice.
3604 2017-04-27 Yannick Moy <moy@adacore.com>
3606 * exp_ch4.adb: Minor reformatting.
3607 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
3608 disable the CodePeer and C generation modes. Similar to the
3609 opposite actions done in CodePeer mode.
3611 2017-04-27 Yannick Moy <moy@adacore.com>
3613 * sem_res.adb: Remove duplicate code.
3614 * sem_attr.adb: Delete duplicate code.
3616 2017-04-27 Bob Duff <duff@adacore.com>
3618 * g-dyntab.adb: Reduce the amount of copying in
3619 Release. No need to copy items past Last.
3621 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3623 * checks.adb Add with and use clauses for Sem_Disp.
3624 (Install_Primitive_Elaboration_Check): New routine.
3625 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
3626 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
3627 processing of 'Elaborated.
3628 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
3631 2017-04-27 Bob Duff <duff@adacore.com>
3633 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
3634 If the table grows and then shrinks back to empty, we won't necessarily
3635 point back to the empty array. Code cleanups.
3636 * sinput.ads: Add 'Base to Size clause to match the declared
3639 2017-04-27 Claire Dross <dross@adacore.com>
3641 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
3642 allow the use of regular equality over elements in contracts.
3643 (Formal_Model): Ghost package containing model functions that
3644 are used in subprogram contracts.
3645 (Current_To_Last): Removed, model functions should be used instead.
3646 (First_To_Previous): Removed, model functions should be used instead.
3647 (Strict_Equal): Removed, model functions should be used instead.
3648 (No_Overlap): Removed, model functions should be used instead.
3649 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
3650 Boolean generic parameter to disable contracts for equivalence
3652 (Witness): Create a witness of a key that is used for handling of
3653 equivalence between keys.
3654 (Has_Witness): Check whether a witness is contained in a map.
3655 (W_Get): Get the element associated to a witness.
3656 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
3658 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
3659 Boolean generic parameter to disable contracts for equivalence
3661 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
3662 of equivalence on functional maps.
3663 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
3664 of equivalence on functional maps.
3666 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3668 * exp_ch9.adb (Expand_Entry_Barrier): Code
3669 cleanup. Do not perform the optimization which removes the
3670 declarations of the discriminant and component renamings when
3671 validity checks on operands and attributes are in effect.
3673 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3675 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
3676 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
3677 a-cfhama.ads, a-cofove.ads: Minor reformatting.
3679 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3681 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
3682 pointer dereference.
3683 * g-spipat.adb (Dump): Code clean up. Protect against a possible
3684 null pointer dereference.
3686 2017-04-27 Bob Duff <duff@adacore.com>
3688 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
3689 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
3690 Free renames Init, since they do the same thing.
3691 * g-table.ads: Default for Table_Low_Bound.
3692 * table.ads: Default for Table_Low_Bound, Table_Initial, and
3695 2017-04-27 Bob Duff <duff@adacore.com>
3697 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
3699 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
3700 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
3701 Reorder code so that above assertions do not fail.
3702 * table.ads: Remove obsolete comment on Locked.
3704 2017-04-27 Claire Dross <dross@adacore.com>
3706 * a-cfdlli.ads: Code cleanup.
3708 2017-04-27 Yannick Moy <moy@adacore.com>
3710 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
3711 when needed for proof. (Expand_SPARK): Call the new procedure.
3712 * exp_util.ads Fix typo.
3714 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3716 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
3719 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3721 * sem_elab.adb Add new type Visited_Element
3722 and update the contents of table Elab_Visited. Various code clean up.
3723 (Check_Elab_Call): Determine whether a prior call to
3724 the same subprogram was already examined within the same context.
3725 (Check_Internal_Call_Continue): Register the subprogram being
3726 called as examined within a particular context. Do not suppress
3727 elaboration warnings.
3729 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3731 * xoscons.adb, osint.ads: Minor reformatting.
3733 2017-04-27 Bob Duff <duff@adacore.com>
3735 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
3736 Table_Count_Type --> Table_Last_Type, because the name
3737 was confusing (a "count" usually starts at zero). Add
3738 functionality supported or needed by other tables packages
3739 (Move, Release_Threshold).
3740 * g-table.ads, g-table.adb: This is now just a thin wrapper
3741 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
3742 or needed by other tables packages (Save, Restore).
3743 * table.ads, table.adb: This is now just a thin wrapper around
3744 * g-table.ads/g-table.adb.
3745 * namet.h, scos.h, uintp.h: These files are reaching into the
3746 private data of some instances of g-table, whose names changed,
3747 so the above change requires some adjustment here. It now uses
3750 2017-04-27 Bob Duff <duff@adacore.com>
3752 * namet.adb, namet.ads: Minor: remove unused procedures.
3754 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3756 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
3757 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
3758 Add pragma Warnings on Rtype variable in nested block. *
3759 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
3760 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
3761 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
3762 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
3763 (Process_Component_List_For_Finalize): Initialize Counter_Id.
3764 (Build_Finalize_Statements): Initialize Bod_Stmts.
3765 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
3767 2017-04-27 Claire Dross <dross@adacore.com>
3769 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
3770 allow the use of regular equality over elements in contracts.
3771 (Formal_Model): Ghost package containing model functions that are
3772 used in subprogram contracts.
3773 (Current_To_Last): Removed, model
3774 functions should be used instead.
3775 (First_To_Previous): Removed, model functions should be used instead.
3776 (Strict_Equal): Removed, model functions should be used instead.
3777 (No_Overlap): Removed, model functions should be used instead.
3778 (Equivalent_Keys): Functions over cursors are removed. They were
3779 awkward with explicit container parameters.
3780 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
3781 (proof only) procedure to help GNATprove when equivalence over
3782 keys is not equality.
3784 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3786 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
3787 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
3788 Minor reformatting and code cleanups.
3790 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3792 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
3793 subsidiary of Check_Inherited_Conditions, to build pragmas for an
3794 operation whose ancestor has classwide pre/postconditions. This
3795 is used both to check the legality of the inheritance in Ada
3796 and in SPARK, and to determine whether a wrapper is needed for
3797 an inherited operation.
3798 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
3799 Improve placement of error message for inherited classwide
3800 conditions that become illegal on type derivation.
3802 2017-04-27 Yannick Moy <moy@adacore.com>
3804 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
3805 SPARK_Mode from context on generic package.
3806 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
3809 2017-04-27 Claire Dross <dross@adacore.com>
3811 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
3812 overflows in computations.
3813 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
3814 overflows in computations.
3815 (Insert): Rewrite precondition to avoid overflows in computations.
3816 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
3817 overflows in computations.
3818 (Insert): Rewrite precondition to avoid overflows in computations.
3820 2017-04-27 Steve Baird <baird@adacore.com>
3822 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
3823 flag when it is declared in order to avoid confusing CodePeer about
3824 the possibility of an uninitialized variable read.
3826 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3828 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
3829 no dimensionality error if the subtype of the expression is
3830 identical to the nominal subtype in the declaration, even though
3831 the expression itself may have been constant-folded and lack a
3833 * sem_dim.ads: Add comments on setting of dimension vectors and
3834 its interaction with node rewritings and side-effect removal.
3836 2017-04-27 Bob Duff <duff@adacore.com>
3838 * debug.adb: Minor comment correction.
3839 * sem_dim.ads: Minor reformatting and typo fixes.
3841 2017-04-27 Bob Duff <duff@adacore.com>
3843 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
3844 Last of the tables via function calls, rather than relying on layout
3847 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3849 * exp_util.adb: No wrapper in GNATprove mode.
3851 2017-04-27 Yannick Moy <moy@adacore.com>
3853 * sem_res.adb (Resolve_Comparison_Op): Always
3854 evaluate comparisons between values of universal types.
3856 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3858 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
3859 an elaboration counter nor a check when in GNATprove mode.
3860 * sem_util.adb (Build_Elaboration_Entity): Do not create an
3861 elaboration counter when in GNATprove mode.
3863 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3865 * freeze.adb: copy-paste typo.
3867 2017-04-27 Yannick Moy <moy@adacore.com>
3869 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
3870 Use correct test to detect call in GNATprove mode instead of
3873 2017-04-27 Claire Dross <dross@adacore.com>
3875 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
3876 New property function expressing that the element of a
3877 sequence are contained in the union of two sequences.
3878 (Formal_Model.M_Elements_Included): New property function
3879 expressing that the element of a sequence are another sequence.
3880 (Generic_Sorting): Use new property functions to state that
3881 elements are preserved by Sort and Merge.
3882 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
3883 allow the use of regular equality over elements in contracts.
3884 (Formal_Model): Ghost package containing model functions
3885 that are used in subprogram contracts. (Capacity):
3886 On unbounded containers, return the maximal capacity.
3887 (Current_To_Last): Removed, model functions should be used instead.
3888 (First_To_Previous): Removed, model functions should be used instead.
3889 (Append): Default parameter value replaced
3890 by new wrapper to allow more precise contracts.
3891 (Insert): Subprogram restored, it seems it was useful to users even if
3893 (Delete): Subprogram restored, it seems it was useful to users even if
3895 (Prepend): Subprogram restored, it seems it was useful to users even
3896 if it is inefficient.
3897 (Delete_First): Subprogram restored, it seems it
3898 was useful to users even if it is inefficient. (Delete_Last):
3899 Default parameter value replaced by new wrapper to allow more
3901 (Generic_Sorting.Merge): Subprogram restored.
3902 * a-cfinve.adb, a-cfinve.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
3909 (First_To_Previous): Removed, model functions should be used instead.
3910 (Append): Default parameter value replaced
3911 by new wrapper to allow more precise contracts.
3912 (Insert): Subprogram restored, it seems it was useful to users even if
3914 (Delete): Subprogram restored, it seems it was useful to users even if
3916 (Prepend): Subprogram restored, it seems it was useful to users even
3917 if it is inefficient.
3918 (Delete_First): Subprogram restored, it seems it
3919 was useful to users even if it is inefficient. (Delete_Last):
3920 Default parameter value replaced by new wrapper to allow more
3922 (Generic_Sorting.Merge): Subprogram restored.
3923 (Vector): Do not reuse formal vectors, as it is no longer possible
3924 to supply them with an equality function over elements.
3926 2017-04-27 Bob Duff <duff@adacore.com>
3928 * g-dyntab.adb (Release): When allocating the new
3929 table, use the correct slice of the old table to initialize it.
3931 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3933 * einfo.ads: Minor fixes in comments.
3935 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3937 * sem_prag.adb: disable clones in SPARK_Mode.
3939 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3941 * sem_util.ads, contracts.adb: Minor reformatting.
3943 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3945 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
3946 Build body of subprogram that has a class-wide condition that
3947 contains calls to other primitives.
3948 (Build_Class_Wide_Clone_Call); Build a call to the common
3949 class-wide clone of a subprogram with classwide conditions. The
3950 body of the subprogram becomes a wrapper for a call to the
3951 clone. The inherited operation becomes a similar wrapper to which
3952 modified conditions apply, and the call to the clone includes
3953 the proper conversion in a call the parent operation.
3954 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
3955 subprogram that has a classwide condition that contains calls to
3956 other primitives, build an internal subprogram that is invoked
3957 through a type-specific wrapper for all inherited subprograms
3958 that may have a modified condition.
3959 * sem_prag.adb (Check_References): If subprogram has a classwide
3960 condition, create entity for corresponding clone, to be invoked
3961 through wrapper subprograns.
3962 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
3963 message about placement if pragma isi internally generated.
3964 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
3965 a classwide clone, build body of clone as copy of original body,
3966 and rewrite original body as a wrapper as a wrapper for a call to
3967 the clone, so that it incorporates the original pre/postconditions
3969 * freeze.adb (Check_Inherited_Conditions): For an inherited
3970 subprogram that inherits a classwide condition, build spec and
3971 body of corresponding wrapper so that call to inherited operation
3972 gets the modified conditions.
3973 * contracts.adb (Analyze_Contracts): If analysis of classwide
3974 condition has created a clone for a primitive operation, analyze
3975 declaration of clone.
3977 2017-04-27 Steve Baird <baird@adacore.com>
3979 * exp_util.adb (Build_Allocate_Deallocate_Proc):
3980 Add "Suppress => All_Checks" to avoid generating unnecessary
3983 2017-04-27 Yannick Moy <moy@adacore.com>
3985 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
3986 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
3987 inlining body in GNATprove mode when switch -gnatdm used.
3988 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
3989 in GNATprove mode when switch -gnatdm used.
3991 2017-04-27 Arnaud Charlet <charlet@adacore.com>
3993 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
3994 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
3995 clauses, so that we keep an indication of the address clause
3996 before removing it from the tree.
3998 2017-04-27 Yannick Moy <moy@adacore.com>
4000 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
4001 of expression being qualified, when not an object name, or else
4002 evaluate the underlying name.
4004 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
4006 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
4008 2017-04-27 Justin Squirek <squirek@adacore.com>
4010 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
4011 Process_Component_List_For_Finalization as a local variable.
4012 (Process_Component_For_Finalize): Add an extra parameter to avoid
4014 (Process_Component_List_For_Finalization): Correct calls to
4015 Process_Component_For_Finalize to take Num_Comps as a parameter.
4017 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4019 * sem_ch8.adb (Find_Direct_Name): Account for the case where
4020 a use-visible entity is defined within a nested scope of an
4021 instance when giving priority to entities which were visible in
4022 the original generic.
4023 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
4025 2017-04-27 Tristan Gingold <gingold@adacore.com>
4027 * raise-gcc.c: Don't use unwind.h while compiling
4028 for the frontend, but mimic host behavior.
4030 2017-04-27 Javier Miranda <miranda@adacore.com>
4032 * sem_ch3.adb (Build_Discriminated_Subtype):
4033 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
4035 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4037 * sem_prag.adb (Analyze_Global_Item):
4038 Do not consider discriminants because they are not "entire
4039 objects". Remove the discriminant-related checks because they are
4041 (Analyze_Input_Output): Do not consider discriminants
4042 because they are not "entire objects".
4044 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4046 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
4047 perform check if the current scope does not come from source,
4048 as is the case for a rewritten task body, because check has
4049 been performed already, and may not be doable because of changed
4052 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4054 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
4055 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
4058 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4060 * sem_ch4.adb (Analyze_Call): If the return type of a function
4061 is incomplete in an context in which the full view is available,
4062 replace the type of the call by the full view, to prevent spurious
4064 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
4065 abstract subprogram so that compiler does not reject a parameter
4066 of a primitive operation of a tagged type being frozen, when
4067 the untagged type of that parameter cannot be frozen.
4069 2017-04-27 Bob Duff <duff@adacore.com>
4071 * sem_attr.adb (Compute_Type_Key): Don't walk
4072 representation items for irrelevant types, which could be in a
4073 different source file.
4075 2017-04-27 Steve Baird <baird@adacore.com>
4077 * exp_attr.adb (Expand_N_Attribute_Reference):
4078 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
4081 2017-04-27 Yannick Moy <moy@adacore.com>
4083 * exp_unst.ads: Fix typos in comments.
4085 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4087 * sem_eval.adb (Choice_Matches): Handle properly a real literal
4088 whose type has a defined static predicate.
4090 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4092 * exp_ch4.adb (Insert_Dereference_Action):
4093 Do not adjust the address of a controlled object when the
4094 associated access type is subject to pragma No_Heap_Finalization.
4097 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
4099 * gcc-interface/utils.c (gnat_type_for_size): Set
4100 TYPE_ARTIFICIAL on created types.
4102 2017-04-27 Claire Dross <dross@adacore.com>
4104 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4105 modifications in functional containers.
4106 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4107 to improve readablity. Subprograms are separated between basic
4108 operations, constructors and properties. Universally quantified
4109 formulas in contracts are factorized in independant functions
4110 with a name and a comment. Names of parameters are improved.
4112 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4114 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4116 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4118 * sem_res.adb (Resolve_Type_Conversion): Do not
4119 install a predicate check here since this is already done during
4120 the expansion phase. Verify whether the operand satisfies the
4121 static predicate (if any) of the target type.
4122 * sem_ch3.adb (Analyze_Object_Declaration): Do
4123 not install a predicate check if the object is initialized by
4124 means of a type conversion because the conversion is subjected
4127 2017-04-27 Tristan Gingold <gingold@adacore.com>
4129 * raise.c (__gnat_builtin_longjmp): Remove.
4130 (__gnat_bracktrace):
4131 Add a dummy definition for the compiler (__gnat_eh_personality,
4132 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
4133 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
4134 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
4135 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
4136 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
4137 and a-except-2005.adb.
4138 * raise-gcc.c: Allow build in compiler, compiled as a C++
4140 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
4141 (db): Constify msg_format.
4142 (get_call_site_action_for): Don't use void arithmetic.
4143 * system.ads (Frontend_Exceptions): Set to False.
4144 (ZCX_By_Default): Set to True.
4145 (GCC_ZC_Support): Set to True.
4146 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
4148 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
4149 in gnat1 and gnatbind.
4150 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
4151 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
4152 * s-excmac.ads, s-excmac.adb: Copy of variants.
4153 * a-except.o: Adjust preequisites.
4154 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
4156 2017-04-27 Claire Dross <dross@adacore.com>
4158 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4159 modifications in functional containers.
4160 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4161 to improve readablity. Subprograms are separated between basic
4162 operations, constructors and properties. Universally quantified
4163 formulas in contracts are factorized in independant functions
4164 with a name and a comment. Names of parameters are improved.
4166 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4168 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4170 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4172 * sem_res.adb (Resolve_Type_Conversion): Do not
4173 install a predicate check here since this is already done during
4174 the expansion phase. Verify whether the operand satisfies the
4175 static predicate (if any) of the target type.
4176 * sem_ch3.adb (Analyze_Object_Declaration): Do
4177 not install a predicate check if the object is initialized by
4178 means of a type conversion because the conversion is subjected
4181 2017-04-27 Tristan Gingold <gingold@adacore.com>
4183 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
4184 replaced by their variants).
4186 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4188 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
4189 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
4190 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
4192 2017-04-27 Tristan Gingold <gingold@adacore.com>
4194 * s-excmac-gcc.ads, s-excmac-gcc.adb,
4195 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
4198 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4200 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
4201 the loop which detects potential enclosing transient scopes. The
4202 loop now terminates much earlier as transient scopes are bounded
4203 by packages and subprograms.
4205 2017-04-27 Claire Dross <dross@adacore.com>
4207 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
4208 allow the use of regular equality over elements in contracts.
4209 (Cursor): Type is now public so that it can be used in
4211 (Formal_Model): Ghost package containing
4212 model functions that are used in subprogram contracts.
4213 (Current_To_Last): Removed, model functions should be used
4215 (First_To_Previous): Removed, model functions should
4217 (Strict_Equal): Removed, model functions
4218 should be used instead.
4219 (Append): Default parameter value
4220 replaced by new wrapper to allow more precise contracts.
4221 (Insert): Default parameter value replaced by new wrapper to
4222 allow more precise contracts.
4223 (Delete): Default parameter
4224 value replaced by new wrapper to allow more precise contracts.
4225 (Prepend): Default parameter value replaced by new wrapper to
4226 allow more precise contracts.
4227 (Delete_First): Default parameter
4228 value replaced by new wrapper to allow more precise contracts.
4229 (Delete_Last): Default parameter value replaced by new wrapper
4230 to allow more precise contracts.
4232 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4234 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
4235 for object declarations.
4236 (Expand_SPARK_N_Object_Declaration): New routine.
4237 * sem_elab.adb (Check_A_Call): Include calls to the
4238 Default_Initial_Condition procedure of a type under the SPARK
4239 elaboration checks umbrella.
4241 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4243 * sem.adb (Analyze): Diagnose an illegal iterated component
4245 * sem_util.ads, sem_util.adb
4246 (Diagnose_Iterated_Component_Association): New routine.
4248 2017-04-27 Bob Duff <duff@adacore.com>
4250 * adaint.c (__gnat_get_current_dir): Return 0 in length if
4252 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
4253 exception if getcwd failed.
4255 2017-04-27 Yannick Moy <moy@adacore.com>
4257 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
4258 entities with special prefix.
4260 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4262 * debug.adb Change the documentation of switch -gnatd.s.
4263 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
4264 to manage the secondary stack when an enclosing scope already
4265 performs this functionality (aka relaxed management). Switch
4266 -gnatd.s may be used to force strict management in which case
4267 the block will manage the secondary stack unconditionally. Add
4268 a guard to stop the traversal when encountering a package or a
4271 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4273 * sem_res.adb (Resolve_Call): Refine further the handling of
4274 limited views of return types in function calls. If the function
4275 that returns a limited view appears in the current unit,
4276 we do not replace its type by the non-limited view because
4277 this transformation is performed int the back-end. However,
4278 the type of the call itself must be the non-limited view, to
4279 prevent spurious resolution errors.
4281 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4283 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
4284 Removed, proposed implementation using generics for class-wide
4285 preconditions proved impractical.
4286 (Class_Wide_Clone): New attribute of subprogram. Designates
4287 subprogram created for primitive operations with class-wide
4288 pre/postconditions that contain calls to other primitives. The
4289 clone holds the body of the original primitive, but the
4290 pre/postonditions do not apply to it. The original body is
4291 rewritten as a wrapper for a call to the clone.
4292 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
4293 the flag is set, no code for the corresponding pre/postconditions
4294 is inserted into its body.
4296 2017-04-27 Bob Duff <duff@adacore.com>
4298 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
4299 Scalar_Storage_Order if -gnatI is given.
4300 * sem_prag.adb (Analyze_Pragma): Ignore
4301 Default_Scalar_Storage_Order if -gnatI is given.
4303 2017-04-27 Claire Dross <dross@adacore.com>
4305 * a-cofuba.ads (Add): Take as an additional input parameter
4306 the position where the element should be inserted.
4307 (Remove): New function that removes an element from the container.
4308 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
4309 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
4310 (Remove): New function that removes an element from a set.
4311 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
4312 (Remove): New function that removes an element from a sequence.
4313 (Insert): New function that adds anywhere in a sequence.
4315 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4317 * checks.adb (Generate_Range_Check): Revert previous change.
4319 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4321 * sem_util.adb: Minor reformatting/rewording.
4323 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4325 * lib-xref.adb (Generate_Reference): The use
4326 of attribute 'Result is not considered a violation of pragma
4329 2017-04-27 Justin Squirek <squirek@adacore.com>
4331 * cstand.adb (Create_Standard): Correctly set
4332 Directly_Designated_Type for Any_Access.
4333 * sem_type.adb (Covers): Minor grammar fixes.
4335 2017-04-27 Bob Duff <duff@adacore.com>
4337 * sem_attr.adb: Minor cleanup.
4339 2017-04-27 Claire Dross <dross@adacore.com>
4341 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
4342 private child of Ada.Containers used to implement all functional
4344 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
4345 child of Ada.Containers. It provides functional indefinite unbounded
4346 maps which can be used as high level models for specification
4348 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
4349 child of Ada.Containers. It provides functional indefinite unbounded
4350 sets which can be used as high level models for specification
4352 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
4353 child of Ada.Containers. It provides functional indefinite unbounded
4354 vectors which can be used as high level models for specification
4356 * Makefile.rtl: Add new packages.
4357 * impunit.adb: Add new packages.
4359 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4361 * sem_ch4.adb: Minor reformatting.
4363 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4365 * sem_ch12.adb (Analyze_Associations): minor reformatting.
4366 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
4367 point type actual that has user-defined arithmetic primitives,
4368 when there is a previous actual for a formal package that defines
4369 a fixed-point type with the parent user-defined operator.
4371 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4373 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
4374 * sem_attr.adb (Resolve_Attribute): Generate a range check when
4375 the component type allows range checks.
4377 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4379 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
4380 corresponding declaration, because formal derived types are
4381 rewritten as private extensions.
4383 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4385 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
4386 dimensions of operands if node has been analyzed already, because
4387 previous analysis and dimension checking will have removed the
4388 dimension information from the operands.
4390 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4392 * debug.adb: Document the use of switch -gnatd.s.
4393 * einfo.ads Update the documentation on attribute
4394 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
4395 the uses of these attributes from certain entities.
4396 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
4397 which determines whether the block should continue to manage
4398 the secondary stack.
4399 (Manages_Sec_Stack): New routine.
4401 2017-04-27 Bob Duff <duff@adacore.com>
4403 * atree.ads: Minor edit.
4405 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4407 * sinfo.ads: Update the section on Ghost mode. Add
4408 a section on SPARK mode. Update the placement of section on
4409 expression functions.
4411 2017-04-27 Bob Duff <duff@adacore.com>
4413 * sinput.adb (Get_Source_File_Index): Don't
4414 assert that S is in the right range in the case where this is
4415 a .dg file under construction.
4417 2017-04-27 Yannick Moy <moy@adacore.com>
4419 * sem_util.adb (Check_Result_And_Post_State):
4420 Handle more precisely each conjunct in expressions formed by
4421 and'ing sub-expressions.
4423 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4425 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
4427 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4429 * gnat_rm.texi, gnat_ugn.texi,
4430 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4431 doc/gnat_ugn/platform_specific_information.rst,
4432 doc/gnat_ugn/gnat_and_program_execution.rst,
4433 doc/gnat_ugn/gnat_utility_programs.rst,
4434 doc/gnat_ugn/the_gnat_compilation_model.rst,
4435 doc/gnat_rm/implementation_defined_attributes.rst,
4436 doc/gnat_rm/the_gnat_library.rst,
4437 doc/gnat_rm/implementation_defined_pragmas.rst,
4438 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4439 doc/gnat_rm/implementation_of_specific_ada_features.rst,
4440 doc/gnat_rm/implementation_defined_aspects.rst,
4441 doc/gnat_rm/implementation_defined_characteristics.rst: Update
4444 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4446 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
4447 generating C code on complex case expressions.
4449 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4451 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
4452 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
4453 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
4454 Ada_2012 instead of Ada_2005 to be compatible with the above
4456 * bindgen.adb: Silence new warning on pragma Ada_95.
4458 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4460 * checks.adb (Generate_Range_Check): Revert part of previous change.
4462 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4464 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
4465 container indexing operation that appears as a an actual in a
4466 parameter association in a procedure call.
4468 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
4470 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
4471 Fix spelling mistakes.
4473 2017-04-25 Bob Duff <duff@adacore.com>
4475 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
4476 * sinput-p.adb: Use regular fat pointers, with bounds checking,
4477 for source buffers. Fix misc obscure bugs.
4478 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
4479 checking, for source buffers. Modify representation clause for
4480 Source_File_Record as appropriate. Move Source_File_Index_Table
4481 from spec to body, because it is not used outside the body.
4482 Move Set_Source_File_Index_Table into the private part, because
4483 it is used only in the body and in children. Use trickery to
4484 modify the dope in the generic instantiation case. It's ugly,
4485 but not as ugly as the previous method. Fix documentation.
4486 Remove obsolete code.
4487 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
4488 indexing in source buffers.
4489 * fmap.adb: Avoid conversions from one string type to another.
4490 Remove a use of global name buffer.
4491 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
4494 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4496 * exp_util.adb, exp_ch4.adb: Minor reformatting.
4498 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4500 * checks.adb: Code clean up in various routines.
4501 (Generate_Range_Check): Do not generate a range check when the
4502 expander is not active or when index/range checks are suppressed
4504 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
4505 Remove variants that include a Supress parameter. These routines
4506 are never used, and were introduced before the current scope-based
4507 check suppression method.
4509 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
4511 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
4512 code and some subprogram calls that are now noop.
4514 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4516 * exp_ch4.adb (Expand_N_Case_Expression): Take
4517 Minimize_Expression_With_Actions into account when possible.
4519 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4521 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
4522 (Known_Null): Moved to Sem_Util.
4523 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
4524 (Known_Null): Moved to Sem_Util.
4525 * sem_util.adb Add new enumeration type Null_Status_Kind.
4526 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
4527 this routine is now carried out by Null_Status.
4528 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
4529 is now carried out by Null_Status.
4530 (Null_Status): New routine.
4531 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
4532 (Known_Null): Moved from Exp_Util.
4534 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4536 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
4537 error on the return type of an expression function that is a
4538 completion, if the type is derived from a generic formal type.
4540 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4542 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
4543 conversion are those of the target type.
4545 2017-04-25 Bob Duff <duff@adacore.com>
4547 * a-clrefi.adb: Minor cleanup.
4549 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4551 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
4553 2017-04-25 Bob Duff <duff@adacore.com>
4555 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
4556 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
4557 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
4558 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
4559 the Internal_Source buffer. This removes the incorrect call to "="
4560 the customer noticed.
4561 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
4562 eventually need to eliminate them altogether. Or else get rid
4563 of zero-origin addressing.
4565 2017-04-25 Claire Dross <dross@adacore.com>
4567 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
4568 function used in GNATprove to know if an expression contains
4569 non-dispatching calls on primitives of a tagged type.
4571 2017-04-25 Bob Duff <duff@adacore.com>
4573 * rtsfind.adb (Initialize): Initialize
4574 First_Implicit_With. Building the compiler with Normalize_Scalars
4575 and validity checking finds this being used as an uninitialized
4578 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4580 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
4581 Add a warning about SPARK mode management. The routine now
4582 saves and restores both the mode and associated pragma.
4583 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
4584 SPARK mode management. The routine now saves and restores both
4585 the mode and associated pragma.
4586 (Analyze_Object_Contract):
4587 Add a warning about SPARK mode management. The routine
4588 now saves and restores both the mode and associated pragma.
4589 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
4590 management. The routine now saves and restores both the mode
4591 and associated pragma. (Analyze_Package_Contract): Add a warning
4592 about SPARK mode management. The routine now saves and restores
4593 both the mode and associated pragma.
4594 (Analyze_Task_Contract):
4595 Add a warning about SPARK mode management. The routine now saves
4596 and restores both the mode and associated pragma.
4597 * expander.adb (Expand): Change the way the Ghost mode is saved
4599 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
4601 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
4603 * exp_util.adb (Build_DIC_Procedure_Body):
4604 Change the way the Ghost mode is saved and restored.
4605 (Build_DIC_Procedure_Declaration): Change the way the Ghost
4606 mode is saved and restored.
4607 (Build_Invariant_Procedure_Body):
4608 Change the way the Ghost mode is saved and restored.
4609 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
4610 mode is saved and restored.
4611 (Make_Predicate_Call): Change the
4612 way the Ghost mode is saved and restored.
4613 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
4615 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4617 (Mark_And_Set_Ghost_Body): Remove parameter
4618 Mode and its assignment.
4619 (Mark_And_Set_Ghost_Completion):
4620 Remove parameter Mode and its assignment.
4621 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
4623 (Mark_And_Set_Ghost_Instantiation): Remove parameter
4624 Mode and its assignment.
4625 (Mark_And_Set_Ghost_Procedure_Call):
4626 Remove parameter Mode and its assignment.
4628 Remove parameter Mode and its assignment.
4629 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4630 and update the comment on usage.
4631 (Mark_And_Set_Ghost_Body):
4632 Remove parameter Mode and update the comment on usage.
4633 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
4634 update the comment on usage.
4635 (Mark_And_Set_Ghost_Declaration):
4636 Remove parameter Mode and update the comment on usage.
4637 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
4638 update the comment on usage.
4639 (Mark_And_Set_Ghost_Procedure_Call):
4640 Remove parameter Mode and update the comment on usage.
4641 (Set_Ghost_Mode): Remove parameter Mode and update the comment
4643 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
4645 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
4646 of obsolete field SPARK_Mode_Pragma.
4647 (Load_Main_Source): Remove
4648 the assignment of obsolete field SPARK_Mode_Pragma.
4649 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
4650 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
4651 the assignment of obsolete field SPARK_Mode_Pragma.
4652 (Ensure_System_Dependency): Remove the assignment of obsolete
4653 field SPARK_Mode_Pragma.
4654 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
4655 mode management. Change the way Ghost and SPARK modes are saved
4657 * sem.adb (Analyze): Change the way the Ghost mode is saved
4659 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
4660 Ghost mode is saved and restored.
4661 (Process_Full_View): Change
4662 the way the Ghost mode is saved and restored.
4663 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
4664 mode is saved and restored.
4665 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
4666 mode is saved and restored.
4667 (Analyze_Subprogram_Body_Helper):
4668 Change the way the Ghost mode is saved and restored.
4669 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
4670 Ghost mode is saved and restored.
4671 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
4672 management. Save the SPARK mode-related data prior to any changes
4673 to the scope stack and contexts. The mode is then reinstalled
4674 before the subunit is analyzed in order to restore the original
4675 view of the subunit.
4676 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
4677 warning on region management. Change the way the Ghost and
4678 SPARK modes are saved and restored.
4679 (Inline_Instance_Body):
4680 Add a warning about SPARK mode management. Code clean up.
4681 (Analyze_Subprogram_Instantiation): Update the warning on region
4682 management. Change the way the Ghost and SPARK modes are saved
4684 (Instantiate_Package_Body): Update the warning
4685 on region management. Change the way the Ghost and SPARK modes
4686 are saved and restored.
4687 (Instantiate_Subprogram_Body): Update
4688 the warning on region management. Change the way the Ghost and
4689 SPARK modes are saved and restored.
4690 (Set_Instance_Env): Add a
4691 warning about SPARK mode management. Change the way SPARK mode
4692 is saved and restored.
4693 * sem_ch13.adb (Build_Predicate_Functions):
4694 Change the way the Ghost mode is saved and restored.
4695 (Build_Predicate_Function_Declaration): Change the way the Ghost
4696 mode is saved and restored.
4697 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
4698 mode management. Change the way SPARK mode is saved and restored.
4699 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4700 Change the way the Ghost mode is saved and restored.
4701 (Analyze_Initial_Condition_In_Decl_Part): Change the way
4702 the Ghost mode is saved and restored.
4704 Change the way the Ghost mode is saved and restored.
4705 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
4706 Ghost mode is saved and restored.
4707 * sem_util.adb (Install_SPARK_Mode): New routine.
4708 (Restore_SPARK_Mode): New routine.
4709 (Save_SPARK_Mode_And_Set): Removed.
4710 (Set_SPARK_Mode): New routine.
4711 * sem_util.ads (Install_SPARK_Mode): New routine.
4712 (Restore_SPARK_Mode): New routine.
4713 (Save_SPARK_Mode_And_Set): Removed.
4714 (Set_SPARK_Mode): New routine.
4716 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4718 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
4719 to determine whether a type is declared in a local package that
4720 has not yet been frozen.
4721 * freeze.adb (Freeze_Before): Use new predicate to determine
4722 whether a local package must be installed on the scope stack
4723 in order to evaluate in the proper scope actions generated by
4724 aspect specifications, such as Predicate
4725 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
4726 using new predicate.
4728 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4730 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
4731 comparisons between non- scalar expressions expressions because
4732 their values cannot be invalidated.
4733 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
4736 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4738 * par_sco.adb: Minor reformatting.
4740 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4742 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
4743 is a type from an unfrozen local package, install package to
4744 complete the analysis of delayed aspects of the type.
4746 2017-04-25 Tristan Gingold <gingold@adacore.com>
4748 * bingen.adb (System_Version_Control_Used): New variable.
4749 (Resolve_Binder_Options): Set the above variable.
4750 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
4751 (Gen_Elab_Order): Emit blank line before.
4753 2017-04-25 Justin Squirek <squirek@adacore.com>
4755 * sem_cat.adb (Validate_RT_RAT_Component): Added
4756 an extra check to ignore incomplete types.
4758 2017-04-25 Thomas Quinot <quinot@adacore.com>
4760 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
4761 bogus circuitry for the case where Name is Predicate.
4763 2017-04-25 Thomas Quinot <quinot@adacore.com>
4765 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
4766 Create SCOs for Predicate aspects in disabled
4767 state initially, to be enabled later on by...
4768 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
4769 SCO for predicate as enabled.
4771 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4773 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
4774 pragmas Warnings Off / On.
4775 * namet.adb (Finalize): Remove now obsolete pair of pragmas
4777 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
4778 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
4779 consider comparisons between static expressions because their
4780 values cannot be invalidated.
4781 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
4783 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
4784 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
4786 2017-04-25 Bob Duff <duff@adacore.com>
4788 * sem_elab.adb (In_Task_Activation): Trace internal calls in
4791 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4793 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
4796 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4798 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
4799 On/Off to defend against a spurious warning in conditional
4801 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
4802 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
4803 defend against a spurious warning in conditional compilation.
4804 * output.adb Add a pair of pragma Warnings On/Off to defend
4805 against a spurious warning in conditional compilation.
4806 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
4807 (Fold_General_Op): New routine.
4808 (Fold_Static_Real_Op): New routine.
4809 (Test_Comparison): New routine.
4810 * sem_eval.ads (Test_Comparison): New routine.
4811 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
4812 (Warn_On_Constant_Valid_Condition): New routine.
4813 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
4814 to detect a specific case.
4815 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
4816 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
4817 to defend against a spurious warning in conditional compilation.
4818 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
4819 against a spurious warning in conditional compilation.
4820 * usage.adb Add a pair of pragma Warnings On/Off to defend
4821 against a spurious warning in conditional compilation.
4823 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4825 * sinfo.ads, sem_ch13.adb: Update comment.
4827 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4829 * sem_util.adb (Is_Post_State): A reference to a
4830 generic in out parameter is considered a change in the post-state
4833 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4835 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
4836 declaration of a subprogram instance within its wrapper package,
4837 skip over null statements that may result from the rewriting of
4840 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4842 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
4843 If the type is an unchecked_union, replace the attribute with
4844 a Raise_Program_Error (rather than inserting such before the
4845 attribute reference) to handle properly the case where we are
4846 processing a component of a larger record, and we need to prevent
4847 further expansion for the unchecked union.
4848 (Expand_Attribute_Reference, case 'Write): If the type is
4849 an unchecked_union, check whether enclosing scope is a Write
4850 subprogram. Replace attribute with a Raise_Program_Error if the
4851 discriminants of the unchecked_union type have not default values
4852 because such a use is erroneous..
4854 2017-04-25 Tristan Gingold <gingold@adacore.com>
4856 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
4857 Add relative_deadline to task record on edf profile.
4858 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
4859 (Make_Task_Create_Call): Pass relative_deadline value.
4860 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
4861 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
4862 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
4863 * sem_prag.adb (Set_Ravenscar_Profile): Handle
4864 GNAT_Ravenscar_EDF (set scheduling policy).
4865 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
4867 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
4868 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
4870 (Pragma_Deadline_Floor): New pragma.
4871 * targparm.adb (Get_Target_Parameters): Recognize
4872 GNAT_Ravenscar_EDF profile.
4874 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4876 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
4878 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4880 * sem_aux.adb (Nearest_Ancestor): Use original node of type
4881 declaration to locate nearest ancestor, because derived
4882 type declarations for record types are rewritten as record
4884 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
4885 properly derivations that are completions of private types.
4886 (Add_Predicates): If type is private, examine rep. items of full
4887 view, which may include inherited predicates.
4888 (Build_Predicate_Functions): Ditto.
4890 2017-04-25 Javier Miranda <miranda@adacore.com>
4892 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
4893 to generate new entities for subtype declarations located in
4894 Expression_With_Action nodes.
4896 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4898 * sem_elab.adb (Check_A_Call): Remove
4899 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
4900 need for Elaborate_All when SPARK elaboration checks are
4901 required. Update the checks for instances, variables, and calls
4902 to Default_Initial_Condition procedures.
4904 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4906 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
4907 into a boolean aspect, in analogy with the Ada aspect No_Return.
4909 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4911 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
4913 2017-04-25 Bob Duff <duff@adacore.com>
4915 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
4916 Is_True_Constant for an array variable that is passed to a
4917 foreign function as an 'in' parameter.
4918 * debug.adb: Document -gnatd.q.
4920 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4922 * sem_ch6.adb (Analyze_Expression_Function): If expression function
4923 is completion and return type is an access type do not freeze
4924 designated type: this will be done in the process of freezing
4925 the expression if needed.
4926 (Freeze_Expr_Types): Check whether type is complete before
4927 creating freeze node, to provide a better error message if
4928 reference is premature.
4929 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
4930 functions created by type derivations.
4932 2017-04-25 Pascal Obry <obry@adacore.com>
4934 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
4936 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4938 * sem_res.adb (Resolve_Type_Conversion):
4939 When resolving against any fixed type, set the type of the
4940 operand as universal real when the operand is a multiplication
4941 or a division where both operands are of any fixed type.
4942 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
4943 placement of an error message by pointing to the operand of a
4944 type conversion rather than the conversion itself.
4946 2017-04-25 Thomas Quinot <quinot@adacore.com>
4948 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
4949 Needs_Debug_Info when producing SCOs.
4951 2017-04-25 Thomas Quinot <quinot@adacore.com>
4953 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4954 Always pass a null finalization master for a library level named access
4955 type to which a pragme No_Heap_Finalization applies.
4957 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4961 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
4962 set to A'First(2) and vice versa.
4964 2017-04-25 Yannick Moy <moy@adacore.com>
4966 * freeze.adb (Freeze_Record_Type): Remove obsolete
4967 rule on volatile tagged record restriction on SPARK code.
4969 2017-04-25 Yannick Moy <moy@adacore.com>
4971 * sem_prag.adb (minor) Fix SPARK RM reference.
4973 2017-04-25 Yannick Moy <moy@adacore.com>
4975 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
4976 comment to reflect which entity is chosen as unique entity.
4977 (Unique_Entity): Return full view instead of private spec for
4978 protected type or task type. Fix possible incorrect access when
4981 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
4983 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
4984 array types only instead of all packed array types.
4986 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4988 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
4989 dimension system, verify that dimensions of both match.
4990 (Check_Conformance): Add error message in case of dimension
4992 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
4995 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4997 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
5000 2017-04-25 Yannick Moy <moy@adacore.com>
5002 * sem_util.adb: Minor refactoring.
5003 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
5005 2017-04-25 Claire Dross <dross@adacore.com>
5007 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
5008 ultimate alias when accessing overridden operation. Indeed, if the
5009 overridden operation is itself inherited, it won't have any explicit
5012 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5014 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
5015 overlap if the two formals have different types, because formally
5016 the corresponding actuals cannot designate the same objects.
5018 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5020 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
5021 dimensions are present from context, use them. b) If operand is
5022 a static constant rewritten as a literal, obtain the dimensions
5023 from the original declaration, otherwise use dimensions of type
5024 established from context.
5026 2017-04-25 Yannick Moy <moy@adacore.com>
5028 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
5029 of array that is private.
5031 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5033 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
5036 2017-04-25 Yannick Moy <moy@adacore.com>
5038 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
5041 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5043 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
5044 the check that recognizes a call to a private overridding and
5045 replaces the called subprogram with its alias.
5047 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5049 * exp_util.adb: Minor reformatting.
5051 2017-04-25 Justin Squirek <squirek@adacore.com>
5053 * exp_ch3.adb (Freeze_Type): Add condition to always treat
5054 interface types as a partial view of a private type for the
5055 generation of invariant procedure bodies.
5056 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
5057 Add a condition to get the Corresponding_Record_Type for
5058 concurrent types, add condition to return in the absence of a
5059 class in the pragma, remove call to Replace_Type_References,
5060 and add call to Replace_References.
5061 (Add_Interface_Invariatns),
5062 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
5063 to including the working type T.
5064 (Add_Own_Invariants): Remove
5065 legacy condition for separate units, remove dispatching for ASIS
5066 and save a copy of the expression in the pragma expression.
5067 (Build_Invariant_Procedure_Body): Default initalize vars,
5068 remove return condition on interfaces, always use the
5069 private type for interfaces, and move the processing of types
5070 until after the processing of invariants for the full view.
5071 (Build_Invariant_Procedure_Declaration): Remove condition
5072 to return if an interface type is encountered and add
5073 condition to convert the formal parameter to its class-wide
5074 counterpart if Work_Typ is abstract.
5075 (Replace_Type): Add call to Remove_Controlling_Arguments.
5076 (Replace_Type_Ref): Remove class-wide dispatching for the current
5077 instance of the type.
5078 (Replace_Type_References): Remove parameter "Derived"
5079 (Remove_Controlling_Arguments): Created in order to removing
5080 the controlliong argument from calls to primitives in the case
5081 of the formal parameter being an class-wide abstract type.
5082 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
5083 to the change made to Freeze_Type in exp_ch3. Add a condition
5084 to treat interface types as a partial view.
5085 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
5086 to Build_Invariant_Procedure_Declaration to properly generate a
5087 "partial" invariant procedure when Typ is an interface.
5089 2017-04-25 Bob Duff <duff@adacore.com>
5091 * a-numeri.ads: Go back to using brackets encoding for the Greek
5094 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5096 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
5097 (10-15): if derived type T with progenitors is abstract,
5098 and primitive P of this type inherits non-trivial classwide
5099 preconditions from both a parent operation and from an interface
5100 operation, then the inherited operation is abstract if the parent
5101 operation is not null.
5102 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
5103 with Covered_Interface_Op to yield the actual interface operation
5104 that is implemented by a given inherited operation.
5106 2017-04-25 Javier Miranda <miranda@adacore.com>
5108 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
5109 and right operands after performing the validity checks. Required
5110 because validity checks may remove side effects from the operands.
5112 2017-04-25 Javier Miranda <miranda@adacore.com>
5114 * exp_attr.adb (Attribute_Unrestricted_Access):
5115 Do not disable implicit type conversion. Required to generate
5116 code that displaces the pointer to reference the secondary
5119 2017-04-25 Pascal Obry <obry@adacore.com>
5121 * prj-attr.adb, snames.ads-tmpl: Add package Install's
5122 Required_Artifacts attribute.
5124 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5126 * sem_util.adb (Same_Value): String literals are compile-time
5127 values, and comparing them must use Expr_Value_S.
5129 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5131 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
5132 dereference is introduced for the object, and the object is
5133 overloaded, do not check whether it is aliased, because it may
5134 include an implicit dereference.
5135 * sem_type.adb (Disambiguate): If two interpretations are access
5136 attribute types with the same designated type keep either of
5137 them and do not report an ambiguity. A true ambiguity will be
5140 2017-04-25 Bob Duff <duff@adacore.com>
5142 * a-numeri.ads: Change the encoding of Greek letter Pi from
5143 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
5144 to indicate the encoding. We considered using a byte order mark
5145 (BOM), but that causes various trouble (misc software eats the
5146 BOM, if you have a patch with a BOM, then it's not at the start
5147 of the patch, so it's not a BOM, the BOM affects with-ing files,
5149 * scng.adb, s-wchcnv.adb: Minor.
5151 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5153 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
5154 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5156 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
5157 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
5158 Improve error message on operations that inherit non-conforming
5159 classwide preconditions from ancestor and progenitor.
5160 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
5161 moved here from sem_ch3.
5162 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5163 check given in RM 6.1.1 (17) concerning renamings of overriding
5164 operations that inherits class-wide preconditions from ancestor
5167 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5169 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
5170 (Build_Adjust_Statements): Code cleanup.
5171 (Build_Finalizer): Update the initialization of
5173 (Build_Finalize_Statements): Code cleanup.
5174 (Build_Initialize_Statements): Code cleanup.
5175 (Make_Deep_Array_Body): Update the initialization of
5177 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
5178 (Process_Object_Declaration): Generate a null exception handler only
5179 when exceptions are allowed.
5180 (Process_Transients_In_Scope): Update the initialization of
5182 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
5184 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
5185 restrictions when the handler is internally generated and the
5188 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5190 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
5191 enforce legality rule on classwide preconditions inherited from
5192 both an ancestor and a progenitor (RM 6.1.1 (10-13).
5193 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
5194 subprogram need not be dispatching if it appears in a precondition
5195 for an abstract or null subprogram.
5197 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5199 * sem_ch10.adb: Minor typo fix.
5201 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5203 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
5205 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5207 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
5208 have a length which is a power of 2.
5209 (Is_Predefined_File_Name): Likewise. Adjust comment.
5211 2017-04-25 Bob Duff <duff@adacore.com>
5213 * exp_aggr.adb (Component_Count): Protect the
5214 arithmetic from attempting to convert a value >= 2**31 to Int,
5215 which would otherwise raise Constraint_Error.
5217 2017-04-25 Bob Duff <duff@adacore.com>
5219 * opt.ads (Locking_Policy): Fix incorrect documentation. The
5220 first character of the policy name is not unique.
5222 2017-04-25 Bob Duff <duff@adacore.com>
5224 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
5225 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
5226 about this flag not being used. It was already used, and it is
5229 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5231 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
5232 (Ignore_SPARK_Mode_Pragmas): New routine.
5233 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
5234 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
5235 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
5237 (Ignore_SPARK_Mode_Pragmas): New routine
5238 along with pragma Inline.
5239 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
5240 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
5241 Ignore_SPARK_Mode_Pragmas_In_Instance.
5242 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
5243 Save and restore the value of global flag
5244 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
5245 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
5246 the corresponding spec or the body must ignore all SPARK_Mode
5247 pragmas found within.
5248 (Analyze_Subprogram_Declaration): Mark
5249 the spec when it needs to ignore all SPARK_Mode pragmas found
5250 within to allow the body to infer this property in case it is
5251 instantiated or inlined later.
5252 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
5253 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5254 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5255 when the corresponding spec also ignored all SPARK_Mode pragmas
5257 (Analyze_Package_Declaration): Mark the spec when
5258 it needs to ignore all SPARK_Mode pragmas found within to allow
5259 the body to infer this property in case it is instantiated or
5261 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
5262 Save and restore the value of flag
5263 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5264 formal spec when it needs to ignore all SPARK_Mode
5265 pragmas found within to allow the body to infer this
5266 property in case it is instantiated or inlined later.
5267 (Analyze_Package_Instantiation): Save and restore the value
5268 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
5269 the instance spec when it needs to ignore all SPARK_Mode
5270 pragmas found within to allow the body to infer this
5271 property in case it is instantiated or inlined later.
5272 (Analyze_Subprogram_Instantiation): Save and restore the value
5273 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5274 instance spec and anonymous package when they need to ignore
5275 all SPARK_Mode pragmas found within to allow the body to infer
5276 this property in case it is instantiated or inlined later.
5277 (Instantiate_Package_Body): Save and restore the value of global
5278 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
5279 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
5280 corresponding instance spec also ignored all SPARK_Mode pragmas
5282 (Instantiate_Subprogram_Body): Save and restore the
5283 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5284 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5285 when the corresponding instance spec also ignored all SPARK_Mode
5286 pragmas found within.
5287 * sem_prag.adb (Analyze_Pragma): Update the reference to
5288 Ignore_Pragma_SPARK_Mode.
5289 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
5290 all SPARK_Mode pragmas defined within yields mode "off".
5292 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5294 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
5296 2017-04-25 Bob Duff <duff@adacore.com>
5298 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
5299 All_Checks" to avoid generating unnecessary checks.
5300 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
5302 * sem.ads: Fix comment.
5303 * expander.ads: Fix comment.
5304 * exp_atag.ads: Fix comment: "Index = 0" should be
5307 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5309 * s-taprop-linux.adb: Minor editorial fixes.
5311 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5313 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
5314 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
5315 variable and set it to True whenever the main hash table is
5316 populated. Short- circuit the Assoc function if it is false
5317 and add associated guards.
5319 2017-04-25 Olivier Hainque <hainque@adacore.com>
5321 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
5322 specs without elaboration code that have an elaboration counter
5323 nevertheless, e.g. when compiled with -fpreserve-control-flow.
5324 * sem_ch10.adb (Analyze_Compilation_Unit):
5325 Set_Elaboration_Entity_Required when requested to preserve
5326 control flow, to ensure the unit elaboration is materialized at
5327 bind time, resulting in the inclusion of the unit object file
5328 in the executable closure at link time.
5330 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5332 * exp_dbug.adb: In Debug_Renaming_Declaration,
5333 when dealing with indexed component, accept to produce a renaming
5334 symbol when the index is an IN parameter or when it is a name
5335 defined in an outer scope.
5337 2017-04-25 Yannick Moy <moy@adacore.com>
5339 * errout.adb (Error_Msg): Adapt continuation
5340 message in instantiations and inlined bodies for info messages.
5342 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5344 * fname.adb (Has_Internal_Extension): Add pragma Inline.
5345 Use direct 4-character slice comparisons.
5347 pragma Inline. (Has_Suffix): Delete.
5348 (Is_Internal_File_Name):
5349 Test Is_Predefined_File_Name first.
5350 (Is_Predefined_File_Name):
5351 Use direct slice comparisons as much as possible and limit all
5352 comparisons to at most 8 characters.
5354 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5356 * checks.adb (Insert_Valid_Check): Code cleanup.
5357 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
5358 (Expand_Actuals): Generate proper copy-back for a validation
5359 variable when it acts as the argument of a type conversion.
5360 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
5361 predicate to operate on type qualifications.
5363 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5365 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
5368 2017-04-25 Bob Duff <duff@adacore.com>
5370 * sem_prag.adb (No_Return): Give an error if the pragma applies
5371 to a body. Specialize the error for the specless body case,
5372 as is done for (e.g.) pragma Convention.
5373 * debug.adb: Add switch -gnatd.J to disable the above legality
5374 checks. This is mainly for use in our test suite, to avoid
5375 rewriting a lot of illegal (but working) code. It might also
5376 be useful to customers. Under this switch, if a pragma No_Return
5377 applies to a body, and the procedure raises an exception (as it
5378 should), the pragma has no effect. If the procedure does return,
5379 execution is erroneous.
5381 2017-04-25 Bob Duff <duff@adacore.com>
5383 * exp_ch6.adb (Expand_Actuals): This is the
5384 root of the problem. It took N as an 'in out' parameter, and in
5385 some cases, rewrote N, but then set N to Original_Node(N). So
5386 the node returned in N had no Parent. The caller continued
5387 processing of this orphaned node. In some cases that caused a
5388 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
5389 and trips over the Empty Parent). The solution is to make N an
5390 'in' parameter. Instead of rewriting it, return the list of
5391 post-call actions, so the caller can do the rewriting later,
5392 after N has been fully processed.
5393 (Expand_Call_Helper): Move most of Expand_Call here. It has
5394 too many premature 'return' statements, and we want to do the
5395 rewriting on return.
5396 (Insert_Post_Call_Actions): New procedure to insert the post-call
5397 actions in the appropriate place. In the problematic case,
5398 that involves rewriting N as an Expression_With_Actions.
5399 (Expand_Call): Call the new procedures Expand_Call_Helper and
5400 Insert_Post_Call_Actions.
5402 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5404 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
5405 properly type derived from generic formal types, to handle
5406 properly modified version of ACATS 4.1B B611017.
5408 2017-04-25 Javier Miranda <miranda@adacore.com>
5410 * exp_unst.adb (Subp_Index): Adding missing
5411 support for renamings and functions that return a constrained
5412 array type (i.e. functions for which the frontend built a
5413 procedure with an extra out parameter).
5415 2017-04-25 Pascal Obry <obry@adacore.com>
5417 * s-string.adb: Minor code clean-up.
5419 2017-04-25 Bob Duff <duff@adacore.com>
5421 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
5423 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
5424 function for Non_Blocking_Wait_Process.
5426 2017-04-25 Bob Duff <duff@adacore.com>
5428 * prep.adb (Preprocess): Remove incorrect
5429 Assert. Current character can be ASCII.CR.
5431 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5433 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
5434 convention Stdcall, which has a number of exceptions. Convention
5435 is legal on a component declaration whose type is an anonymous
5436 access to subprogram.
5438 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5440 * sem_ch4.adb: sem_ch4.adb Various reformattings.
5441 (Try_One_Prefix_Interpretation): Use the base type when dealing
5442 with a subtype created for purposes of constraining a private
5443 type with discriminants.
5445 2017-04-25 Javier Miranda <miranda@adacore.com>
5447 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
5448 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
5449 dispatching primitives (Restore_Warnings): Restore warning on
5450 late dispatching primitives (Save_Warnings): Save warning on late
5451 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
5452 to enable/disable this warning.
5453 (WA_Warnings): Set warning on late dispatching primitives.
5454 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
5455 that its parent type has a private extension.
5456 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
5458 * usage.adb: Document -gnatw.j and -gnatw.J.
5460 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5462 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
5465 2017-04-25 Bob Duff <duff@adacore.com>
5467 * binde.adb (Validate): Do not pass dynamic strings
5468 to pragma Assert, because older compilers do not support that.
5470 2017-04-25 Bob Duff <duff@adacore.com>
5472 * s-fileio.adb (Close): When a temp file is
5473 closed, delete it and clean up its Temp_File_Record immediately,
5474 rather than waiting until later.
5475 (Temp_File_Record): Add File
5476 component, so Close can know which Temp_File_Record corresponds
5477 to the file being closed.
5478 (Delete): Don't delete temp files,
5479 because they are deleted by Close.
5480 (Open): Set the File component
5481 of Temp_File_Record. This requires moving the creation of the
5482 Temp_File_Record to the end, after the AFCB has been created.
5484 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5486 * checks.adb (Insert_Valid_Check): Do not generate
5487 a validity check when inside a generic.
5489 2017-04-25 Yannick Moy <moy@adacore.com>
5491 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
5493 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5495 * snames.ads-tmpl (Snames): More names for detecting predefined
5496 potentially blocking subprograms.
5498 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5500 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
5501 concerning inheritance of class-wide preconditions do not apply
5504 2017-04-25 Bob Duff <duff@adacore.com>
5506 * s-ficobl.ads: Minor comment fix.
5508 2017-04-25 Yannick Moy <moy@adacore.com>
5510 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
5511 conversions from float to integer in GNATprove mode.
5512 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
5513 to call Apply_Type_Conversion_Checks, so that range checks
5514 are properly positioned when needed on conversions, including
5515 when converting from float to integer. (Determine_Range): In
5516 GNATprove mode, take into account the possibility of conversion
5517 from float to integer.
5518 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
5519 check on conversions from fixed-point to integer, not anymore
5520 on conversions from floating-point to integer, when in GNATprove
5523 2017-04-25 Yannick Moy <moy@adacore.com>
5525 * checks.adb (Determine_Range_R): Special case type conversions
5526 from integer to float in order to get bounds in that case too.
5527 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
5528 mode, for computations involved in interval checking.
5530 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5532 * checks.adb (Insert_Valid_Check): Partially reimplement validity
5534 * einfo.adb Node36 is now used as Validated_Object.
5535 (Validated_Object): New routine.
5536 (Set_Validated_Object): New routine.
5537 (Write_Field36_Name): Add an entry for Validated_Object.
5538 * einfo.ads Add new attribute Validated_Object along with
5540 (Validated_Object): New routine along with pragma Inline.
5541 (Set_Validated_Object): New routine along with pragma Inline.
5542 * exp_attr.adb (Make_Range_Test): Add processing for validation
5543 variables to avoid extra reads and copies of the prefix.
5544 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
5545 variables in order to reflect any changes done in the variable
5546 back into the original object.
5547 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
5548 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
5550 2017-04-25 Steve Baird <baird@adacore.com>
5552 * exp_ch7.adb (Build_Array_Deep_Procs,
5553 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
5554 generate Finalize_Address routines for CodePeer.
5556 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5558 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
5559 Analyze_Pre_Post_Condition, to implement the legality checks
5560 mandated by AI12-0131: Pre'Class shall not be specified for an
5561 overriding primitive subprogram of a tagged type T unless the
5562 Pre'Class aspect is specified for the corresponding primitive
5563 subprogram of some ancestor of T.
5565 2017-04-25 Bob Duff <duff@adacore.com>
5567 * sem_ch8.adb (Use_One_Type): If a use_type_clause
5568 is redundant, set its Used_Operations to empty. This is only
5569 necessary for use clauses that appear in the parent of a generic
5570 child unit, because those use clauses get reanalyzed when we
5571 instantiate the generic, and we don't want the Used_Operations
5572 carried over from the original context (where it was probably
5575 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5577 * exp_ch6.adb: Minor reformatting.
5579 2017-04-25 Bob Duff <duff@adacore.com>
5581 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5582 Use Source_Index (Current_Sem_Unit) to find the correct casing.
5583 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
5584 (Current_Sem_Unit) to find the correct casing.
5585 * par.adb (Par): Null out Current_Source_File, to ensure that
5586 the above bugs won't rear their ugly heads again.
5588 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5590 * sem_ch8.adb (Find_Type): For an attribute reference
5591 'Class, if prefix type is synchronized and previous errors
5592 have suppressed the creation of the corresponding record type,
5593 create a spurious class-wide for the synchonized type itself,
5594 to catch other misuses of the attribute
5596 2017-04-25 Steve Baird <baird@adacore.com>
5598 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
5599 is True, then don't generate the accessibility check for the
5600 tag of a tagged result.
5601 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
5602 if CodePeer_Mode is True, then don't generate the
5603 tag checks for the result of call to an instance of
5604 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
5605 descendant of" check and the accessibility check).
5607 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5609 * sem_ch13.adb: Code cleanups.
5610 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
5611 * sem_ch8.ads: Minor comment fix.
5613 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5615 * exp_ch4.adb (Library_Level_Target): New function.
5616 (Expand_Concatenate): When optimization is enabled, also expand
5617 the operation out-of-line if the concatenation is present within
5618 the expression of the declaration of a library-level object and
5619 not only if it is the expression of the declaration.
5621 2017-04-25 Bob Duff <duff@adacore.com>
5623 * freeze.adb (Freeze_Object_Declaration): Do
5624 not Remove_Side_Effects if there is a pragma Linker_Section,
5625 because in that case we want static initialization in the
5626 appropriate section.
5628 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5630 * exp_dbug.adb: Minor rewording and reformatting.
5632 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5634 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
5635 handle the proposed changes to rules concerning potentially
5636 unevaluated expressions, to include selected components that
5637 do not depend on discriminants, and indexed components with
5639 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
5640 predicate in quantified expression, and fix bugs in the handling
5641 of case expressions and membership test.
5642 (Analyze_Attribute_Old_Result): use new predicate.
5643 (Analyze_Attribute, case Loop_Entry): ditto.
5645 2017-04-25 Bob Duff <duff@adacore.com>
5647 * s-secsta.adb (SS_Info): Add a comment
5648 explaining why we don't need to walk all the chunks in order to
5649 compute the total size.
5651 2017-04-25 Bob Duff <duff@adacore.com>
5653 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
5654 of the global name buffer to 4*Max_Line_Length.
5656 2017-04-25 Javier Miranda <miranda@adacore.com>
5658 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
5659 renaming entity for debug information, mark the entity as needing debug
5660 info if it comes from sources.
5662 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5664 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
5665 restriction converning the use of 'Address where the prefix is
5666 of a controlled type.
5668 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5670 * exp_dbug.adb: In Debug_Renaming_Declaration,
5671 skip slices that are made redundant by an indexed component
5673 * atree.h: New definition for Original_Node.
5675 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5677 * sem_prag.adb, sem_prag.ads: Minor reformatting.
5679 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5681 * sem_ch3.adb (Check_Entry_Contract): Call
5682 Preanalyze_Spec_Expression so that resolution takes place as well.
5683 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
5684 internal calls that appear in preconditions of protected
5685 operations, in default values for same, and in contract guards
5686 for contract cases in SPARK.
5688 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5690 * a-numaux.ads: Fix description of a-numaux-darwin
5692 (Double): Define to Long_Float.
5693 * a-numaux-vxworks.ads (Double): Likewise.
5694 * a-numaux-darwin.ads
5696 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
5697 * a-numaux-x86.ads: Fix package description.
5698 * a-numaux-x86.adb (Is_Nan): Minor tweak.
5699 (Reduce): Adjust and complete description. Call Is_Nan instead of
5700 testing manually. Use an integer temporary to hold rounded value.
5701 * a-numaux-darwin.adb (Reduce): Likewise.
5702 (Is_Nan): New function.
5704 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5706 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
5707 on analysis of prefix whose type is a current instance of a
5708 synchronized type, but where the prefix itself is an entity that
5711 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5713 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
5714 the identity of callable entities therein, because they have been
5715 properly resolved, and prefixed calls may have been rewritten
5718 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
5720 * exp_ch3.adb (Build_Init_Statements): Convert
5721 the expression of the pragma/aspect Secondary_Stack_Size to
5722 internal type System.Parameters.Size_Type before assigning
5723 it to the Secondary_Stack_Size component of the task type's
5724 corresponding record.
5726 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5728 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
5729 (etc) optimizations when the type is modular and the offsets
5732 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5734 * s-osinte-freebsd.ads: Minor comment tweaks
5736 2017-04-25 Javier Miranda <miranda@adacore.com>
5738 * urealp.adb (UR_Write): Reverse previous patch
5739 adding documentation on why we generate multiplications instead
5740 of divisions (needed to avoid expressions whose computation with
5741 large numbers may cause division by 0).
5743 2017-04-25 Bob Duff <duff@adacore.com>
5745 * erroutc.adb (Set_Specific_Warning_Off,
5746 Set_Warnings_Mode_Off): Use the correct source file for
5747 Stop. Was using Current_Source_File, which is only valid during
5748 parsing. Current_Source_File will have a leftover value from
5749 whatever file happened to be parsed last, because of a with_clause
5752 2017-04-25 Bob Duff <duff@adacore.com>
5754 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
5755 to In_Predefined_Unit, but including GNAT units.
5756 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
5757 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
5758 because Should_Ignore_Pragma was not working reliably outside
5759 the parser, because Current_Source_File is not valid.
5760 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
5761 * par-prag.adb: Call Should_Ignore_Pragma_Par.
5763 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5765 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
5768 2017-04-25 Javier Miranda <miranda@adacore.com>
5770 * urealp.adb (UR_Write): Fix output of constants with a base other
5773 2017-04-25 Justin Squirek <squirek@adacore.com>
5775 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
5776 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
5777 Add extra parameter for Process_Interface_Name.
5778 (Process_Interface_Name): Add parameter for pragma to analyze
5779 corresponding aspect.
5780 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
5783 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5785 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
5788 2017-04-25 Yannick Moy <moy@adacore.com>
5790 * sem_res.adb (Resolve_Comparison_Op): Do not
5791 attempt evaluation of relational operations inside assertions.
5793 2017-04-25 Justin Squirek <squirek@adacore.com>
5795 * exp_util.adb (Add_Interface_Invariants):
5796 Restored, code moved back from Build_Invariant_Procedure_Body.
5797 (Add_Parent_Invariants): Restored, code moved back from
5798 Build_Invariant_Procedure_Body.
5799 (Build_Invariant_Procedure_Body):
5800 Remove refactored calls and integrated code from
5801 Add_Parent_Invariants and Add_Interface_Invariants.
5803 2017-04-25 Johannes Kanig <kanig@adacore.com>
5805 * errout.adb (Output_Messages): Adjust computation of total
5807 * erroutc.adb (Error_Msg): In statistics counts, deal
5808 correctly with informational messages that are not warnings.
5809 * errutil.adb (Finalize): adjust computation of total errors.
5811 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5813 * terminals.c (__gnat_terminate_pid): New.
5814 * g-exptty.ads (Terminate_Process): New. Update comments.
5816 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5818 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
5820 2017-04-25 Justin Squirek <squirek@adacore.com>
5822 * sem_ch3.adb (Analyze_Declarations): Minor
5823 correction to comments, move out large conditional and scope
5824 traversal into a predicate.
5825 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
5828 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5830 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
5831 of prefix whose type is a current instance of a synchronized
5832 type. If the prefix is an object this is an external call (or
5833 requeue) that can only access public operations of the object. The
5834 previous predicate was too restrictive, and did not allow public
5835 protected operations, only task entries.
5837 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5839 * sem_ch5.adb, fname.adb: Minor reformatting.
5841 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5843 * einfo.adb (Is_Anonymous_Access_Type): New routine.
5844 * einfo.ads Update the placement of
5845 E_Anonymous_Access_Subprogram_Type along with all subtypes that
5847 (Is_Anonymous_Access_Type): New routine.
5848 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
5849 master for an access type subject to pragma No_Heap_Finalization.
5850 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
5851 allocated or deallocated does not finalization actions if the
5852 associated access type is subject to pragma No_Heap_Finalization.
5853 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
5854 * par-prag.adb Pragma No_Heap_Finalization does not need special
5855 processing from the parser.
5856 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
5857 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
5858 * sem_prag.adb Add an entry in table Sig_Flags for pragma
5859 No_Heap_Finalization.
5860 (Analyze_Pragma): Add processing for
5861 pragma No_Heap_Finalization. Update various error messages to
5862 use Duplication_Error.
5863 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
5864 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
5865 and corresponding pragma id.
5867 2017-04-25 Bob Duff <duff@adacore.com>
5869 * freeze.adb (Freeze_Record_Type): Use the
5870 underlying type of the component type to determine whether it's
5871 elementary. For representation clause purposes, a private type
5872 should behave the same as its full type.
5873 * fname.ads, fname.adb (Is_Predefined_File_Name):
5874 Make sure things like "system.ali" are recognized as predefined.
5876 2017-04-25 Javier Miranda <miranda@adacore.com>
5878 * debug.adb: Update documentation of -gnatd.6.
5880 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5882 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
5883 element iterator when the name is an overloaded function call,
5884 one of whose interpretations yields an array.
5886 2017-04-25 Bob Duff <duff@adacore.com>
5888 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
5889 Is_Internal_Unit_Name): New functions for operating on unit
5890 names, as opposed to file names. There's some duplicated code
5891 with fname.adb, which is unfortunate, but it seems like we don't
5892 want to add dependencies here.
5893 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
5894 to Is_Predefined_Unit_Name; the former was wrong, because Uname
5895 is not a file name at all.
5896 * fname.ads, fname.adb: Document the fact that
5897 Is_Predefined_File_Name and Is_Internal_File_Name can be called
5898 for ALI files, and fix the code so it works properly for ALI
5899 files. E.g. these should return True for "system.ali".
5901 2017-04-25 Justin Squirek <squirek@adacore.com>
5903 * exp_util.adb (Add_Invariant): Removed,
5904 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
5905 and Add_Own_Invariant. (Add_Invariant_Check): Used
5906 for adding runtime checks from any kind of invariant.
5907 (Add_Inherited_Invariant): Generates invariant checks for
5908 class-wide invariants (Add_Interface_Invariants): Removed, code
5909 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
5910 Create a types own invariant procedure (Add_Parent_Invariants):
5911 Removed, code moved to Build_Invariant_Procedure_Body
5912 (Build_Invariant_Procedure_Body): Add refactored calls
5913 and integrated code from Add_Parent_Invariants and
5914 Add_Interface_Invariants.
5915 (Process_Type): Removed, the
5916 relavant code was inlined into both Add_Own_Invariant and
5917 Add_Inherited_Invariant.
5919 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5921 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
5922 scn.adb, osint.adb, fname.adb: Minor reformatting.
5924 2017-04-25 Pascal Obry <obry@adacore.com>
5926 * s-taprop-mingw.adb: Do not check for CloseHandle in
5929 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5931 * sem_util.adb (Check_Part_Of_Reference):
5932 Continue to examine the context if the reference appears within
5933 an expression function.
5935 2017-04-25 Justin Squirek <squirek@adacore.com>
5937 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
5938 and Build_Invariant_Procedure_Declaration.
5939 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
5940 and Build_Invariant_Procedure_Declaration from exp_ch7
5941 and break-out Is_Untagged_Private_Derivation from
5942 Build_Invariant_Procedure_Body.
5943 (Replace_Type_References):
5944 Append an extra parameter to allow for dispatching replacements
5945 and add the corrasponding logic.
5946 (Type_Invariant): Remove
5947 Replace_Typ_Refs and replace its references with calls to
5948 Replace_Type_References.
5949 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
5951 2017-04-25 Bob Duff <duff@adacore.com>
5953 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
5954 that returns True when appropriate.
5955 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
5956 when compiling predefined files.
5957 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
5958 "gnat.adc" should not be considered a predefined file name.
5959 That required (or at least encouraged) a lot of cleanup of global
5960 variable usage. We shouldn't be communicating information via
5961 the global name buffer.
5962 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
5963 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
5964 required by the above-mentioned cleanup.
5966 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5968 * osint.adb (Find_File): Handle properly a request for a
5969 configuration file whose name is a directory.
5971 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5973 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
5975 2017-04-25 Bob Duff <duff@adacore.com>
5977 * types.ads: Minor: Fix '???' comment.
5978 * sem_ch8.adb: Minor comment fix.
5980 2017-04-25 Bob Duff <duff@adacore.com>
5982 * sem_prag.adb: Remove suspicious uses of Name_Buf.
5983 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
5984 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
5985 Add String_To_Name with no side effects.
5987 2017-04-25 Justin Squirek <squirek@adacore.com>
5989 * sem_ch3.adb (Analyze_Declarations): Add
5990 additional condition for edge case.
5992 2017-04-25 Bob Duff <duff@adacore.com>
5994 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
5995 reserved words inside pragmas. This is necessary to allow the
5996 pragma name Interface to be used in pragma Ignore_Pragma.
5997 * par.adb: Minor comment fix.
5999 2017-04-25 Javier Miranda <miranda@adacore.com>
6001 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
6002 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
6003 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
6004 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
6005 occurrences of RE_Type_Is_Abstract
6007 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6009 * exp_util.adb (Build_Chain): Account for ancestor
6010 subtypes while traversing the derivation chain.
6012 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6014 * sem_attr.adb: minor reformatting.
6016 2017-04-25 Doug Rupp <rupp@adacore.com>
6018 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
6020 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6022 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
6023 the first pass over an assignment statement with target names,
6024 to prevent the generation of subtypes (such as discriminated
6025 record components)that may carry the target name outside of the
6026 tree for the assignment. The subtypes will be generated when
6027 the assignment is reanalyzed in full.
6028 (Analyze_Target_Name): Handle properly class-wide types.
6030 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6032 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
6033 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6034 the purposes of freezing.
6035 * exp_util.adb Update the documentation and structure of the
6036 type map used in class-wide semantics of assertion expressions.
6037 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6038 and resolve the triaged expression because all substitutions
6039 refer to the proper entities. Update the replacement of
6041 (Build_DIC_Procedure_Body): Add formal parameter
6042 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6043 are now only processed when freezing occurs. Build a body only
6045 (Entity_Hash): Removed.
6046 (Map_Types): New routine.
6047 (Replace_Object_And_Primitive_References): Removed.
6048 (Replace_References): New routine.
6049 (Replace_Type_References): Moved to the library level of Exp_Util.
6050 (Type_Map_Hash): New routine.
6051 (Update_Primitives_Mapping): Update the mapping call.
6052 (Update_Primitives_Mapping_Of_Types): Removed.
6053 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6054 parameter For_Freeze and update the comment on usage.
6055 (Map_Types): New routine.
6056 (Replace_References): New routine.
6057 (Replace_Type_References): Moved to the library level of Exp_Util.
6058 (Update_Primitives_Mapping_Of_Types): Removed.
6059 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6060 properties of the private type to the full view in case the full
6061 view derives from a parent type and inherits a DIC pragma.
6062 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6063 DIC pragma is placed at the top of a declarative region.
6065 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6067 * a-tasatt.adb: Complete previous change and use an unsigned
6068 int to avoid overflow checks.
6070 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6072 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
6073 the error message when the attribute reference is an actual in
6074 a call to a subprogram inherited from a generic formal type with
6075 unknown discriminants, which makes the subprogram and its formal
6076 parameters intrinsic (see RM 6.3.1 (8) and (13)).
6078 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6080 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
6081 sem_prag.adb: Minor reformatting.
6083 2017-04-25 Bob Duff <duff@adacore.com>
6085 * sem_attr.adb (Type_Key): Add code in the
6086 recursive Compute_Type_Key to protect against fetching the source
6087 code for Standard, in case a component of the type is declared
6088 in Standard. There was already code to do this for the original
6089 type, but not for its components.
6091 2017-04-25 Javier Miranda <miranda@adacore.com>
6093 * exp_ch3.adb (Build_Initialization_Call): Handle
6094 subtypes of private types when searching for the underlying full
6095 view of a private type.
6097 2017-04-25 Javier Miranda <miranda@adacore.com>
6099 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
6100 real conditional expression can appear in a fixed-type context
6101 and must be resolved with that context to facilitate the code
6102 generation to the backend.
6104 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6106 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
6107 to indicate whether during inline processing, when some unit U1
6108 appears in the context of a unit U2 compiled for instantiation
6109 or inlining purposes, the body of U1 needs to be compiled as well.
6110 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
6111 context is a package declaration.
6112 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
6113 Analyze_Generic_Package_Declaration): ditto.
6114 * inline.adb (Analyze_Inlined_Bodies): Check
6115 Body_Needed_For_Inlining.
6117 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6119 * par.adb (Current_Assign_Node): Global variable use to record
6120 the presence of a target_name in the right hand side of the
6121 assignment being parsed.
6122 * par-ch4.adb (P_Name): If the name is a target_name, mark the
6123 enclosing assignment node accordingly.
6124 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
6126 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
6127 analyzing RHS if the statement has target_names.
6128 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
6129 properly choices that are subtype marks.
6130 * exp_ch5.adb: Code cleanup.
6132 2017-04-25 Bob Duff <duff@adacore.com>
6134 * s-memory.adb: Add a comment regarding efficiency.
6135 * atree.adb: Fix the assertion, and combine 2 assertions into one,
6136 "the source has an extension if and only if the destination does."
6137 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
6139 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6141 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
6144 2017-04-25 Doug Rupp <rupp@adacore.com>
6146 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
6147 handling for ppc64-vx7.
6148 * sigtramp-vxworks-target.inc
6149 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
6151 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6153 * ada_get_targ.adb: New file.
6155 2017-04-25 Bob Duff <duff@adacore.com>
6157 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
6158 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
6159 (UI_GCD): Remove ??? comment involving possible efficiency
6160 improvements. This just isn't important after all these years.
6162 * uintp.ads: Minor cleanup.
6164 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6166 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
6167 Revert previous changes.
6168 * scng.adb: Minor reformatting.
6169 * s-stratt.ads: Fix unbalanced parens in comment.
6171 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6173 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
6176 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6178 * scng.adb (Scan): Handle '@' appropriately.
6179 * sem_ch5.adb: Code cleanup.
6181 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6183 * freeze.adb (Check_Expression_Function): Do not check for the
6184 use of deferred constants if the freezing of the expression
6185 function is triggered by its generated body, rather than a
6188 2017-04-25 Javier Miranda <miranda@adacore.com>
6190 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
6191 subtypes of private types when performing the view conversion.
6193 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6195 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6196 the purposes of freezing.
6197 * exp_util.adb Update the documentation and structure of the
6198 type map used in class-wide semantics of assertion expressions.
6199 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6200 and resolve the triaged expression because all substitutions
6201 refer to the proper entities. Update the replacement of
6203 (Build_DIC_Procedure_Body): Add formal parameter
6204 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6205 are now only processed when freezing occurs. Build a body only
6207 (Entity_Hash): Removed.
6208 (Map_Types): New routine.
6209 (Replace_Object_And_Primitive_References): Removed.
6210 (Replace_References): New routine.
6211 (Replace_Type_References): Moved to the library level of Exp_Util.
6212 (Type_Map_Hash): New routine.
6213 (Update_Primitives_Mapping): Update the mapping call.
6214 (Update_Primitives_Mapping_Of_Types): Removed.
6215 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6216 parameter For_Freeze and update the comment on usage.
6217 (Map_Types): New routine.
6218 (Replace_References): New routine.
6219 (Replace_Type_References): Moved to the library level of Exp_Util.
6220 (Update_Primitives_Mapping_Of_Types): Removed.
6221 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6222 properties of the private type to the full view in case the full
6223 view derives from a parent type and inherits a DIC pragma.
6224 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6225 DIC pragma is placed at the top of a declarative region.
6227 2017-04-25 Tristan Gingold <gingold@adacore.com>
6229 * s-mmap.ads (Data): Add pragma Inline.
6231 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6233 * checks.adb (Insert_Valid_Check): Do not use
6234 a renaming to alias a volatile name because this will lead to
6235 multiple evaluations of the volatile name. Use a constant to
6236 capture the value instead.
6238 2017-04-25 Doug Rupp <rupp@adacore.com>
6240 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
6242 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6244 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
6245 Add out parameter to indicate to caller that a wrapper must
6246 be constructed for an inherited primitive whose inherited
6247 pre/postcondition has called to overridden primitives.
6248 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
6249 for inherited primitive that requires it.
6250 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
6251 legal primitive operations and belong to the list of bodies
6252 generated after the freeze point of a type.
6253 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
6254 of Build_Class_Wide_Expression.
6255 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
6256 to construct the specification of the wrapper subprogram created
6257 for an inherited operation.
6259 2017-04-25 Bob Duff <duff@adacore.com>
6261 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
6262 pthread_mutexattr_setprioceiling): Add new interfaces for these
6264 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
6265 protocols as appropriate for Locking_Policy 'C' and 'I'.
6266 * s-taprop-posix.adb: Minor reformatting to make it more similar
6267 to s-taprop-linux.adb.
6269 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6271 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
6272 Handle properly a multi- level derivation involving both renamed
6273 and constrained parent discriminants, when the type to be
6274 constrained has fewer discriminants that the ultimate ancestor.
6276 2017-04-25 Bob Duff <duff@adacore.com>
6278 * sem_util.adb (Is_Object_Reference): In the
6279 case of N_Explicit_Dereference, return False if it came from a
6280 conditional expression.
6282 2017-04-25 Bob Duff <duff@adacore.com>
6284 * par-ch4.adb (P_Case_Expression): If a semicolon
6285 is followed by "when", assume that ";" was meant to be ",".
6287 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6289 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
6292 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6294 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
6295 loading of an entity.
6296 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
6297 previously repeated in the analysis.
6298 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
6299 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
6300 use new procedure SPARK_Implicit_Load.
6301 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
6302 SPARK_Implicit_Load.
6304 2017-04-25 Javier Miranda <miranda@adacore.com>
6306 * sem_util.adb (New_Copy_Tree): By default
6307 copying of defining identifiers is prohibited because
6308 this would introduce an entirely new entity into the
6309 tree. This patch introduces an exception to this general
6310 rule: the declaration of constants and variables located in
6311 Expression_With_Action nodes.
6312 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
6313 (In_Map): New subprogram.
6314 (Visit_Entity): New subprogram.
6315 (Visit_Node): Handle EWA_Level,
6316 EWA_Inner_Scope_Level, and take care of defining entities defined
6317 in Expression_With_Action nodes.
6319 2017-04-25 Thomas Quinot <quinot@adacore.com>
6321 * exp_ch6.adb: minor comment edit.
6322 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
6323 procedure specifications that come from source.
6324 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
6325 Null_Statement attribute.
6326 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
6327 procedure, generate statement SCO for the generated NULL statement.
6328 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
6329 parser, if available.
6331 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6333 * system-linux-s390.ads: Use Long_Integer'Size to define
6336 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
6338 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
6340 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6342 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
6343 * g-socket.adb (To_Host_Entry): Fix typo in comment.
6344 * gnat_ugn.texi: Fix typo.
6345 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
6346 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
6347 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
6348 * sem_util.adb (Mark_Coextensions): Likewise.
6349 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
6351 2017-03-28 Andreas Schwab <schwab@suse.de>
6354 * system-linux-aarch64-ilp32.ads: New file.
6355 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6356 from LIBGNAT_TARGET_PAIRS.
6357 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6358 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6359 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6360 or -mabi=ilp32, resp.
6362 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
6364 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
6366 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
6369 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
6371 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
6374 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
6376 * system-linux-arm.ads (Default_Bit_Order): Likewise.
6377 * system-linux-mips.ads (Default_Bit_Order): Likewise.
6378 * system-linux-armeb.ads: Delete.
6379 * system-linux-mipsel.ads: Likewise.
6380 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
6381 (ARM/Linux): Likewise.
6383 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6386 * gcc-interface/misc.c (gnat_handle_option): Pass true to
6387 handle_generated_option GENERATED_P.
6389 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6391 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
6392 around a justified modular type if it doesn't have the same scalar
6393 storage order as the enclosing record type.
6395 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6397 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
6398 of boolean rvalues to function calls.
6400 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6402 * gcc-interface/utils.c (fold_bit_position): New function.
6403 (rest_of_record_type_compilation): Call it instead of bit_position to
6404 compute the field position and remove the call to remove_conversions.
6405 (compute_related_constant): Factor out the multiplication in both
6406 operands, if any, and streamline the final test.
6408 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6410 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
6412 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6414 * gcc-interface/decl.c: Include demangle.h.
6415 (is_cplusplus_method): Return again true for a primitive operation
6416 only if it is dispatching. For a subprogram with an interface name,
6417 call the demangler to get the number of C++ parameters and compare it
6418 with the number of Ada parameters.
6420 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6422 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
6423 there is no end label, put the location of the At_End procedure on
6424 the call to the procedure.
6426 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6428 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
6429 value for array types with TYPE_INDEX_TYPE set on their domain type.
6430 * gcc-interface/utils.c (max_size): For operations and expressions, do
6431 not build a new node if the operands have not changed or are missing.
6433 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6435 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
6436 argument when recursing on TRUTH_NOT_EXPR.
6438 2017-02-12 John Marino <gnugcc@marino.st>
6440 * system-freebsd-x86.ads: Rename into...
6441 * system-freebsd.ads: ...this.
6442 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
6443 * gcc-interface/Makefile.in: Support aarch64-freebsd.
6444 (x86-64/FreeBSD): Adjust to above renaming.
6445 (i386/FreeBSD): Likewise.
6447 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
6449 * comperr.adb: Update FSF bug reporting URL.
6451 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
6452 Jakub Jelinek <jakub@redhat.com>
6455 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
6457 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
6460 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
6461 to build_translation_unit_decl.
6463 2017-01-23 Javier Miranda <miranda@adacore.com>
6465 * sem_util.adb (New_Copy_Tree): Code cleanup:
6466 removal of the internal map (ie. variable Actual_Map, its
6467 associated local variables, and all the code handling it).
6468 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
6469 force loading of the System package when processing a task type.
6470 (Analyze_Protected_Type_Declaration): in GNATprove mode force
6471 loading of the System package when processing a protected type.
6472 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
6473 force loading of the System package when processing compilation
6474 unit with a main-like subprogram.
6475 * frontend.adb (Frontend): remove forced loading of the System
6478 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6480 * sem_prag.adb (Default_Initial_Condition): If the desired type
6481 declaration is a derived type declaration with discriminants,
6482 it is rewritten as a private type declaration.
6483 * sem_ch13.adb (Replace_Type_References_Generic,
6484 Visible_Component): A discriminated private type with descriminnts
6485 has components that must be rewritten as selected components
6486 if they appear as identifiers in an aspect expression such as
6487 a Default_Initial_Condition.
6488 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
6491 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6493 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
6494 * gnat1drv.adb Generate an empty object file for an ignored
6495 Ghost compilation unit.
6496 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
6498 2017-01-23 Yannick Moy <moy@adacore.com>
6500 * sem_ch4.adb (Analyze_Indexed_Component_Form):
6501 Adapt to inlined prefix with string literal subtype.
6502 * inline.adb (Expand_Inlined_Call): Keep unchecked
6503 conversion inside inlined call when formal type is constrained.
6505 2017-01-23 Javier Miranda <miranda@adacore.com>
6507 * sem_util.adb (New_Copy_Tree): Code cleanup:
6508 removal of global variables. All the global variables, global
6509 functions and tables of this subprogram are now declared locally.
6511 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6513 * exp_strm.ads: Minor reformatting and typo fixes.
6515 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6517 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
6518 exp_aggr.adb: Minor reformatting.
6519 * g-diopit.adb: minor grammar/punctuation fix in comment.
6520 * g-byorma.ads: minor fix of unbalanced parens in comment.
6522 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6524 * par.adb: Update the documentation of component Labl.
6525 * par-ch6.adb (P_Return_Statement): Set the expected label of
6526 an extended return statement to Error.
6528 2017-01-23 Tristan Gingold <gingold@adacore.com>
6530 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
6532 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6534 * expander.adb: Handle N_Delta_Aggregate.
6536 2017-01-23 Javier Miranda <miranda@adacore.com>
6538 * exp_ch6.adb (Expand_Call): Improve the code that
6539 checks if some formal of the called subprogram is a class-wide
6540 interface, to handle subtypes of class-wide interfaces.
6542 2017-01-23 Javier Miranda <miranda@adacore.com>
6544 * checks.adb (Apply_Parameter_Aliasing_Checks):
6545 Remove side effects of the actuals before generating the overlap
6548 2017-01-23 Justin Squirek <squirek@adacore.com>
6550 * exp_strm.ads, exp_strm.ads
6551 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
6552 as to avoid getting the underlying type by default.
6553 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
6554 underlying type in the Iiput and output attribute cases when
6555 building their respective functions.
6557 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6559 * scng.adb: Minor reformatting of error message.
6561 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6563 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
6564 to freeze the return type of an expression funxtion that is a
6565 completion, if the type is a limited view and the non-limited
6568 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6570 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
6571 aggregate construct.
6572 (P_Record_Or_Array_Component_Association): An array aggregate
6573 can start with an Iterated_Component_Association.
6574 * scng.adb: Modify error message on improper use of @ in earlier
6575 versions of the language.
6576 * sinfo.ads: New node kind N_Delta_Aggregate.
6577 * sinfo.adb: An N_Delta_Aggregate has component associations and
6579 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
6580 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
6581 Create a new index for each one of the choices in the association,
6582 to prevent spurious homonyms in the scope.
6583 (Resolve_Delta_Aggregate): New.
6584 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
6585 * exp_util.adb (Insert_Actions): Take into account
6587 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
6588 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
6589 and local procedures Expand_Delta_Array_Aggregate and
6590 expand_Delta_Record_Aggregate.
6591 * sprint.adb: Handle N_Delta_Aggregate.
6593 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6595 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
6596 empty name when the exception declaration is subject to pragma
6598 (Null_String): New routine.
6600 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6602 * par-ch9.adb (P_Protected_Definition): Parse
6603 any optional and potentially illegal pragmas which appear in
6604 a protected operation declaration list.
6605 (P_Task_Items): Parse
6606 any optional and potentially illegal pragmas which appear in a
6609 2017-01-23 Pascal Obry <obry@adacore.com>
6611 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
6612 is needed when a foreign thread call a Win32 API using a thread handle
6613 like GetThreadTimes() for example.
6615 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6617 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6618 allow an 'Address clause to be specified on a prefix of a
6621 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6623 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6624 attribute 'Valid is a renaming of the original expression when
6625 the expression denotes a name. For all other kinds of expression,
6626 use a constant to capture the value.
6627 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6628 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6630 2017-01-23 Justin Squirek <squirek@adacore.com>
6632 * sem_eval.adb (Eval_Integer_Literal): Add special
6633 case to avoid optimizing out check if the literal appears in
6636 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6638 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6639 allow an 'Address clause to be specified on a prefix of a
6642 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6644 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6645 attribute 'Valid is a renaming of the original expression when
6646 the expression denotes a name. For all other kinds of expression,
6647 use a constant to capture the value.
6648 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6649 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6651 2017-01-23 Justin Squirek <squirek@adacore.com>
6653 * sem_eval.adb (Eval_Integer_Literal): Add special
6654 case to avoid optimizing out check if the literal appears in
6657 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6659 * sem_ch4.adb (Try_Primitive_Operations,
6660 Is_Valid_First_Argument_Of): argument is valid if it is a derived
6661 type with unknown discriminants that matches its underlying
6663 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
6664 expression if its type is derived from a limited type with
6665 unknown discriminants, because the expansion (which is a call)
6666 must be expanded in the enclosing context to add the proper build-
6667 in-place parameters to the call.
6668 * lib.ads, exp_ch9.adb: Minor fixes in comments.
6670 2017-01-23 Yannick Moy <moy@adacore.com>
6672 * frontend.adb (Frontend): Do not load runtime
6673 unit for GNATprove when parsing failed.
6674 * exp_ch9.adb: minor removal of extra whitespace
6675 * exp_ch6.adb: minor typo in comment
6676 * sem_util.adb: Code cleanup.
6677 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
6678 * a-ngcefu.adb: minor style fix in whitespace
6680 2017-01-23 Thomas Quinot <quinot@adacore.com>
6682 * scos.ads: Document usage of 'd' as default SCO kind for
6684 * par_sco.adb (Traverse_Declarations_Or_Statements.
6685 Traverse_Degenerate_Subprogram): New supporting routine for expression
6686 functions and null procedures.
6687 (Traverse_Declarations_Or_Statements.Traverse_One): Add
6688 N_Expression_Function to the subprogram case; add required
6689 support for null procedures and expression functions.
6691 2017-01-23 Bob Duff <duff@adacore.com>
6693 * namet.ads (Bounded_String): Decrease the size of type
6694 Bounded_String to avoid running out of stack space.
6695 * namet.ads (Append): Don't ignore buffer overflow; raise
6696 Program_Error instead.
6698 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6700 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
6701 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
6703 * exp_ch9.adb: minor style fix in comment.
6705 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6707 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
6708 for a limited record extension with unknown discriminants whose
6709 full view has no discriminants.
6711 2017-01-23 Yannick Moy <moy@adacore.com>
6713 * exp_spark.adb: Alphabetize with clauses.
6715 2017-01-23 Yannick Moy <moy@adacore.com>
6717 * sem_util.adb (Has_Enabled_Property): Treat
6718 protected objects and variables differently from other variables.
6720 2017-01-23 Thomas Quinot <quinot@adacore.com>
6722 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
6723 Split original Ada 95 part off into new subprogram
6724 below. Call that subprogram (instead of proceeding with
6725 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
6726 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
6727 * debug.adb Document new switch -gnatd.p
6728 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
6729 record for reverse bit order if an error has already been posted
6730 on the record type. This avoids generating extraneous "info:"
6731 messages for illegal code.
6733 2017-01-23 Justin Squirek <squirek@adacore.com>
6735 * sem_ch3.adb (Analyze_Declarations): Correct comments
6736 * freeze.adb (Find_Constant): Add detection of deferred constants
6737 so they are not incorrectly flagged as premature.
6739 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6741 * scans.ads: New token At_Sign. Remove '@' from list of illegal
6742 characters for future version of the language. '@' is legal name.
6743 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
6744 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
6745 denotes a Target_Name.
6746 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
6747 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
6748 (Has_Target_Names): New flag on N_Assignment_Statement, to
6749 indicate that RHS has occurrences of N_Target_Name.
6750 * sem.adb: Call Analyze_Target_Name.
6751 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
6752 (urrent_LHS): Global variable that denotes LHS of assignment,
6753 used in the analysis of Target_Name nodes.
6754 * sem_res.adb (Resolve_Target_Name): New procedure.
6755 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
6756 N is an assignment statement whose RHS contains occurences of @
6757 that designate the value of the LHS of the assignment. If the
6758 LHS is side-effect free the target names can be replaced with
6759 a copy of the LHS; otherwise the semantics of the assignment
6760 is described in terms of a procedure with an in-out parameter,
6761 and expanded as such.
6762 (Expand_N_Assignment_Statement): Call
6763 Expand_Assign_With_Target_Names when needed.
6764 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
6765 * sprint.adb: Handle N_Target_Name.
6767 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
6769 * checks.adb: Minor fix in comment.
6771 2017-01-23 Philippe Gil <gil@adacore.com>
6773 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
6774 count in Sort = Memory_Usage or Allocations_Count
6776 2017-01-23 Justin Squirek <squirek@adacore.com>
6778 * sem_ch3.adb: Code cleanup.
6780 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6782 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
6783 variables to the local variable section. Update the profile
6784 of various nested routine that previously had visibility
6785 of those globals. One the matching phase has completed,
6786 remove certain classes of clauses which are considered noise.
6787 (Check_Dependency_Clause): Properly detect a match between two
6788 'Result attributes. Update the various post-match cases to use
6789 Is_Already_Matched as this routine now automatically recognizes
6790 a previously matched 'Result attribute.
6791 (Is_Already_Matched): New routine.
6792 (Remove_Extra_Clauses): New routine.
6793 (Report_Extra_Clauses): Remove the detection of ... => null
6794 clauses as this is now done in Remove_Extra_Clauses.
6796 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6798 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
6799 report on spurious overlaps between values involving a subtype
6800 with a static predicate, because the expansion of such a subtype
6801 into individual ranges in inhibited in ASIS mode.
6803 2017-01-23 Justin Squirek <squirek@adacore.com>
6805 * sem_ch3.adb (Analyze_Declarations): Add detection
6806 of an edge case and delay freezing if it is present.
6808 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6810 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
6811 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
6813 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6815 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
6816 access-to-subprogram types inherit the convention of the
6817 associated subprogram. (Set_Profile_Convention): New routine.
6818 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
6819 of the two entities directly, use Conventions_Match to account
6820 for anonymous access-to-subprogram and subprogram types.
6821 (Conventions_Match): New routine.
6823 2017-01-23 Claire Dross <dross@adacore.com>
6825 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
6826 which return Universal_Integer, force the overflow check flag for
6827 Length and Range_Length for types as big as Long_Long_Integer.
6829 2017-01-23 Claire Dross <dross@adacore.com>
6831 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
6832 attributes which return Universal_Integer, introduce a conversion
6833 to the expected type with the appropriate check flags set.
6834 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
6835 base type if the range is null. It may still be invalid if it
6836 is higher than the lower bound. This is checked later in the
6837 context in which the range appears.
6839 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
6841 * scos.ads: Introduce a constant to represent ignored
6842 dependencies in SCO_Unit_Table_Entry.
6844 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6846 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
6847 spaces from error messages.
6849 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6851 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
6852 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
6853 an object declaration for an array type with a modular index type
6854 with the size of Long_Long_Integer. Special processing is needed
6855 in this case to compute reliably the size of the object, and
6856 eventually to raise Storage_Error, when wrap-around arithmetic
6857 might compute a meangingless size for the object.
6859 2017-01-23 Justin Squirek <squirek@adacore.com>
6861 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
6862 sem_type.adb: Code cleanups.
6864 2017-01-23 Bob Duff <duff@adacore.com>
6866 * sem_res.adb (Resolve_Call): In the part of the code where
6867 it is deciding whether to turn the call into an indexed
6868 component, avoid doing so if the call is to an instance of
6869 Unchecked_Conversion. Otherwise, the compiler turns it into an
6870 indexed component, and resolution of that turns it back into a
6871 function call, and so on, resulting in infinite recursion.
6872 * sem_util.adb (Needs_One_Actual): If the first formal has a
6873 default, then return False.
6875 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
6877 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
6878 optimizations when the type is modular and the offsets are equal.
6880 2017-01-20 Thomas Quinot <quinot@adacore.com>
6882 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
6885 2017-01-20 Nicolas Roche <roche@adacore.com>
6887 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
6889 2017-01-20 Bob Duff <duff@adacore.com>
6891 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
6892 (etc) optimizations when the type is modular.
6894 2017-01-20 Yannick Moy <moy@adacore.com>
6896 * sem_ch6.adb (Move_Pragmas): move some pragmas,
6897 but copy the SPARK_Mode pragma instead of moving it.
6898 (Build_Subprogram_Declaration): Ensure that the generated spec
6899 and original body share the same SPARK_Pragma aspect/pragma.
6900 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
6901 procedure to copy SPARK_Mode aspect.
6903 2017-01-20 Bob Duff <duff@adacore.com>
6905 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
6907 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
6908 Empty even in ASIS mode.
6910 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6912 * exp_ch9.adb: minor style fixes in comments.
6913 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
6914 relative statement introduces an implicit dependency on
6915 Ada.Real_Time.Clock_Time.
6916 * sem_util.adb: Minor reformatting.
6918 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6920 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
6921 must be treated as delayed aspect even if the expression is
6922 a literal, because the aspect affects the freezing and the
6923 elaboration of the object to which it applies.
6925 2017-01-20 Tristan Gingold <gingold@adacore.com>
6927 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
6929 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6931 * lib-xref.adb (Generate_Reference): Do not warn about the
6932 presence of a pragma Unreferenced if the entity appears as the
6933 actual in a procedure call that does not come from source.
6935 2017-01-20 Pascal Obry <obry@adacore.com>
6937 * expect.c, terminals.c: Fix some warnings about unused variables.
6938 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
6941 2017-01-20 Bob Duff <duff@adacore.com>
6943 * exp_attr.adb (Constrained): Apply an access check (check that
6944 the prefix is not null) when the prefix denotes an object of an
6945 access type; that is, when there is an implicit dereference.
6947 2017-01-20 Gary Dismukes <dismukes@adacore.com>
6949 * s-rident.ads (constant Profile_Info): Remove
6950 No_Calendar from GNAT_Extended_Ravenscar restrictions.
6952 2017-01-20 Tristan Gingold <gingold@adacore.com>
6954 * s-maccod.ads: Add pragma No_Elaboration_Code_All
6956 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6958 * ghost.adb (Mark_Ghost_Clause): New routine.
6959 (Prune_Node): Do not prune compilation unit nodes.
6960 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
6961 This does not touch the node itself, but does prune all its fields.
6962 * ghost.ads (Mark_Ghost_Clause): New routine.
6963 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
6964 package clause mentions Ghost and non-Ghost packages. Mark a
6965 use package clause as Ghost when it mentions a Ghost package.
6966 (Analyze_Use_Type): Emit an error when a use type clause mentions
6967 Ghost and non-Ghost types. Mark a use type clause as Ghost when
6968 it mentions a Ghost type.
6969 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
6970 Ghost when it withs a Ghost unit.
6972 2017-01-20 Javier Miranda <miranda@adacore.com>
6974 * sem_res.adb (Resolve_Call): If a function call
6975 returns a limited view of a type and at the point of the call the
6976 function is not declared in the extended main unit then replace
6977 it with the non-limited view, which must be available. If the
6978 called function is in the extended main unit then no action is
6979 needed since the back-end handles this case.
6981 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
6983 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
6984 (Contains_Subprograms_Refs): ...this. Adjust comment
6985 for constants. (Is_Subp_Or_Const_Ref): Rename into...
6986 (Is_Subprogram_Ref): ...this.
6987 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
6988 Has_Non_Subprograms_Referencer and adjust comment. Remove
6989 incorrect shortcut for package declarations and bodies.
6991 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6993 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
6994 base type differs from that of the completion and the private
6995 subtype is an itype (created for a constraint on an access
6996 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
6999 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7001 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7002 When inheriting the SPARK_Mode of a prior expression function,
7003 look at the properly resolved entity rather than the initial
7004 candidate which may denote a homonym.
7006 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7008 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
7009 Precondition or Postcondition, and the context is pragma
7010 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
7011 and suggest the standard names Assertion_Policy /Pre /Post
7014 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7016 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
7018 2017-01-20 Javier Miranda <miranda@adacore.com>
7020 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
7022 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
7023 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
7026 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7028 * sem_ch13.adb (Analyze_Aspect_Specification, case
7029 Dynamic_Predicate): If the entity E is a subtype that inherits
7030 a static predicate for its parent P,, the inherited and the
7031 new predicate combine in the generated predicate function,
7032 and E only has a dynamic predicate.
7034 2017-01-20 Tristan Gingold <gingold@adacore.com>
7036 * s-boustr.ads, s-boustr.adb: New package.
7037 * Makefile.rtl: Add s-boustr.
7039 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7041 * inline.adb (Process_Formals): Qualify the
7042 expression of a return statement when it yields a universal type.
7044 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7046 * freeze.adb (Freeze_All): Freeze the default
7047 expressions of all eligible formal parameters that appear in
7048 entries, entry families, and protected subprograms.
7050 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7052 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
7053 for illegal inherited Implicit_Dereference aspects with renamed
7056 2017-01-20 Javier Miranda <miranda@adacore.com>
7058 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
7059 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
7060 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
7061 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
7062 Set_Prev, Tree_Read): Adding assertion.
7063 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
7064 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
7065 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
7066 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
7067 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
7068 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
7069 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
7070 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
7071 Set_ListN_With_Parent): Adding assertion.
7073 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7075 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
7076 import that applies to several homograph subprograms. when one
7077 of them is declared by a subprogram body.
7079 2017-01-20 Justin Squirek <squirek@adacore.com>
7081 * exp_ch6.adb (Expand_Call): Remove optimization
7082 that nulls out calls to null procedures.
7084 2017-01-20 Yannick Moy <moy@adacore.com>
7086 * inline.adb (Expand_Inlined_Call): Keep more
7087 precise type of actual for inlining whenever possible. In
7088 particular, do not switch to the formal type in GNATprove mode in
7089 some case where the GNAT backend might require it for visibility.
7091 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7093 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
7094 aspect Implicit_Dereference can be inherited by a full view if
7095 the partial view has no discriminants, because there is no way
7096 to apply the aspect to the partial view.
7097 (Build_Derived_Record_Type): If derived type renames discriminants
7098 of the parent, the new discriminant inherits the aspect from
7100 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
7101 call through an access discriminant designating a subprogram.
7102 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
7103 properly a parameterless call through an access discriminant on
7104 the left-hand side of an assignment.
7105 * sem_res.adb (resolve): If an interpreation involves a
7106 discriminant with an implicit dereference and the expression is an
7107 entity, resolution takes place later in the appropriate routine.
7108 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
7109 access discriminants that designate a subprogram type.
7111 2017-01-20 Pascal Obry <obry@adacore.com>
7113 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
7115 2017-01-20 Yannick Moy <moy@adacore.com>
7117 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
7118 on implicitly with'ed units in GNATprove mode.
7119 * sinfo.ads (Implicit_With): Document use of flag for implicitly
7120 with'ed units in GNATprove mode.
7122 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7124 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
7125 unit Do not report an error on a non-static entity that appears
7126 in the context of a spec expression, such as an aspect expression.
7128 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7130 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
7131 (Is_Underlying_Full_View): New routine.
7132 (Set_Is_Underlying_Full_View): New routine.
7133 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
7134 * einfo.ads Add new attribute Is_Underlying_Full_View.
7135 (Is_Underlying_Full_View): New routine along with pragma Inline.
7136 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
7137 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
7138 class-wide types and underlying full views. The first subtype
7139 is used as the working type for all Itypes, not just array base types.
7140 (Build_DIC_Procedure_Declaration): Do not consider
7141 class-wide types and underlying full views. The first subtype
7142 is used as the working type for all Itypes, not just array
7144 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
7145 view or an underlying full view without clobbering the attributes
7146 of a previous freeze node.
7147 (Inherit_Freeze_Node): New routine.
7148 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
7150 (Build_Underlying_Full_View): Mark an underlying full view as such.
7151 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
7154 2017-01-20 Yannick Moy <moy@adacore.com>
7156 * sinfo.ads: Document lack of Do_Division_Check flag
7157 on float exponentiation.
7159 2017-01-19 Javier Miranda <miranda@adacore.com>
7161 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
7162 identifier attribute of a block-statement node. Required to avoid
7163 assertion failure when building the new containers library.
7165 2017-01-19 Bob Duff <duff@adacore.com>
7167 * exp_ch3.adb: Update comment.
7169 2017-01-19 Vincent Celier <celier@adacore.com>
7171 * gprep.adb (Gnatprep): Parse the definition file without
7172 "replace in comments" even when switch -C is used.
7174 2017-01-19 Justin Squirek <squirek@adacore.com>
7176 * exp_ch9.adb (Is_Pure_Barrier): Create function
7177 Is_Count_Attribute to identify an expansion of the 'Count
7180 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7182 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
7183 statements within an element iterator loop are only analyzed
7184 agter the loop is rewritten. Within a generic the analysis must
7185 be performed in any case to complete name capture.
7187 2017-01-19 Bob Duff <duff@adacore.com>
7189 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
7190 before checking for unrecognized pragmas.
7191 Initialize Pname on its declarations; that's always good style.
7193 2017-01-19 Claire Dross <dross@adacore.com>
7195 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
7196 body into the tree for GNATprove by setting its Parent field. The
7197 components invariants of composite types are not checked by
7198 the composite type's invariant procedure in GNATprove mode.
7199 (Build_Invariant_Procedure_Declaration): Semi-insert the
7200 declaration into the tree for GNATprove by setting its Parent
7202 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
7203 the component invariants to the array type invariant procedure
7204 so that the procedure can be used to check the array type
7206 (Freeze_Record_Type): In GNATprove mode, do
7207 not add the component invariants to the record type invariant
7208 procedure so that the procedure can be used to check the record
7209 type invariants if any.
7211 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7213 * lib-xref-spark_specific.adb: Minor reformatting.
7214 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
7216 2017-01-19 Javier Miranda <miranda@adacore.com>
7218 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
7219 Build_Back_End_Aggregate.
7220 (Generate_Aggregate_For_Derived_Type): Code cleanup.
7221 (Prepend_Stored_Values): Code cleanup.
7223 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7225 * sem_ch6.adb (Analyze_Expression_Function): Check for an
7226 incomplete return type after attempting to freeze it, so that
7227 other freeze actiona are generated in the proper order.
7229 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7231 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
7232 type, ie. a type whose component is a character type, and the
7233 aggregate is positional, do not convert into a string literal
7234 if the index type is not an integer type, because the original
7235 type may be required in an enclosing operation.
7237 2017-01-19 Bob Duff <duff@adacore.com>
7239 * binde.adb, debug.adb: Enable new elaboration order algorithm
7240 by default. -dp switch reverts to the old algorithm.
7242 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7244 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
7245 (Analyze_Declarations): Create the DIC and Invariant
7246 procedure bodies s after all freezing has taken place.
7247 (Build_Assertion_Bodies): New routine.
7248 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
7250 (Analyze_Package_Specification): Remove the
7251 generation of the DIC and Invariant procedure bodies. This is
7252 now done by Analyze_Declarations.
7253 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
7254 procedures are never treated as primitives.
7256 2017-01-19 Yannick Moy <moy@adacore.com>
7258 * frontend.adb: Analyze inlined bodies and check elaboration
7259 rules in GNATprove mode too.
7260 * sem_elab.adb (Delay_Element): Add Boolean component to save
7261 indication that call is in SPARK code. (Check_Elab_Calls):
7262 Check elaboration rules in GNATprove mode, and correctly set
7263 the current value of SPARK_Mode.
7264 * lib-xref-spark_specific.adb
7265 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
7267 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7269 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
7270 checks on the expression for the high bound of concatenation
7271 when checks are disabled, to suppress warnings about potential
7272 constraint errors in restricted runtimes.
7274 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7276 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
7277 representation-to-position function as inlined.
7278 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
7279 the purity of an internally generated entity if it has been
7280 explicitly marked as pure for optimization purposes.
7281 * exp_aggr.adb: Minor reformatting.
7283 2017-01-19 Javier Miranda <miranda@adacore.com>
7285 * exp_ch6.adb (Expand_Call): Remove side effects on
7286 actuals that are allocators with qualified expression since the
7287 initialization of the object is performed by means of individual
7288 statements (and hence it must be done before the call).
7290 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7292 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
7293 (Build_Derived_Enumeration_Type): If the derived type inherits a
7294 dynamic predicate from its parent, the bounds of the type must
7295 freeze because an explicit constraint is constructed for the
7296 type and the corresponding range is elaborated now.
7298 2017-01-19 Arnaud Charlet <charlet@adacore.com>
7300 * sem_attr.ads: minor fix of inconsistent casing in comment
7301 * lib-writ.ads: minor align comments in columns
7302 * sem_ch3.adb: Minor reformatting.
7303 * spark_xrefs.ads: minor fix typo in SPARK-related comment
7304 * table.ads: minor style fix in comment
7305 * lib-xref-spark_specific.adb
7306 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
7307 * sem_ch12.adb: minor whitespace fix
7308 * freeze.adb: Add comment.
7309 * sem_util.adb (Unique_Name): for instances of
7310 generic subprograms ignore the name of the wrapper package.
7312 2017-01-19 Javier Miranda <miranda@adacore.com>
7314 * exp_aggr.adb (Resolve_Record_Aggregate):
7315 Factorize code needed for aggregates of limited and unlimited
7316 types in a new routine.
7317 (Pass_Aggregate_To_Back_End): New subprogram.
7319 2017-01-19 Yannick Moy <moy@adacore.com>
7321 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
7323 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7325 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
7326 public, for use elsewhere.
7327 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
7328 an Inlined_body, recognize a call that uses object notation
7329 and has not been rewritten as a regular call because regular
7330 expansion has not taken place.
7332 2017-01-19 Bob Duff <duff@adacore.com>
7334 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
7335 in case of generic formal discrete types, because it causes crashes in
7336 the compiler when built with assertions on.
7338 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7340 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
7341 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
7343 2017-01-19 Bob Duff <duff@adacore.com>
7345 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
7346 Increment Warnings_Detected. It was decrementing, which is
7347 wrong since we just issued a warning message.
7348 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
7349 these variables to be of subtype Nat instead of Int, because
7350 they should never be negative.
7352 2017-01-19 Javier Miranda <miranda@adacore.com>
7354 * contracts.adb (Build_Postconditions_Procedure): Replace
7355 Generate_C_Code by Modify_Tree_For_C.
7356 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
7357 Replace Generate_C_Code by Modify_Tree_For_C.
7358 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
7360 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
7361 Generate_C_Code by Modify_Tree_For_C.
7362 * exp_ch4.adb (Expand_Allocator_Expression): Replace
7363 Generate_C_Code by Modify_Tree_For_C.
7364 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
7365 by Modify_Tree_For_C.
7366 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
7367 Generate_C_Code by Modify_Tree_For_C.
7368 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
7369 by Modify_Tree_For_C.
7370 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
7372 2017-01-19 Javier Miranda <miranda@adacore.com>
7374 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
7376 (Is_Inlinable_Expression_Function): New subprogram.
7377 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
7379 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
7381 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7383 * sem_ch4.adb (Diagnose_Call): Improve error message when a
7384 selected component has a prefix that might be interpreted
7385 as a parameterless function call, but none of the candidate
7386 interpretations is parameterless, and there is a hidden homonym
7387 of the prefix that is a package.
7388 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
7389 interpreted as a parameterless function call and its analysis
7390 fails, do not call Analyze_Selected_Component.
7392 2017-01-19 Steve Baird <baird@adacore.com>
7394 * sem_util.ads: Add new Use_Full_View Boolean parameter to
7396 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
7397 calls to a newly-defined Scalar_Range_Of_Right_View function.
7399 2017-01-19 Arnaud Charlet <charlet@adacore.com>
7401 * gnat1drv.adb: minor fix of unbalanced parens in comment
7402 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
7403 to visible part of the package to allow re-use in GNATprove.
7404 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
7405 from repeated code of Traverse_Compilation_Unit.
7406 (Traverse_Declaration_Or_Statement): fixed detection of
7407 generic subprograms and packages; also, iteration over case
7408 statement alternatives rewritten to avoid testing if the first
7409 alternative is present (since it must be present due to Ada
7410 syntax restrictions).
7412 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7414 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
7415 returning by reference not just for subprogram body stubs,
7416 but for all subprogram cases.
7417 * sem_util.adb: Code reformatting.
7418 (Requires_Transient_Scope): Update the call to Results_Differ.
7419 (Results_Differ): Update the parameter profile and the associated
7422 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7424 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
7425 identifier nodes that do not come from source, to handle properly
7426 dimensionality check within an inlined body which inclddes both
7427 original operands and rewritten operands. This removes spurious
7428 dimensionality errors in the presence of front-end inlining,
7429 as well as in SPARK mode.
7431 2017-01-16 Jakub Jelinek <jakub@redhat.com>
7434 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
7436 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7438 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
7440 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7442 * doc/gnat_ugn/getting_started_with_gnat.rst,
7443 doc/gnat_ugn/inline_assembler.rst,
7444 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7445 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
7446 doc/gnat_ugn/about_this_guide.rst,
7447 doc/gnat_ugn/platform_specific_information.rst,
7448 doc/gnat_ugn/example_of_binder_output.rst,
7449 doc/gnat_ugn/gnat_and_program_execution.rst,
7450 doc/gnat_ugn/gnat_utility_programs.rst,
7451 doc/gnat_ugn/the_gnat_compilation_model.rst,
7452 doc/gnat_rm/implementation_defined_attributes.rst,
7453 doc/gnat_rm/compatibility_and_porting_guide.rst,
7454 doc/gnat_rm/standard_library_routines.rst,
7455 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
7456 doc/gnat_rm/implementation_defined_pragmas.rst,
7457 doc/gnat_rm/the_gnat_library.rst,
7458 doc/gnat_rm/obsolescent_features.rst,
7459 doc/gnat_rm/about_this_guide.rst,
7460 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
7461 doc/gnat_rm/implementation_of_ada_2012_features.rst,
7462 doc/gnat_rm/interfacing_to_other_languages.rst,
7463 doc/gnat_rm/implementation_defined_aspects.rst,
7464 doc/gnat_rm.rst: Update documentation.
7465 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
7467 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7469 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
7470 * scil_ll.adb: Minor style fix in comment.
7471 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
7472 even if entity is already set, because the node may be renalyzed
7473 after inlining transformations.
7475 2017-01-13 Javier Miranda <miranda@adacore.com>
7477 * sem_res.adb (Resolve_Call): Do not establish a transient scope
7478 for a call to inlinable expression function (since the call will
7479 be replaced by its returned object).
7480 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
7481 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
7482 (Expand_Call): For inlinable expression function call replace the
7483 call by its returned object.
7484 (Is_Inlinable_Expression_Function): New subprogram.
7486 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7488 * checks.adb: Minor typo fix and reformatting.
7490 2017-01-13 Javier Miranda <miranda@adacore.com>
7492 * contracts.adb (Contract_Only_Subprograms): Remove formal.
7493 (Copy_Original_Specification): Removed.
7494 (Skip_Contract_Only_Subprogram): Move here checks previously
7495 located in the caller of this routine (to leave the code more clean).
7496 (Build_Contract_Only_Subprogram): Code cleanup.
7497 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
7498 (Get_Contract_Only_Missing_Body_Name): Removed.
7500 2017-01-13 Javier Miranda <miranda@adacore.com>
7502 * sem_ch6.adb (Cloned_Expression): New subprogram.
7503 (Freeze_Expr_Types): Complete previous patch since the expression
7504 of an expression-function may have iterators and loops with
7505 defining identifiers which, as part of the preanalysis of the
7506 expression, may be left decorated with itypes that will not be
7507 available in the tree passed to the backend.
7509 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7511 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
7512 conversion to Integer of an expression that is an attribute
7513 reference 'Pos on an enumeration type.
7515 2017-01-13 Bob Duff <duff@adacore.com>
7517 * atree.ads: Minor comment fix.
7519 2017-01-13 Justin Squirek <squirek@adacore.com>
7521 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
7522 calls in accessibility check on return statement.
7524 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7526 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7527 Ensure that the input body is a subprogram body before trying to
7528 determine whether it denoted an expression function. Note that
7529 subprogram body stubs cannot denote expression functions.
7531 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7533 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
7536 2017-01-13 Javier Miranda <miranda@adacore.com>
7538 * einfo.ads (Component_Bit_Offset): Fix documentation.
7539 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
7540 on record holes for components with unknown compile-time offsets.
7542 2017-01-13 Bob Duff <duff@adacore.com>
7544 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
7545 * g-locfil.ads: Minor comment fix.
7547 2017-01-13 Bob Duff <duff@adacore.com>
7549 * binde.adb (Elab_New): New elaboration order algorithm
7550 that is expected to cause fewer ABE issues. This is a work in
7551 progress. The new algorithm is currently disabled, and can be
7552 enable by the -dp switch, or by modifying the Do_Old and Do_New
7553 etc. flags and rebuilding. Experimental code is included to
7554 compare the results of the old and new algorithms.
7555 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
7556 can have multiple of these tables, so the old and new algorithms
7558 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
7559 parameter of type array. This avoids the global variable, and
7560 allows bounds checking (which is normally defeated by the tables
7561 packages). It also ensures that the Elab_Order is read-only
7563 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
7564 subprograms that need it, as above.
7565 * debug.adb: Document new -dp switch. Modify doc of old -do
7567 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
7568 and Bindgen. Move writing of closure (-R and -Ra switches)
7569 to Binde; that's more convenient.
7571 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7573 * sem_ch6.adb (Analyze_Expression_Function): If the expression
7574 function is a completion, all entities referenced in the
7575 expression are frozen. As a consequence, a reference to an
7576 uncompleted private type from an enclosing scope is illegal.
7578 2017-01-13 Javier Miranda <miranda@adacore.com>
7580 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
7581 (Analyze_Subprogram_Body_Helper): At the occurrence of an
7582 expression function declaration that is a completion, its
7583 expression causes freezing (AI12-0103).
7585 2017-01-13 Vadim Godunko <godunko@adacore.com>
7587 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
7588 Reference functions of Ada.Containers.Indefinite_Holders.
7590 2017-01-13 Bob Duff <duff@adacore.com>
7592 * s-os_lib.ads: Minor comment fixes.
7594 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7596 * exp_ch3.adb (Default_Initialize_Object): Do not default
7597 initialize an object when it is of a task type and restriction
7598 No_Tasking is in effect because the initialization is obsolete.
7599 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
7600 restriction No_Tasking is in effect.
7601 (Build_Master_Renaming): Do not rename a master when restriction
7602 No_Tasking is in effect.
7604 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7606 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
7607 the legality of An others clause applies as well to a choice in
7608 an Iterated_component_ association.
7609 (Resolve_Iterated_Component_Association): An others choice
7611 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
7612 Iterated_Component_Association is not static.
7614 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7616 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
7617 control is passed to the expresion handler before the new mode
7619 * sem_ch12.adb (Analyze_Package_Instantiation,
7620 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
7621 in case control is passed to the expresion handler before the
7624 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7626 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
7627 exp_aggr.adb: Minor reformatting.
7629 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7631 * inline.adb: Minor reformatting and typo fix.
7633 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7635 * sem_util.ads, sem_util.adb (Choice_List): Move function here
7636 from sem_aggr.adb, for use elsewhere.
7637 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
7638 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
7639 Iterated_Component_Present.
7640 * exp_aggr.adb: Use Choice_List throughout, to handle
7641 Iterated_Component_Associations.
7642 (Gen_Loop): Generate proper loop for an
7643 Iterated_Component_Association: loop variable has the identifier
7644 of the original association. Generate a loop even for a single
7645 component choice, in order to make loop parameter visible in
7647 (Flatten): An Iterated_Component_Association is not static.
7649 2017-01-13 Yannick Moy <moy@adacore.com>
7651 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
7652 float exponentiation for statically known small negative values
7653 is the reciprocal of the exponentiation for the opposite value
7655 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
7656 Ensure that the value of float exponentiation for negative values
7657 is the reciprocal of the exponentiation for the opposite value
7659 * inline.adb (Expand_Inlined_Call): Fix the count
7660 for the number of generated gotos.
7662 2017-01-13 Yannick Moy <moy@adacore.com>
7664 * inline.adb: Code cleanup.
7665 * sem_util.adb (Is_OK_Volatile_Context): Add
7666 expression in delay statement as OK for volatile context.
7668 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7670 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
7671 mode a choice that is a subtype with a static predicate is
7672 replaced by the values it covers. This transformation must not
7673 be performed in ASIS mode, to preserve the source for analysis.
7675 2017-01-13 Justin Squirek <squirek@adacore.com>
7677 * nlists.ads: Correct minor typo.
7679 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7681 * sem_ch13.adb: Minor reformatting and typo fix.
7683 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7685 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
7686 Iterated_Component_Association is a named association in an
7688 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
7689 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
7690 and resolve the discrete choices and the expression of the
7692 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
7693 Loop_Actions and Box_Present are attributes of
7694 N_Iterated_Component_Association nodes. Box_Present is always
7696 * sprint.adb (Sprint_Node): An Iterated_Component_Association
7697 has a Discrete_Choices list, as specified in the RM. A
7698 Component_Association for aggregate uses instead a Choices list.
7699 We have to live with this small inconsistency because the new
7700 construct also has a defining identifier, and there is no way
7701 to merge the two node structures.
7703 2017-01-13 Yannick Moy <moy@adacore.com>
7705 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
7706 list of pragmas to remove. Remove pragmas from the list of
7707 statements in the body to inline.
7708 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
7710 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7712 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
7713 Analyze_Declarations, to analyze and resolve the expressions of
7714 aspect specifications in the current declarative list, so that
7715 the expressions have proper entity and type info. This is needed
7716 for ASIS when there is no subsequent expansion to generate this
7717 semantic information.
7718 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
7719 original expression, to suppress cascaded errors when expression
7720 has been constant-folded.
7721 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
7722 ASIS mode, because there is no subsequent expansion to decorate
7725 2017-01-13 Yannick Moy <moy@adacore.com>
7727 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
7728 New function to detect when a call may be inlined or not in
7730 (Expand_Inlined_Call): Ensure that a temporary
7731 is always created in the cases where a type conversion may be
7732 needed on an input parameter in GNATprove mode, so that GNATprove
7733 sees the check to perform.
7734 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
7735 when not applicable due to actual requiring type conversion
7736 with possible check but no temporary value can be copied for
7737 GNATprove to see the check.
7739 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7741 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
7742 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
7743 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
7744 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
7745 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
7746 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
7747 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
7748 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
7749 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
7750 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
7751 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
7752 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
7753 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
7754 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
7755 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
7756 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
7757 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
7758 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
7759 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
7760 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
7761 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
7762 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
7763 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
7764 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
7765 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
7766 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
7767 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
7768 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
7769 statements to reflect the new style for case alternatives. Various
7770 code clean up and reformatting.
7772 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7774 * exp_util.adb: Minor reformatting.
7776 2017-01-13 Yannick Moy <moy@adacore.com>
7778 * exp_spark.adb: Code cleanup.
7779 * sem_ch9.adb (Analyze_Delay_Until): Resolve
7780 expression so that calls are identified as such inside delay
7783 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7785 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
7786 * par-ch3.adb (P_Discrete_Choice_List): An
7787 Iterated_Component_Association is an array aggregate component.
7788 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
7789 (Is_Quantified_Expression): New function that performs a lookahead
7790 to distinguish quantified expressions from iterated component
7792 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
7794 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
7795 * sem.adb (Analyze): Handle Iterated_Component_Association.
7796 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
7797 component associations.
7798 * sinfo.ads, sinfo.adb: Entries for for
7799 N_Iterated_Component_Association and its fields.
7800 * sprint.adb (Sprint_Node_Actual): Handle
7801 N_Iterated_Component_Association.
7803 2017-01-13 Justin Squirek <squirek@adacore.com>
7805 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
7806 of the style check until after preanalysis of acutals.
7808 2017-01-13 Yannick Moy <moy@adacore.com>
7810 * sem_ch13.adb: Minor reformatting.
7811 * par-ch11.adb: minor style fix in whitespace
7812 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
7813 reduced to Add_Artificial_ALI_File; style fix in declaration of
7814 Text; grammar fix in comment.
7815 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
7816 * freeze.adb: Cleanup to pass pragma instead of
7818 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
7819 replace System'To_Address by equivalent call.
7821 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7823 * bindusg.adb: Improve usage output for -f switch.
7825 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7827 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
7830 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7832 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
7833 treat comparisons on strings as legal in a Static_Predicate.
7834 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
7835 a function call that is the expansion of a string comparison.The
7836 function call is built when compiling the corresponding predicate
7837 function, but the expression has been found legal as a static
7838 predicate during earlier analysis.
7839 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
7840 properly a function call that is the expansion of a string
7841 comparison operation, in order to recover the Static_Predicate
7842 expression and apply it to a static argument when needed.
7844 2017-01-13 Tristan Gingold <gingold@adacore.com>
7846 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
7847 (Open_Read): Re-implement using Open_Read_No_Exception.
7848 (Open_Write): Raise exception in case of error.
7849 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
7850 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
7852 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
7854 2017-01-13 Yannick Moy <moy@adacore.com>
7856 * checks.adb: Code cleanup.
7858 2017-01-13 Yannick Moy <moy@adacore.com>
7860 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
7861 expression instead of unanalyzed aspect expression for checking
7862 the validity of inheriting an operation. Also copy the expression
7863 being passing it to Build_Class_Wide_Expression, as this call
7864 modifies its argument.
7865 * sem_util.ads Fix comment to reference correct function name
7868 2017-01-13 Javier Miranda <miranda@adacore.com>
7870 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
7871 when we propagate information about the indexes back to the original
7872 indexing mode and the prefix of the index is a function call, do not
7873 remove any parameter from such call.
7875 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7877 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
7878 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
7879 a build-in-place function whose result type is tagged.
7881 2017-01-13 Yannick Moy <moy@adacore.com>
7883 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
7884 Do not generate a wrapper when the only candidate is a class-wide
7886 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
7887 inside a generic context.
7889 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7891 * exp_util.adb (Add_Inherited_Tagged_DIC):
7892 Pass the object parameters of both the parent and the derived
7893 type DIC procedure to the reference replacement circuitry.
7894 (Find_DIC_Type): Modify the circuitry to present the partial
7895 view of a private type in case the private type defines its own
7897 (Replace_Object_And_Primitive_References): Add two
7898 optional formal parameters. Update the comment on usage. Update
7899 the replacement of references to object parameters.
7901 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7903 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
7905 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7907 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
7908 an out parameter that is a type conversion, independently of th
7909 range check that may apply to the expression of the conversion,
7910 for use in GNATProve.
7912 2017-01-13 Yannick Moy <moy@adacore.com>
7914 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
7915 GNATprove_Mode here to Frontend.
7916 * frontend.adb (Frontend): Move the implicit with for System
7917 in GNATprove_Mode here as it ismore correct this way; the old
7918 place only worked by chance, since there were no overloaded names.
7919 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
7920 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
7921 four attributes identified in SRM 9(18), add an implicit with
7922 to Ada.Task_Identification.
7923 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
7924 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
7926 * checks.adb (Apply_Discriminant_Check,
7927 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
7928 In GNATprove mode, we do not apply the checks, but we still
7929 analyze the expression to possibly issue errors on SPARK
7930 code when a run-time error can be detected at compile time.
7931 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
7934 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7936 * expander.adb (Expand): Add a warning about using return
7937 statements in Ghost management code.
7938 * exp_ch3.adb (Freeze_Type): Add a warning about using return
7939 statements in Ghost management code.
7940 * exp_ch7.adb (Build_Invariant_Procedure_Body,
7941 Build_Invariant_Procedure_Declaration): Add a warning about
7942 using return statements in Ghost management code.
7943 * exp_disp.adb (Make_DT): Add a warning about using return
7944 statements in Ghost management code.
7945 * exp_util.adb (Build_DIC_Procedure_Body,
7946 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
7947 warning about using return statements in Ghost management code.
7948 * freeze.adb (Freeze_Entity): Add a warning about using return
7949 statements in Ghost management code.
7950 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
7951 statements in Ghost management code.
7952 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
7953 a warning about using return statements in Ghost management code.
7954 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
7955 return statements in Ghost management code.
7956 * sem_ch6.adb (Analyze_Procedure_Call,
7957 Analyze_Subprogram_Body_Helper): Add a warning about using return
7958 statements in Ghost management code.
7959 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
7960 using return statements in Ghost management code.
7961 * sem_ch12.adb (Analyze_Package_Instantiation,
7962 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
7963 Instantiate_Subprogram_Body): Add a warning about using return
7964 statements in Ghost management code.
7965 * sem_ch13.adb (Build_Predicate_Functions,
7966 Build_Predicate_Function_Declarations): Add a warning about
7967 using return statements in Ghost management code.
7968 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
7969 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
7970 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
7971 using return statements in Ghost management code.
7973 2017-01-13 Tristan Gingold <gingold@adacore.com>
7975 * s-mmosin-mingw.adb: Fix pragma import.
7977 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7979 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
7982 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7984 * atree.adb (Allocate_Initialize_Node): A newly created node is
7985 no longer marked as Ghost at this level.
7986 (Mark_New_Ghost_Node): New routine.
7987 (New_Copy): Mark the copy as Ghost.
7988 (New_Entity): Mark the entity as Ghost.
7989 (New_Node): Mark the node as Ghost.
7990 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
7991 apply to unanalyzed entities.
7992 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
7994 (Set_Is_Checked_Ghost_Entity): This attribute now
7995 applies to all entities as well as unanalyzed entities.
7996 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
7997 all entities as well as unanalyzed entities.
7998 * expander.adb Add with and use clauses for Ghost.
7999 (Expand): Install and revert the Ghost region associated with the node
8001 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
8002 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
8003 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
8004 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
8005 (Freeze_Type): Install and revert the Ghost region associated
8006 with the type being frozen.
8007 * exp_ch5.adb Remove with and use clauses for Ghost.
8008 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
8009 * exp_ch6.adb Remove with and use clauses for Ghost.
8010 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
8011 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
8012 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
8013 Ghost region of the working type.
8014 (Build_Invariant_Procedure_Declaration): Install and revert
8015 the Ghost region of the working type.
8016 (Expand_N_Package_Body): Remove all Ghost-related code.
8017 * exp_ch8.adb Remove with and use clauses for Ghost.
8018 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
8020 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
8021 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
8022 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
8024 * exp_ch13.adb Remove with and use clauses for Ghost.
8025 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
8026 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
8027 the tagged type. Move the generation of various entities within
8028 the Ghost region of the type.
8029 * exp_prag.adb Remove with and use clauses for Ghost.
8030 (Expand_Pragma_Check): Remove all Ghost-related code.
8031 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
8032 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
8033 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
8034 * exp_util.adb (Build_DIC_Procedure_Body): Install
8035 and revert the Ghost region of the working types.
8036 (Build_DIC_Procedure_Declaration): Install and revert the
8037 Ghost region of the working type.
8038 (Make_Invariant_Call): Install and revert the Ghost region of the
8040 (Make_Predicate_Call): Reimplemented. Install and revert the
8041 Ghost region of the associated type.
8042 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
8043 of the entity being frozen.
8044 (New_Freeze_Node): Removed.
8045 * ghost.adb Remove with and use clauses for Opt.
8046 (Check_Ghost_Completion): Update the parameter profile
8047 and all references to formal parameters.
8048 (Ghost_Entity): Update the comment on usage.
8049 (Install_Ghost_Mode): New routines.
8050 (Is_Ghost_Assignment): New routine.
8051 (Is_Ghost_Declaration): New routine.
8052 (Is_Ghost_Pragma): New routine.
8053 (Is_Ghost_Procedure_Call): New routine.
8054 (Is_Ghost_Renaming): Removed.
8055 (Is_OK_Declaration): Reimplemented.
8056 (Is_OK_Pragma): Reimplemented.
8057 (Is_OK_Statement): Reimplemented.
8058 (Is_Subject_To_Ghost): Update the comment on usage.
8059 (Mark_And_Set_Ghost_Assignment): New routine.
8060 (Mark_And_Set_Ghost_Body): New routine.
8061 (Mark_And_Set_Ghost_Completion): New routine.
8062 (Mark_And_Set_Ghost_Declaration): New routine.
8063 (Mark_And_Set_Ghost_Instantiation): New routine.
8064 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8065 (Mark_Full_View_As_Ghost): Removed.
8066 (Mark_Ghost_Declaration_Or_Body): New routine.
8067 (Mark_Ghost_Pragma): New routine.
8068 (Mark_Ghost_Renaming): New routine.
8069 (Mark_Pragma_As_Ghost): Removed.
8070 (Mark_Renaming_As_Ghost): Removed.
8071 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
8072 (Prune_Node): Freeze nodes no longer need special pruning, they
8073 are processed by the general ignored Ghost code mechanism.
8074 (Restore_Ghost_Mode): New routine.
8075 (Set_Ghost_Mode): Reimplemented.
8076 (Set_Ghost_Mode_From_Entity): Removed.
8077 * ghost.ads Add with and use clauses for Ghost.
8078 (Check_Ghost_Completion): Update the parameter profile
8079 along with the comment on usage.
8080 (Install_Ghost_Mode): New routine.
8081 (Is_Ghost_Assignment): New routine.
8082 (Is_Ghost_Declaration): New routine.
8083 (Is_Ghost_Pragma): New routine.
8084 (Is_Ghost_Procedure_Call): New routine.
8085 (Mark_And_Set_Ghost_Assignment): New routine.
8086 (Mark_And_Set_Ghost_Body): New routine.
8087 (Mark_And_Set_Ghost_Completion): New routine.
8088 (Mark_And_Set_Ghost_Declaration): New routine.
8089 (Mark_And_Set_Ghost_Instantiation): New routine.
8090 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8091 (Mark_Full_View_As_Ghost): Removed.
8092 (Mark_Ghost_Pragma): New routine.
8093 (Mark_Ghost_Renaming): New routine.
8094 (Mark_Pragma_As_Ghost): Removed.
8095 (Mark_Renaming_As_Ghost): Removed.
8096 (Restore_Ghost_Mode): New routine.
8097 (Set_Ghost_Mode): Redefined.
8098 (Set_Ghost_Mode_From_Entity): Removed.
8099 * sem.adb (Analyze): Install and revert the Ghost region of the
8100 node being analyzed.
8101 (Do_Analyze): Change the way a clean Ghost
8102 region is installed and reverted.
8103 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
8104 all Ghost-related code.
8105 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
8106 (Analyze_Number_Declaration): Remove all Ghost-related code.
8107 (Analyze_Object_Declaration): Install and revert the Ghost region of
8108 a deferred object declaration's completion.
8109 (Array_Type_Declaration): Remove all Ghost-related code.
8110 (Build_Derived_Type): Update the comment on
8111 the propagation of Ghost attributes from a parent to a derived type.
8112 (Derive_Subprogram): Remove all Ghost-related code.
8113 (Make_Class_Wide_Type): Remove all Ghost-related code.
8114 (Make_Implicit_Base): Remove all Ghost-related code.
8115 (Process_Full_View): Install and revert the Ghost region of
8116 the partial view. There is no longer need to check the Ghost
8118 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
8119 region of the left hand side.
8120 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
8121 all Ghost-related code.
8122 (Analyze_Expression_Function): Remove all Ghost-related code.
8123 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
8124 (Analyze_Procedure_Call): Install and revert the Ghost region of
8125 the procedure being called.
8126 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
8127 region of the spec or body.
8128 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
8129 (Build_Subprogram_Declaration): Remove all Ghost-related code.
8130 (Find_Corresponding_Spec): Remove all Ghost-related code.
8131 (Process_Formals): Remove all Ghost-related code.
8132 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
8133 the Ghost region of the spec.
8134 (Analyze_Package_Declaration): Remove all Ghost-related code.
8135 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
8136 Ghost when it aliases a Ghost entity.
8137 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
8139 (Analyze_Object_Renaming): Mark a renaming as Ghost when
8140 it aliases a Ghost entity.
8141 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
8143 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
8144 aliases a Ghost entity.
8145 * sem_ch11.adb Remove with and use clauses for Ghost.
8146 (Analyze_Exception_Declaration): Remove all Ghost-related code.
8147 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
8149 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
8151 (Analyze_Package_Instantiation): Install and revert the Ghost region
8152 of the package instantiation.
8153 (Analyze_Subprogram_Instantiation): Install
8154 and revert the Ghost region of the subprogram instantiation.
8155 (Instantiate_Package_Body): Code clean up. Install and revert the
8156 Ghost region of the package body.
8157 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
8158 Ghost region of the subprogram body.
8159 * sem_ch13.adb (Build_Predicate_Functions): Install
8160 and revert the Ghost region of the related type.
8161 (Build_Predicate_Function_Declaration): Code clean up. Install
8162 and rever the Ghost region of the related type.
8163 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8164 Install and revert the Ghost region of the pragma.
8165 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
8166 Ghost region of the pragma.
8167 (Analyze_Pragma): Install and revert the Ghost region of various
8168 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
8169 or encloses a Ghost entity.
8170 (Analyze_Pre_Post_Condition): Install and revert the Ghost
8171 region of the pragma.
8172 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
8173 Ghost region of the pragma.
8174 * sem_res.adb (Resolve): Remove all Ghost-related code.
8175 * sem_util.adb (Is_Declaration): Reimplemented.
8176 (Is_Declaration_Other_Than_Renaming): New routine.
8177 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
8178 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
8179 (Is_Ghost_Pragma): Removed.
8180 (Is_Ignored_Ghost_Pragma): New routine.
8181 (Set_Is_Checked_Ghost_Pragma): New routine.
8182 (Set_Is_Ghost_Pragma): Removed.
8183 (Set_Is_Ignored_Ghost_Pragma): New routine.
8184 * sinfo.ads: Update the documentation on Ghost mode and
8185 Ghost regions. New attributes Is_Checked_Ghost_Pragma
8186 and Is_Ignored_Ghost_Pragma along with usages in nodes.
8187 Remove attribute Is_Ghost_Pragma along with usages in nodes.
8188 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8189 (Is_Ghost_Pragma): Removed along with pragma Inline.
8190 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8191 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8192 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
8193 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8195 2017-01-12 Tristan Gingold <gingold@adacore.com>
8197 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
8198 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
8200 2017-01-12 Yannick Moy <moy@adacore.com>
8202 * errout.adb, errout.ads (Initialize): Factor common treatment
8204 (Reset_Warnings): New procedure to reset counts related to warnings.
8205 (Record_Compilation_Errors): New variable to store the presence of an
8206 error, used in gnat2why to allow changing the Warning_Mode.
8207 (Compilation_Errors): Use new variable Record_Compilation_Errors to
8208 store the presence of an error.
8210 2017-01-12 Javier Miranda <miranda@adacore.com>
8212 * sem_ch13.adb (Analyze_Aspect_Specifications):
8213 For Interrupt_Handler and Attach_ Handler aspects, decorate the
8214 internally built reference to the protected procedure as coming
8215 from sources and force its analysis.
8217 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8219 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
8220 inherit predicates if any from the first_subtype of the parent,
8221 not from the anonymous parent type.
8222 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
8223 predicate is not a static subtype.
8225 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8227 * freeze.adb (Check_Suspicious_Convention): New procedure
8228 performing a warning check on discriminated record types with
8229 convention C or C++. Factored out of procedure Freeze_Record_Type,
8230 and changed to only apply to base types (to avoid spurious
8231 warnings on subtypes). Minor improvement of warning messages
8232 to refer to discriminated rather than variant record types.
8233 (Freeze_Record_Type): Remove code for performing a suspicious
8235 (Freeze_Entity): Only call Freeze_Record_Type
8236 on types that aren't declared within any enclosing generic units
8237 (rather than just excluding the type when the innermost scope
8238 is generic). Call Check_Suspicious_Convention whether or not
8239 the type is declared within a generic unit.
8240 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
8241 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
8244 2017-01-12 Tristan Gingold <gingold@adacore.com>
8246 * sysdep.c, adaint.c, rtinit.c, ming32.h:
8247 (__gnat_current_codepage): Renamed from CurrentCodePage
8248 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
8250 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8252 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
8253 quantified expressions, following AI12-050: the loop parameters
8254 of two quantified expressions are conformant if they have the
8257 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8259 * gcc-interface/Makefile.in: Clean up VxWorks targets.
8261 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8263 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
8264 Hnadle properly the attribute reference when it appears as part
8265 of an expression in another loop aspect.
8267 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8269 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
8270 subsidiary of Build_Initialization_Call, to complete generation
8271 of predicate checks on discriminants whose (sub)types have
8272 predicates, and to add checks on variants that do not have an
8274 * sem_util.adb (Gather_Components): A missing Others alternative is
8275 not an error when the type of the discriminant is a static predicate
8276 (and coverage has been checked when analyzing the case statement). A
8277 runtime check is generated to verify that a given discriminant
8278 satisfies the predicate (RM 3.8.1. (21.1/2)).
8280 2017-01-12 Yannick Moy <moy@adacore.com>
8282 * gnat1drv.adb (Adjust_Global_Switches): Only
8283 perform checking of exception mechanism when generating code.
8285 2017-01-12 Justin Squirek <squirek@adacore.com>
8287 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
8288 Remove handling of access component with invariant.
8289 (Build_Invariant_Procedure_Declaration): Remove return on class
8291 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
8292 conditional exception for component or array so Has_Own_Invariants
8293 flag is not falsly set.
8294 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
8295 wide type to have no invariant flags.
8297 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8299 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
8300 sem_ch13.adb: Minor reformatting.
8302 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8304 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
8305 adjustment primitive when the ancestor type was not properly frozen.
8306 (Gen_Assign): Guard against a missing initialization
8307 primitive when the component type was not properly frozen.
8308 (Initialize_Array_Component): Guard against a missing adjustment
8309 primitive when the component type was not properly frozen.
8310 (Initialize_Record_Component): Guard against a missing adjustment
8311 primitive when the component type was not properly frozen.
8312 (Process_Transient_Component_Completion): The transient object may
8313 not be finalized when its associated type was not properly frozen.
8314 * exp_ch3.adb (Build_Assignment): Guard against a missing
8315 adjustment primitive when the component type was not properly frozen.
8316 (Build_Initialization_Call): Guard against a missing
8317 initialization primitive when the associated type was not properly
8319 (Expand_N_Object_Declaration): Guard against a missing
8320 adjustment primitive when the base type was not properly frozen.
8321 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
8322 body when there is no adjustment primitive available. Create an
8323 empty Deep_Finalize body when there is no finalization primitive
8325 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
8326 missing finalization primitive when the designated type was
8327 not properly frozen.
8328 (Expand_N_Allocator): Guard against a missing initialization primitive
8329 when the designated type was not properly frozen.
8330 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
8331 only when the corresponding adjustment primitive is available.
8332 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
8333 adjustment/finalization statements only when there is an available
8334 primitive to carry out the action.
8335 (Build_Initialize_Statements): Generate the initialization/finalization
8336 statements only when there is an available primitive to carry out the
8338 (Make_Adjust_Call): Do not generate a call when the underlying
8339 type is not present due to a possible missing full view.
8340 (Make_Final_Call): Do not generate a call when the underlying
8341 type is not present due to a possible missing full view.
8342 (Make_Finalize_Address_Stmts): Generate an empty body when the
8343 designated type lacks a finalization primitive.
8344 (Make_Init_Call): Do not generate a call when the underlying type is
8345 not present due to a possible missing full view.
8346 (Process_Component_For_Adjust): Add the adjustment call only when the
8347 corresponding adjustment primitive is available.
8348 (Process_Component_For_Finalize): Add the finalization call only when
8349 the corresponding finalization primitive is available.
8350 (Process_Object_Declaration): Use a null statement to emulate a
8351 missing call to the finalization primitive of the object type.
8352 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
8353 (Make_Final_Call): Update the comment on usage.
8354 (Make_Init_Call): Update the comment on usage.
8355 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
8357 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8359 * einfo.ads: Update documentation of Address_Taken.
8360 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
8361 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
8362 for subprograms when setting Address_Taken flag.
8364 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
8366 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
8367 Configurable_Run_Time_Mode off when analysing with'ed predefined
8370 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8372 * sem_prag.adb: Minor reformatting.
8373 * sem_util.adb (Unique_Entity): fix result for
8374 bodies of entry families.
8376 2017-01-12 Justin Squirek <squirek@adacore.com>
8378 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
8379 Resolve_Suppressible in the pragma Assertion_Policy case.
8380 (Resolve_Suppressible): Created this function to factor out
8381 common code used to resolve Suppress to either Ignore or Check
8382 * snames.ads-tmpl: Add name for Suppressible.
8384 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8386 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
8388 * debug.adb: Minor comment fixes.
8390 2017-01-12 Arnaud Charlet <charlet@adacore.com>
8392 * sem_util.adb (Unique_Entity): For concurrent
8393 bodies that are defined with stubs and complete a declaration
8394 of a single concurrent object return the entity of an implicit
8395 concurrent type, not the entity of the anonymous concurrent
8397 * debug.adb: -gnatd.J is no longer used.
8398 * make.adb (Globalize): Removed, no longer used.
8399 * sem_ch9.adb: minor typo in comment for entry index
8401 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
8403 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8404 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8405 the value record of a task, set its _Secondary_Stack_Size field
8407 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8408 a _Secondary_Stack_Size field in the value record of
8409 the task if a Secondary_Stack_Size rep item is present.
8410 (Make_Task_Create_Call): Include secondary stack size
8411 parameter. If No_Secondary_Stack restriction is in place, passes
8413 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8414 Secondary_Stack_Size.
8415 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8416 function to define the overhead of the secondary stack.
8417 * s-tarest.adb (Create_Restricted_Task,
8418 Create_Restricted_Task_Sequential): Functions now include
8419 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8420 * s-tarest.adb (Create_Restricted_Task,
8421 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
8422 include Secondary_Stack_Size parameter.
8423 (Task_Wrapper): Secondary stack now allocated to the size specified by
8424 the Secondary_Stack_Size parameter in the task's ATCB.
8425 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
8426 Secondary_Stack_Size component.
8427 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8428 Create_Restricted_Task_Sequential): Function now include
8429 Secondary_Stack_Size parameter.
8430 (Task_Wrapper): Secondary stack now allocated to the size
8431 specified by the Secondary_Stack_Size parameter in the task's
8433 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
8434 to include Secondary_Stack_Size parameter.
8435 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
8436 Secondary_Stack_Size aspect, turning the aspect into its corresponding
8438 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
8439 * snames.adb-tmpl, snames.ads-tmpl: Added names
8440 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8441 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8443 2017-01-12 Yannick Moy <moy@adacore.com>
8445 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
8448 2017-01-12 Justin Squirek <squirek@adacore.com>
8450 * exp_attr.adb (Expand_N_Attribute_Reference):
8451 Fix Finalization_Size case by properly resolving the type after
8452 rewritting the node.
8454 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8456 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
8458 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
8459 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
8460 exp_sel.ads: Minor reformatting.
8462 2017-01-12 Justin Squirek <squirek@adacore.com>
8464 * exp_ch6.adb (Expand_Call): Add guard to prevent
8465 invariant checks from being created for internally generated
8468 2017-01-12 Bob Duff <duff@adacore.com>
8470 * lib-writ.ads: Remove incorrect comment.
8472 2017-01-12 Javier Miranda <miranda@adacore.com>
8474 * debug.adb (-gnatd.K): Enable generation of contract-only
8475 procedures in CodePeer mode.
8476 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
8478 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
8480 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
8482 (Get_Contract_Only_Missing_Body_Name): New subprogram.
8483 (Get_Contract_Only_Body): New subprogram.
8484 (Set_Contract_Only_Body): New subprogram.
8485 (Is_Contract_Only_Body): New subprogram.
8486 (Set_Is_Contract_Only_Body): New subprogram.
8487 (SCIL_Nodes): Replace table by hash-table.
8489 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8491 * exp_ch6.adb: Minor reformatting.
8492 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
8494 2017-01-12 Bob Duff <duff@adacore.com>
8496 * binde.adb (Forced): New reason for a dependence.
8497 (Force_Elab_Order): Implementation of the new switch.
8498 * binde.ads: Minor comment fixes.
8499 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
8500 long ago that is no longer supported; removed comment about that.
8501 * opt.ads (Force_Elab_Order_File): Name of file specified for
8503 * switch-b.adb: Parse -f switch.
8505 2017-01-12 Justin Squirek <squirek@adacore.com>
8507 * exp_ch6.adb (Check_View_Conversion): Created this function
8508 to properly chain calls to check type invariants that may be
8509 present in a subprogram call after the subprogram.
8510 (Expand_Call): Add a conditional to identify when a view conversion
8511 needs to be checked.
8512 * nlists.adb, nlists.ads (Prepend_New): New routine.
8513 (Prepend_New_To): New routine.
8515 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8517 * sinfo.ads: Minor reformatting.
8519 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8521 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
8524 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8526 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
8527 variable Definite. Create a local object and pass its 'Access to the
8528 BIP function when the result type is either definite or it does not
8529 require any finalization or secondary stack management.
8531 2017-01-12 Bob Duff <duff@adacore.com>
8533 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
8534 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
8535 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
8536 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
8537 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
8538 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
8539 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8540 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
8541 Change name to Pragma_Name_Unmapped.
8542 (Pragma_Name_Mapped): Change name to Pragma_Name.
8543 This is because the "mapped" version should be the usual case.
8545 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
8547 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
8548 Is_Default_Init_Cond_Procedure, and
8549 Has_Inherited_Default_Init_Cond. Add uses of flags
8550 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
8551 (Default_Init_Cond_Procedure): Removed.
8552 (DIC_Procedure): New routine.
8553 (Has_Default_Init_Cond): Removed.
8554 (Has_DIC): New routine.
8555 (Has_Inheritable_Invariants): The attribute applies to the base type.
8556 (Has_Inherited_Default_Init_Cond): Removed.
8557 (Has_Inherited_DIC): New routine.
8558 (Has_Inherited_Invariants): The attribute applies to the base type.
8559 (Has_Own_DIC): New routine.
8560 (Has_Own_Invariants): The attribute applies to the base type.
8561 (Is_Default_Init_Cond_Procedure): Removed.
8562 (Is_DIC_Procedure): New routine.
8563 (Set_Default_Init_Cond_Procedure): Removed.
8564 (Set_DIC_Procedure): New routine.
8565 (Set_Has_Default_Init_Cond): Removed.
8566 (Set_Has_Inheritable_Invariants): The attribute applies
8568 (Set_Has_Inherited_Default_Init_Cond): Removed.
8569 (Set_Has_Inherited_DIC): New routine.
8570 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
8571 (Set_Has_Own_DIC): New routine.
8572 (Set_Has_Own_Invariants): The attribute applies to the base type.
8573 (Set_Is_Default_Init_Cond_Procedure): Removed.
8574 (Set_Is_DIC_Procedure): New routine.
8575 (Write_Entity_Flags): Update the output of all flags related to
8576 default initial condition.
8577 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
8578 of the call to the DIC procedure.
8579 (Freeze_Type): Generate the body of the DIC procedure.
8580 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
8581 all occurrences of Create_Append with Append_New_To. Do
8582 not generate an invariant procedure for a class-wide type.
8583 The generated body acts as a freeze action of the working type.
8584 (Build_Invariant_Procedure_Declaration): Do not generate an
8585 invariant procedure for a class-wide type.
8586 (Create_Append): Removed.
8587 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
8588 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
8589 class-wide pre/postcondition description and data structures from
8591 (Build_Class_Wide_Expression): Moved from Sem_Prag.
8592 (Build_DIC_Call): New routine.
8593 (Build_DIC_Procedure_Body): New routine.
8594 (Build_DIC_Procedure_Declaration): New routine.
8595 (Entity_Hash): Moved from Sem_Prag.
8596 (Find_DIC_Type): New routine.
8597 (Update_Primitives_Mapping): Reimplemented.
8598 (Update_Primitives_Mapping_Of_Types): New routine.
8599 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
8600 (Build_DIC_Call): New routine.
8601 (Build_DIC_Procedure_Body): New routine.
8602 (Build_DIC_Procedure_Declaration): New routine.
8603 (Update_Primitives_Mapping): Moved from Sem_Prag.
8604 (Update_Primitives_Mapping_Of_Types): New routine.
8605 * nlists.adb (Append_New): New routine.
8606 (Append_New_To): New routine.
8607 * nlists.ads (Append_New): New routine.
8608 (Append_New_To): New routine.
8609 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
8610 of DIC procedures here. This is now done at the end of the
8611 visible declarations, private declarations, and at the freeze
8613 (Analyze_Private_Extension_Declaration):
8614 A private extension inherits the DIC pragma of a parent type.
8615 (Analyze_Subtype_Declaration): No need to propagate invariant
8616 attributes to a subtype as those apply to the base type.
8617 (Build_Derived_Record_Type): No need to inherit invariants here
8618 as this is now done in Build_Derived_Type.
8619 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
8621 (Process_Full_View): Update the propagation of DIC attributes.
8622 (Propagate_Default_Init_Cond_Attributes): Removed.
8623 * sem_ch7.adb Add with and use clauses for Exp_Util.
8624 (Analyze_Package_Specification): Create the body of the DIC
8625 procedure at the end of the visible and private declarations.
8626 (Preserve_Full_Attributes): Propagate DIC attributes.
8627 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
8629 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
8630 * sem_elab.adb (Check_A_Call): Update the call to
8631 Is_Nontrivial_Default_Init_Cond_Procedure.
8632 * sem_prag.adb Remove the with and use clauses for
8633 GNAT.HTable. Move the handling of class- wide pre/postcondition
8634 description and data structures to Exp_Util.
8635 (Analyze_Pragma): Create the declaration of the DIC procedure. There
8636 is no need to propagate invariant-related attributes at this point
8637 as this is done in Build_Invariant_Procedure_Declaration.
8638 (Build_Class_Wide_Expression): Moved to Exp_Util.
8639 (Entity_Hash): Moved to Exp_Util.
8640 (Update_Primitives_Mapping): Moved to Exp_Util.
8641 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
8642 (Update_Primitives_Mapping): Moved to Exp_Util.
8643 * sem_util.adb: Remove with and use clauses for Ghost
8645 (Build_Default_Init_Cond_Call): Removed.
8646 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8647 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8648 (Get_Views): Reimplemented.
8649 (Has_Full_Default_Initialization): Reimplement the section on DIC.
8650 (Inherit_Default_Init_Cond_Procedure): Removed.
8651 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8652 (Is_Nontrivial_DIC_Procedure): New routine.
8653 (Is_Verifiable_DIC_Pragma): New routine.
8654 (Propagate_DIC_Attributes): New routine.
8655 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
8656 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8657 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8658 (Inherit_Default_Init_Cond_Procedure): Removed.
8659 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8660 (Is_Nontrivial_DIC_Procedure): New routine.
8661 (Is_Verifiable_DIC_Pragma): New routine.
8662 (Propagate_DIC_Attributes): New routine.
8663 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
8665 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
8667 (Expression_Copy): New routine along with pragma Inline.
8668 (Set_Expression_Copy): New routine along with pragma Inline.
8670 2017-01-06 Bob Duff <duff@adacore.com>
8672 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
8673 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
8674 we won't generate the call to s_stalib_adafinal when the main
8675 is not written in Ada.
8677 2017-01-06 Bob Duff <duff@adacore.com>
8679 * sem_prag.adb: Minor: remove pragma Warnings.
8681 2017-01-06 Tristan Gingold <gingold@adacore.com>
8683 * Makefile.rtl: Do not compile s-stchop by default.
8685 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8687 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
8688 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
8689 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
8690 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
8691 Reverted previous change for now.
8693 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8695 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
8696 check to default discriminant value if checks are enabled.
8697 (Build_Assignment): If type of component has static predicate,
8698 apply check to its default value, if any.
8700 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8702 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8703 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8704 the value record of a task, set its _Secondary_Stack_Size field
8706 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8707 a _Secondary_Stack_Size field in the value record of
8708 the task if a Secondary_Stack_Size rep item is present.
8709 (Make_Task_Create_Call): Include secondary stack size
8710 parameter. If No_Secondary_Stack restriction is in place, passes
8712 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8713 Secondary_Stack_Size.
8714 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8715 function to define the overhead of the secondary stack.
8716 * s-tarest.adb (Create_Restricted_Task,
8717 Create_Restricted_Task_Sequential): Functions now include
8718 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8719 * s-tarest.adb (Create_Restricted_Task,
8720 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
8721 now include Secondary_Stack_Size parameter.
8723 Secondary stack now allocated to the size specified by the
8724 Secondary_Stack_Size parameter in the task's ATCB.
8725 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
8726 Secondary_Stack_Size component.
8727 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8728 Create_Restricted_Task_Sequential): Function now include
8729 Secondary_Stack_Size parameter.
8730 (Task_Wrapper): Secondary stack
8731 now allocated to the size specified by the Secondary_Stack_Size
8732 parameter in the task's ATCB.
8733 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
8734 for Secondary_Stack_Size aspect, turning the aspect into its
8735 corresponding internal attribute.
8736 (Analyze_Attribute_Definition):
8737 Process Secondary_Stack_Size attribute.
8738 * snames.adb-tmpl, snames.ads-tmpl: Added names
8739 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8740 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8742 2017-01-06 Pascal Obry <obry@adacore.com>
8744 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
8745 Sequential_IO and Direct_IO.
8747 2017-01-06 Bob Duff <duff@adacore.com>
8749 * snames.ads-tmpl (Renamed): New name for the pragma argument.
8750 * par-ch2.adb: Allow the new pragma (with analysis deferred
8752 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
8753 Keep a mapping from new pragma names to old names.
8754 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
8755 implement it by calling Map_Pragma_Name.
8756 * checks.adb, contracts.adb, einfo.adb, errout.adb,
8757 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
8758 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
8759 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
8760 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
8761 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8762 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
8765 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8767 * exp_ch9.adb: Minor reformatting.
8769 2017-01-06 Tristan Gingold <gingold@adacore.com>
8771 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
8772 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
8773 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
8775 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
8776 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
8777 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
8778 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
8780 2017-01-06 Bob Duff <duff@adacore.com>
8782 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
8783 dummy implementation of Map_Pragma_Name.
8785 2017-01-06 Tristan Gingold <gingold@adacore.com>
8787 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
8788 entry_body variable constant.
8789 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
8790 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
8792 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
8793 now access to constant.
8795 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8797 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
8798 reformatting and typo fixes.
8800 2017-01-06 Bob Duff <duff@adacore.com>
8802 * snames.ads-tmpl: New names for pragma renaming.
8803 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
8804 * par-prag.adb: Add new pragma name to case statement.
8805 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
8807 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
8808 Dummy implementation of Pragma_Name_Mapped.
8810 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8812 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
8813 better detect call within an entry_wrapper.
8814 * sem_res.adb (Resolve_Call): A protected call within an
8815 entity_wrapper is analyzed in the context of the protected
8816 object but corresponds to a pre-analysis and is not an access
8818 * sem_attr.adb: Minor reformatting.
8820 2017-01-06 Justin Squirek <squirek@adacore.com>
8822 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
8823 Finalization_Size to allow a prefix of any non-class-wide type.
8824 * sem_attr.ads Modify comment for Finalization_Size to include
8825 definite type use case.
8827 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8829 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
8830 on procedures that are wrappers created for entries that have
8832 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
8833 body is an entry_wrapper, compile it in the context of the
8834 synchronized type, because a precondition may refer to funtions
8836 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
8838 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
8839 within an Entry_Wrapper this is an external call whose target
8840 is the synchronized object that is the actual in the call to
8843 2017-01-06 Yannick Moy <moy@adacore.com>
8845 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
8846 in tree, which means not analyzing the previous prefix if the node has
8847 been rewritten into its prefix.
8849 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8851 * s-tpobop.adb: Minor reformatting.
8853 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8855 * checks.adb (Ensure_Valid): Do not generate a validity check
8856 within a generated predicate function, validity checks will have
8857 been applied earlier when required.
8859 2017-01-06 Tristan Gingold <gingold@adacore.com>
8861 * s-tpoben.ads (Protection_Entries): Add comment and reorder
8862 components for performances.
8863 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
8866 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8868 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
8869 If expression is compile-time known and obeys a static predicate
8870 it must be labelled as static, to prevent spurious warnings and
8871 run-time errors, e.g. in case statements. This is relevant when
8872 the expression is the result of constant-folding a type conversion
8873 whose expression is a variable with a known static value.
8875 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8877 * exp_attr.adb, sem_attr.ads: Minor reformatting.
8879 2017-01-06 Justin Squirek <squirek@adacore.com>
8881 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
8882 expansion of Finalization_Size attribute.
8883 * sem_attr.adb (Analyze_Attribute): Add entry to check the
8884 semantics of Finalization_Size.
8885 (Eval_Attribute): Add null entry for Finalization_Size.
8886 * sem_attr.ads: Add Finalization_Size to the implementation
8887 dependent attribute list.
8888 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
8890 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8892 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
8893 iterator specification with a serious syntactic error, transform
8894 construct into an infinite loop in order to continue analysis
8895 and prevent a compiler abort.
8897 2017-01-06 Tristan Gingold <gingold@adacore.com>
8899 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
8900 max_queue_lengths_array if unused.
8902 2017-01-06 Bob Duff <duff@adacore.com>
8904 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
8905 array access, in case "\" is at the end of Text.
8906 * stylesw.adb (Set_Style_Check_Options): Don't include input
8907 characters in the error message template, because they could
8908 be control characters such as "\", which Errout will try to
8911 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8913 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
8914 For a private type examine the visible declarations that follow
8915 the partial view, not just the private declarations that follow
8918 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8920 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
8923 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8925 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
8926 alias of the inherited op is the parent iterator, no need to
8927 examine dispatch table positions which might not be established
8928 yet if type is not frozen.
8929 * sem_disp.adb (Check_Controlling_Formals): The formal of a
8930 predicate function may be a subtype of a tagged type.
8931 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
8932 of representation items for the completion of a type extension
8933 where a predicate applies to the partial view.
8934 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
8935 parameter that designates function whose actual receives a
8936 predicate check, to improve warning message when the check will
8937 lead to infinite recursion.
8938 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
8939 Apply_Predicate_Check.
8941 2017-01-06 Tristan Gingold <gingold@adacore.com>
8943 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
8944 Gnat_Extended_Ravenscar.
8945 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
8947 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8949 * sem_util.ads: Minor typo fix and reformatting.
8951 2017-01-06 Yannick Moy <moy@adacore.com>
8953 * ghost.adb Minor fixing of references to SPARK RM.
8954 (Check_Ghost_Context): Check whether reference is to a lvalue
8955 before issuing an error about violation of SPARK RM 6.9(13)
8956 when declaration has Ghost policy Check and reference has Ghost
8958 * sem_util.adb Minor indentation.
8959 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
8960 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
8961 * sem_util.ads (Unique_Defining_Entity): Document the result
8962 for package body stubs.
8964 2017-01-06 Tristan Gingold <gingold@adacore.com>
8966 * raise-gcc.c (abort): Macro to call Abort_Propagation.
8967 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
8969 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
8970 Do not generate the Entry_Max_Queue_Lengths_Array if all default
8972 * exp_util.adb (Corresponding_Runtime_Package): Consider
8973 Max_Queue_Length pragma.
8975 2017-01-06 Justin Squirek <squirek@adacore.com>
8977 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
8978 Remove declaration generation in the case of
8979 System_Tasking_Protected_Objects_Single_Entry being used,
8980 and add a warning message when this is detected to occur.
8981 (Make_Initialize_Protection): Remove reference pass in the case
8982 of System_Tasking_Protected_Objects_Single_Entry.
8983 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
8984 * s-tposen.adb (Initialize_Protection_Entry): Remove
8985 Entry_Queue_Max parameter.
8986 * s-tposen.ads: Remove the types use to store the entry queue
8988 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
8990 2017-01-06 Yannick Moy <moy@adacore.com>
8992 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
8993 behavior of function, to also accept out of range positions
8994 and raise Constraint_Error in such case, and to copy sloc from
8995 literal if No_Location passed as location.
8996 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
8997 of functions to raise Constraint_Error in case of value not in
9000 2017-01-06 Tristan Gingold <gingold@adacore.com>
9002 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
9003 Invalidate_Stack_Cache.
9005 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
9007 * s-os_lib.adb: Minor fix to the signature of Readlink.
9009 2017-01-06 Javier Miranda <miranda@adacore.com>
9011 * sem_ch6.adb (Conforming_Types): Handle another
9012 confusion between views in a nested instance with an actual
9013 private type whose full view is not in scope.
9015 2017-01-06 Arnaud Charlet <charlet@adacore.com>
9017 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
9018 mark a rewritten if statement as explicit (Comes_From_Source).
9020 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9022 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
9024 2017-01-06 Tristan Gingold <gingold@adacore.com>
9026 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
9028 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9030 * sem_case.adb: Minor reformatting.
9032 2017-01-06 Thomas Quinot <quinot@adacore.com>
9034 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
9036 2017-01-06 Justin Squirek <squirek@adacore.com>
9038 * aspects.adb: Register aspect in Canonical_Aspect.
9039 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
9040 into respective tables.
9041 * einfo.ads, einfo.adb: Add a new attribute for
9042 handling the parameters for Pragma_Max_Entry_Queue
9043 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
9044 for accessing and setting were added as well.
9045 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
9046 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
9047 declaration for pramga arguments and store them in the protected
9049 (Make_Initialize_Protection): Pass a reference to
9050 the Entry_Max_Queue_Lengths_Array in the protected type node to
9052 * rtsfind.adb: Minor grammar fix.
9053 * rtsfind.ads: Register new types taken from the
9054 runtime libraries RE_Protected_Entry_Queue_Max and
9055 RE_Protected_Entry_Queue_Max_Array
9056 * s-tposen.adb, s-tpoben.adb
9057 (Initialize_Protection_Entry/Initialize_Protection_Entries):
9058 Add extra parameter and add assignment to local object.
9059 * s-tposen.ads, s-tpoben.ads: Add new types to
9060 store entry queue maximums and a field to the entry object record.
9061 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
9062 for Aspect_Max_Queue_Length.
9063 (Check_Aspect_At_Freeze_Point):
9064 Add aspect to list of aspects that don't require delayed analysis.
9065 * sem_prag.adb (Analyze_Pragma): Add case statement for
9066 Pragma_Max_Queue_Length, check semantics, and register arugments
9067 in the respective entry nodes.
9068 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
9069 and Has_Max_Queue_Length
9070 * snames.ads-tmpl: Add constant for the new aspect-name
9071 Name_Max_Queue_Length and corrasponding pragma.
9073 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9075 * exp_util.adb (Is_Controlled_Function_Call):
9076 Reimplemented. Consider any node which has an entity as the
9077 function call may appear in various ways.
9079 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9081 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
9082 an unchecked type conversion when performing a view conversion
9083 to/from a private type. In all other cases use a regular type
9084 conversion to ensure that any relevant checks are properly
9087 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9089 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
9091 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9093 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
9094 error on case expression that is an entity, when coverage is
9095 incomplete and entity has a static value obtained by local
9097 (Handle_Static_Predicate): New procedure, subsidiary of
9098 Check_Choices, to handle case alternatives that are either
9099 subtype names or subtype indications involving subtypes that
9100 have static predicates.
9102 2017-01-06 Thomas Quinot <quinot@adacore.com>
9104 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
9105 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
9107 2017-01-06 Bob Duff <duff@adacore.com>
9109 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
9110 Elaborate_All(P) to P itself. That could happen in obscure cases,
9111 and always introduced a cycle (P body must be elaborated before
9113 * lib-writ.ads: Comment clarification.
9114 * ali-util.ads: Minor comment fix.
9115 * ali.adb: Minor reformatting.
9117 2017-01-06 Tristan Gingold <gingold@adacore.com>
9119 * a-exexpr-gcc.adb: Improve comment.
9121 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9123 * s-linux-mips.ads: Use correct signal and errno constants.
9124 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
9126 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9128 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
9129 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
9132 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
9134 * gnatvsn.ads: Bump copyright year.
9136 2017-01-01 Jakub Jelinek <jakub@redhat.com>
9138 * gnat_ugn.texi: Bump @copying's copyright year.
9139 * gnat_rm.texi: Likewise.
9141 Copyright (C) 2017 Free Software Foundation, Inc.
9143 Copying and distribution of this file, with or without modification,
9144 are permitted in any medium without royalty provided the copyright
9145 notice and this notice are preserved.