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