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