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