Re: [PATCH] Ada: Bump version to 11.

2020-05-27 Thread Arnaud Charlet
> I'm packaging a new gcc11 package and I noticed this needs to be bumped. > > Ready for master? Yes, thanks. > gcc/ada/ChangeLog: > > * gnatvsn.ads: Bump Library_Version to 11. > --- > gcc/ada/gnatvsn.ads | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH] fix Ada bootstrap on Cygwin64 (PR bootstrap/94918)

2020-05-04 Thread Arnaud Charlet
> > If there is an issue, it would be in "s-oscons-tmplt.c" which is supposed > > to define Serial_Port_Descriptor as: > > > >subtype Serial_Port_Descriptor is System.Win32.HANDLE; > > > > See: > > > > #if defined (__MINGW32__) || defined (__CYGWIN__) > > # define TARGET_OS "Windows" > > #

Re: [PATCH] fix Ada bootstrap on Cygwin64 (PR bootstrap/94918)

2020-05-02 Thread Arnaud Charlet
> This fixes three compilation errors preventing bootstrap of gcc-10/11 > with Ada on x86_64-pc-cygwin. See PR bootstrap/94918 for details. > > Tested by bootstrapping on x86_64-pc-cygwin, and since it touches code > shared with mingw, also by building a cross to x86_64-w64-mingw32. > > Ok for

Re: [committed] wwwdocs: ada: Tweak link to GNAT: The GNU Ada Compiler.

2020-04-01 Thread Arnaud Charlet
> I spoke too fast, that was a 404 page. > > > - https://www2.adacore.com/gap-static/GNAT_Book/html/;>GNAT: > > + https://www.adacore.com/gap-static/GNAT_Book/html/;>GNAT: > > Arnaud, Eric, Pierre-Marie, what do you recommend? > > https://www.adacore.com/books/gnat-the-gnu-ada-compiler only

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-11-05 Thread Arnaud Charlet
> That should be @uref{prerequisites.html#GNAT-prerequisite,,GNAT > prerequisites}. Thanks. I wouldn't have been able to guess that! Corresponding patch installed. 2019-11-05 Arnaud Charlet * doc/install.texi: Further fix syntax for html generation. Index: doc/instal

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-10-28 Thread Arnaud Charlet
> > 2019-09-10 Arnaud Charlet > > > > * doc/install.texi: Fix syntax for html generation. > > > > Index: doc/install.texi > > === > > --- doc/install.texi(revision 275400)

Re: [ADA PATCH] Fix locales.c iso_3166 bug

2019-10-27 Thread Arnaud Charlet
> My script to check for PR79475-like issues discovered what looks like a bug > in the Ada FE. I actually have no idea how it can work properly for any > entries after the last US entry or "United-States", because it will only > match United-StatesUY to US or UZ to Uruguay etc., rather than >

Re: [PATCH v2 1/2] libada: Remove racy duplicate gnatlib installation

2019-10-01 Thread Arnaud Charlet
> I have verified this change by running my combined build process where a > native `x86_64-linux-gnu' configuration is built first and then used to > build a `riscv64-linux-gnu' cross-compiler, both with `--disable-libada' > specified, without and with this patch applied. I have added `make

Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs'

2019-09-27 Thread Arnaud Charlet
> Shall I amend the change description anyhow then? I know it has not (as > yet, as discussed at the GNU Tools Cauldron recently) been enforced for > the GCC project (unlike with e.g. glibc), however I mean to use it whole > as the commit message, which is what I have been doing for quite a

Re: [PATCH 1/2] libada: Remove racy duplicate gnatlib installation

2019-09-27 Thread Arnaud Charlet
> > Unfortunately the Make-lang.in part is still needed when using the > > --disable-libada configure switch so a more elaborate change is needed. > > Hmm, I've experimented a bit and AFAICT if `--disable-libada' is given > without my proposed change applied, then the gnatlib stuff doesn't get

Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs'

2019-09-26 Thread Arnaud Charlet
> Notice that ADA_RTL_OBJ_DIR never changes with/without the use of this > configuration option (as expected). > > Does it answer your question? Yes, that's now very clear, thanks! The change is OK for me, thanks. Arno

[Ada] Remove dependency on To_C/To_Ada

2019-09-26 Thread Arnaud Charlet
A recent change in osint.adb introduced a dependency on To_C/To_Ada subprograms which are (too) recent additions to System.OS_Lib, breaking builds of cross compilers with an older version of GNAT. Even though this is not guaranteed to work, this dependency is relatively easy to lift, so done.

Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs'

2019-09-26 Thread Arnaud Charlet
> Respect the `--enable-version-specific-runtime-libs' configuration > option in libada/, so that shared gnatlib libraries will be installed > in non-version-specific $(toolexeclibdir) if requested. In a > cross-compilation environment this helps setting up a consistent > sysroot, which can

Re: [PATCH 1/2] libada: Remove racy duplicate gnatlib installation

2019-09-26 Thread Arnaud Charlet
Unfortunately the Make-lang.in part is still needed when using the --disable-libada configure switch so a more elaborate change is needed. > Remove the extraneous `install-gnatlib' invocation from within gcc/ then > as all the gnatlib handling ought to be done in libada/ nowadays. > >

Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32

2019-09-20 Thread Arnaud Charlet
> I'd keep the target list alphabetical. Can do so when the Solaris patch > goes in. > > Here's what I've successfully tested last night on both > i386-pc-solaris2.11 and sparc-sun-solaris2.11, shamelessly stolen from > the Linux counterparts. If it is acceptable, I'd add *-*-solaris2.* to >

Re: [PING^2][PATCH 0/3] GNAT test suite fixes for build sysroot

2019-09-16 Thread Arnaud Charlet
> > In the course of setting up GCC regression testing for the RISC-V target > > I have discovered that the GNAT test suite does not correctly respond to > > the test environment settings passed from the test harness in my setup and > > consequently no test case works correctly. > > Ping for:

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-10 Thread Arnaud Charlet
eabihf/armv8l-unknown-linux-gnueabihf/gcc.git~master-stage2/gcc/HTML/gcc-10.0.0/gccinstall/index.html' > > > failed > > > > Hmm strange, the ref should be there: > > > Indeed, that's what I thought too Allright, there are already similar kludges elsewhere, so I

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-09 Thread Arnaud Charlet
> > Just installed the following change on trunk, thanks again for your > > feedback! > > > > 2019-09-05 Arnaud Charlet > > > > * doc/install.texi: Update and clarify requirements to build GNAT. > > > Hi Arnaud, > > It seems ther

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-05 Thread Arnaud Charlet
> > Can someone please remind me in which repository I can find the GCC > > prerequisites doc sources? > > Answering my own question: found it under gcc/doc/install.texi > > Working on it... Just installed the following change on trunk, thanks again for your feedb

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-05 Thread Arnaud Charlet
> Can someone please remind me in which repository I can find the GCC > prerequisites doc sources? Answering my own question: found it under gcc/doc/install.texi Working on it...

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-05 Thread Arnaud Charlet
Maciej, Thank you for your comments, I definitely agree with you that the document is too well hidden and could be improved, I'll work on that and put the Ada build requirements in a single, easier to find place (probably the prerequisites since both you and I started from there). Can someone

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-04 Thread Arnaud Charlet
Maciej, > This change (not posted to `gcc-patches' for some reason) has caused a > regression in the form of a build failure with the `riscv-linux-gnu' > target (and for the record the `x86_64-linux-gnu' build/host running GCC > 8.3.0): > > ali.adb:34:28: warning: use clause for package

[Ada] clean ups in C runtime files

2019-07-18 Thread Arnaud Charlet
-linux-gnu, committed on trunk. 2019-07-18 Arnaud Charlet * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c, cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c, argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,

Re: r273212 - in /trunk/gcc/ada: ChangeLog Makefile...

2019-07-13 Thread Arnaud Charlet
> > 2019-07-08 Dmitriy Anisimkov > > > > gcc/ada/ > > > > * Makefile.rtl: Use g-sercom__linux.adb for all linuxes. > > ln: failed to create symbolic link 'rts/g-sercom.adb': File exists > make[7]: *** [/daten/riscv64/gcc/gcc-20190713/gcc/ada/Makefile.rtl:2676: > setup-rts] Error 1 > >

Re: [PATCH] [Ada] Make clockid_t type public on GNU/kFreeBSD

2019-07-04 Thread Arnaud Charlet
> checked in. Ok for the gcc-9 branch as well? Yes.

Re: [PATCH] [Ada] Make clockid_t type public on GNU/kFreeBSD

2019-07-04 Thread Arnaud Charlet
> I don't have commit access so could you please do so on my behalf? No, I won't be able to do that unfortunately. By the way do you have a copyright assignment in place? Arno

Re: [PATCH] [Ada] Make clockid_t type public on GNU/kFreeBSD

2019-07-04 Thread Arnaud Charlet
OK, thanks. > From: James Clarke > > Monotonic_Clock and RT_Resolution in the recently-added s-tpopmo.adb > call clock_gettime/clock_getres with the integral constants from OSC and > thus rely on clockid_t being an integral type, so we cannot hide it on > GNU/kFreeBSD. Instead, make the

Re: [PING][PATCH 0/3] GNAT test suite fixes for build sysroot

2019-06-20 Thread Arnaud Charlet
> > Have you resolved your copyright assignment issues since then? > > The ball is now in FSF's court I'm told. OK > > The above patch needs to use "or else" instead of "or". OK with this change > > on the above patch. > > OK, I have updated that in my patch. > > Technically both variants

Re: [PING][PATCH 0/3] GNAT test suite fixes for build sysroot

2019-06-19 Thread Arnaud Charlet
> > In the course of setting up GCC regression testing for the RISC-V target > > I have discovered that the GNAT test suite does not correctly respond to > > the test environment settings passed from the test harness in my setup and > > consequently no test case works correctly. > > Ping

[Ada] Workaround for PR ada/80590

2019-06-17 Thread Arnaud Charlet
s in gnat1 with this patch when compiling g-exptty.adb, g-locfil.adb, s-gloloc.adb and g-socthi.adb. Tom, if you could confirm that you are unblocked and can move forward on reenabling Ada on your builds, that'd be great, let me know. Committed on branches 8, 9 and trunk. 2019-06-17 Arnaud Charlet

Re: [ada, build] Avoid cp -p failures during Ada make install

2019-05-13 Thread Arnaud Charlet
> > No, this is not OK. > > > > I'd rather keep the simple current logic and either stick to cp -p, or > > use a proper $(INSTALL_whatever) as done elsewhere rather than adding more > > kludges. > > how do you mean, `proper $(INSTALL_whatever)'? Using e.g. INSTALL_DATA from configure. > I've

Re: [ada, build] Avoid cp -p failures during Ada make install

2019-05-08 Thread Arnaud Charlet
> Also, standard.ads.h is a valid file, so the reference shouldn't be removed. > > I'll add it to the repository, this was an oversight, thanks for noticing. I've added it now. 2019-05-08 Arnaud Charlet * standard.ads.h: New file.

Re: [ada, build] Avoid cp -p failures during Ada make install

2019-05-08 Thread Arnaud Charlet
> Tested on x86_64-pc-linux-gnu installing both to a local filesystem and > an NFSv3 filesystem. > > Ok for mainline (and the gcc-9 and gcc-8 branches eventually)? No, this is not OK. I'd rather keep the simple current logic and either stick to cp -p, or use a proper $(INSTALL_whatever) as done

Re: [ada, build] Fix make install-gcc-specs with empty GCC_SPEC_FILES

2019-05-07 Thread Arnaud Charlet
> When installing gcc 9.1.0 on Solaris 10 with CONFIG_SHELL=/bin/ksh, it > failed in the same way as originally fixed by > > https://gcc.gnu.org/ml/gcc-patches/2016-05/msg00087.html > > While the patch still is on the gcc-5 and gcc-6 branches, it has been > lost (inadvertently, I assume)

Re: [PATCH] PR ada/89583, GNAT.Sockets.Bind_Socket fails with IPv4 address

2019-03-05 Thread Arnaud Charlet
Simon, Thanks for the patch. We already have a fix pending for that in our tree that we will merge. Arno > On 4 Mar 2019, at 20:48, Simon Wright wrote: > > With GCC9, GNAT.Sockets includes support for IPv6. Sockaddr is an > Unchecked_Union, which now includes IPv6 fields, bringing the total

[Ada] fix gnatlib build on x32 runtime

2019-02-06 Thread Arnaud Charlet
This has been reported on https://github.com/mattgodbolt/compiler-explorer-image/issues/161 The failure has been introduced 2018-11-14 when updating the list of signals in s-linux*.ads files, s-linux__x32.ads was forgotten. Tested on x86_64-pc-linux-gnu, committed on trunk. 2019-02-06 Arnaud

Re: [PATCH] Don't DCE const/pure calls that can throw if cfg can't be altered (PR rtl-optimization/88870)

2019-01-17 Thread Arnaud Charlet
> > > PR rtl-optimization/88870 > > > * dce.c (deletable_insn_p): Never delete const/pure calls that can > > > throw if we can't alter the cfg or delete dead exceptions. > > > (mark_insn): Don't call find_call_stack_args for such calls. > > > > > > * gcc.dg/pr88870.c: New test. > > OK.

Re: not posted ada patch breaks ada build on alpha-linux-gnu

2018-11-26 Thread Arnaud Charlet
> that fixes the build, taken from the sparc64 file. not sure if that is > appropriate. The patch looks good, you can go ahead and commit it. > --- gcc/ada/libgnarl/s-linux__alpha.ads (revision 266457) > +++ gcc/ada/libgnarl/s-linux__alpha.ads (working copy) > @@ -87,6 +87,7 @@ >

Re: not posted ada patch breaks ada build on alpha-linux-gnu

2018-11-26 Thread Arnaud Charlet
> r266136 broke the ada build on alpha-linux-gnu, filed as PR88191. I didn't > find this patch posted to gcc-patches. Thanks for the heads up. This is this change: [Ada] Update signal constants for GNU/Linux Add the signal SIGSYS and mark the glibc reserved real-time signals (32-34) as

Re: [PR81878]: fix --disable-bootstrap --enable-languages=ada, and cross-back gnattools build

2018-11-14 Thread Arnaud Charlet
> Huh, indeed - it's a host_module without bootstrap ... and libada is > a target_module not bootstrapped either. So we're indeed in a curious > situation where we have a bootstrap of Ada requiring a host Ada but > nothing of Ada is actually bootstrapped ... ;) Not sure what you mean by that,

Re: [PR81878]: fix --disable-bootstrap --enable-languages=ada, and cross-back gnattools build

2018-11-12 Thread Arnaud Charlet
> I've considered sourcing ada/config-lang.in from within > gnattools/configure, and testing lang_requires as set by it, so as to > avoid a duplication of tests that ought to remain in sync, but decided > it would be too fragile, as ada/config-lang.in does not expect srcdir > to refer to

Re: [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878).

2018-10-26 Thread Arnaud Charlet
> Bootstrapped on x86_64-pc-linux-gnu and mingw-w64-x86_64. > > Ok for trunk? OK, thanks.

Re: [Ada] Introduce -gnatd_A to set Opt.Disable_ALI_File

2018-09-28 Thread Arnaud Charlet
>> This will allow us to remove the import of flag_compare_debug in >> lib-writ.adb in a second stage. > > And here's the second stage. Tested on x86_64-linux-gnu. Ok to install? This is OK, thanks. > [Ada] use -gnatd_A to disable .ali on -fcompare-debug recompile > > From: Alexandre Oliva

Re: [Ada] Fix comment typo in exp_ch9.adb

2018-09-20 Thread Arnaud Charlet
OK, thanks. > Index: gcc/ada/ChangeLog > === > > --- gcc/ada/ChangeLog (revision 264438) > +++ gcc/ada/ChangeLog (working copy) > @@ -1,3 +1,7 @@ > +2018-09-20 Oliver Kellogg > + > + * exp_ch9.adb: Fix typo 'geenrated'

Re: [PATCH] Introduce instance discriminators

2018-07-31 Thread Arnaud Charlet
>>> Ok to install the first two patches? (the third is just for reference) >> >> Ping? >> >> https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01419.html > > OK for the middle-end parts, the Ada parts need separate approval > (maybe CC a maintainer). Ok for the Ada part. Arno

Re: [PATCH, Ada] RISC-V: Initial riscv linux Ada port.

2018-07-07 Thread Arnaud Charlet
> I tried adding the missing definition. I now get > > === acats Summary === > # of expected passes2320 > # of unexpected failures0 > > === gnat Summary === > > # of expected passes2779 > # of unexpected failures4 > # of

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-06 Thread Arnaud Charlet
> These are some patches I needed to complete my cross build of a native > riscv linux Ada compiler. Some paths were different on the build machine > and host machine. I needed to pass options into gnatmake to work around this, > and that required fixing some makefile rules to use $(GNATMAKE)

Re: [PATCH, Ada] RISC-V: Initial riscv linux Ada port.

2018-07-06 Thread Arnaud Charlet
> Ada is a low priority side project for me, so if you want non-trivial changes > it may be a while before I can get to them. There is a lot of other stuff > higher on my priority list at the moment, such as getting native gdb support > working. If this isn't OK as is, then I'm willing to put

Re: [PATCH] [ADA] Make install-gnatlib use the correct ranlib for cross-builds

2018-06-30 Thread Arnaud Charlet
> there is a minor glitch in the make install for TARGET!=HOST cross-builds, > which affects only Ada AFAICT. > > That is "make install" tries to use the wrong ranlib command here: > > cd rts; for file in *.a;do \ >/usr/bin/install -c -m 644 $file >

Re: [PATCH] Ada: Fix s-oscons.ads generation

2018-03-07 Thread Arnaud Charlet
> >>The $(GNATLIBCFLAGS) are already included in $(GNATLIBCFLAGS_FOR_C). > >> > >>We must call the C compiler with the right machine flags. So, add > >>$(GNATLIBCFLAGS_FOR_C) to $(OSCONS_EXTRACT). For example, on a > >>bi-arch > >>compiler supporting 32-bit and 64-bit instruction sets we pick >

Re: [PATCH] Ada: Fix s-oscons.ads generation

2018-03-07 Thread Arnaud Charlet
> The $(GNATLIBCFLAGS) are already included in $(GNATLIBCFLAGS_FOR_C). > > We must call the C compiler with the right machine flags. So, add > $(GNATLIBCFLAGS_FOR_C) to $(OSCONS_EXTRACT). For example, on a bi-arch > compiler supporting 32-bit and 64-bit instruction sets we pick otherwise > only

Re: [PATCH] PR ada/66205 gnatbind generates invalid code when finalization is enabled in restricted runtime

2017-12-19 Thread Arnaud Charlet
Simon, Unfortunately we've discovered that your patch is causing unexpected consequences and break e.g. testing of ravenscar application, where although the Ada RM requires no task termination, for practical purposes, waiting for terminating task is something we rely upon for automatic testing,

Re: [PATCH] PR ada/66205 gnatbind generates invalid code when finalization is enabled in restricted runtime

2017-12-05 Thread Arnaud Charlet
> I've come up with a considerably simpler patch, which merely causes the > procedure adafinal to be generated with a null body if the restriction > No_Task_Termination is set (note, this restriction is part of the > Ravenscar profile; if tasks can't terminate, program level finalization > can't

Re: [PATCH] x32: Add and use libgnarl/s-taprop__x32.adb

2017-10-02 Thread Arnaud Charlet
> I have no idea how to do it. I opened: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82384 See Pierre-Marie's suggested patch on the PR. Arno

Re: [PATCH] x32: Add and use libgnarl/s-taprop__x32.adb

2017-10-01 Thread Arnaud Charlet
> s-taprop.adb failed to compile for x32: > > s-taprop.adb:341:29: operator for type "System.Linux.time_t" is not > directly visible > s-taprop.adb:341:29: add with_clause and use_clause for "Linux" > > which is caused by > > 2017-09-25 Doug Rupp > > *

Re: [Ada] Improve performance of 'Image with enumeration types.

2017-09-26 Thread Arnaud Charlet
Duncan, > >>it looks like this is in essence inlining the run-time library > >>routine. In which case, shouldn't you only do it if inlining is > >>enabled?  For example, it seems rather odd to do this if > >>compiling with -Os. > > > >Actually, measurements showed that this instance of inlining

new Ada merger

2017-09-13 Thread Arnaud Charlet
This is a heads up that I am working with Pierre-Marie (in cc:) to transition my work as "AdaCore merger" - aka the person who submits most of AdaCore front-end changes in GCC - over to him. Pierre-Marie has already write-after-approval and has submitted and committed many patches already in the

[Ada] Enforce check on wrong usage names in aspect definitions

2017-09-12 Thread Arnaud Charlet
The frontend does not report an error on aspect clases defined in the public part of a nested package that reference names defined in the private part. After this patch the error is reported on the following sources: pragma Ada_2012; with Ada.Text_IO; use Ada.Text_IO; procedure Small is

[Ada] Spurious warning in Containers.Bounded_Doubly_Linked_Lists

2017-09-12 Thread Arnaud Charlet
This patch fixes a bug in which an instantiation of Containers.Bounded_Doubly_Linked_Lists can give warnings if the actual type passed to Element_Type is not fully default-initialized. The following test should compile quietly. with Ada.Containers.Bounded_Doubly_Linked_Lists; procedure Test is

[Ada] Ignore both Global and Refined_Global in CodePeer mode

2017-09-12 Thread Arnaud Charlet
Only the first pragma was ignored in CodePeer mode, to allow analysis of legacy code, which caused errors when the second was also present. Now both are ignored in CodePeer mode. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-12 Yannick Moy * gnat1drv.adb

[Ada] Dynamically tagged expr of expr function is illegal

2017-09-12 Thread Arnaud Charlet
It is illegal to return a dynamically tagged expression from an expression function that returns a specific type. See RM-3.9.2(9). This patch fixes a bug that caused the compiler to fail to detect this illegality. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-12 Bob Duff

[Ada] Another freezing issue on expression function in nested package

2017-09-11 Thread Arnaud Charlet
This patch totally disables the freezing of an expression function at the point its body is analyzed, as well the freezing of all the types that are not yet frozen, in order to support more cases where the profile contains a type which depends on a private type that is declared in an open scope

[Ada] Rename runtime variant files under libgnat

2017-09-11 Thread Arnaud Charlet
Same renaming as just done for libgnarl, under libgnat this time. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-11 Jerome Lambourg * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__* * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take

[Ada] Rename runtime variant files under libgnarl

2017-09-11 Thread Arnaud Charlet
This is the next step in the source file and directory reorg in GNAT sources. This time, we rename all files of the form ?-[a-z]*-* into ?-[a-z]*_*, for example s-tpopsp-posix.adb becomes s-tpopsp__posix.adb. This is done so that it's easier to see which files are platform specific variants (such

Re: [Ada] Move non-tasking runtime sources to libgnat subdirectory

2017-09-08 Thread Arnaud Charlet
> Given that you're moving the files, I wonder what the rationale is for > moving them to another subdirectory within gcc/ada, rather than to > something within the top-level libada directory (or some other top-level > directory or directories, as appropriate), since such top-level > directories

[Ada] Move non-tasking runtime sources to libgnat subdirectory

2017-09-08 Thread Arnaud Charlet
This is the second big source reorg in the GNAT sources, this time all runtimme source belonging to libgnat are moved to a new subdirectory libgnat. Diff is too large to be attached, even compressed with bzip2 -9. I'm only including the diff on gcc-interface which is the not completely trivial

[Ada] New pragma Ada_2020

2017-09-08 Thread Arnaud Charlet
This patch allows pragma Ada_2020 to be used to enable Ada 2020 features that have been implemented in GNAT. Ada_2020 is a configuration pragma. This is in addition to the -gnat2020 command-line switch. Note: There is no synonym pragma Ada_20. We have Ada_05 and Ada_12, but we decided long ago

[Ada] Extend efficient array reset to all elementary types

2017-09-08 Thread Arnaud Charlet
This change extends the efficient handling of an array reset to 0 by means of an aggregate with a single Others choice from a discrete component type to any elementary type. The 3 instances of the Reset procedure below must invoke memset: with G; package P is subtype Index is Positive range

[Ada] No room for new warning switches

2017-09-08 Thread Arnaud Charlet
This patch adds machinary to create new warning flags using the underscore "_" prefix. This is necessary because all letters of the alphabet and letters prefixed with a dot "." are used already. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Justin Squirek

[Ada] Missing error in function expressions

2017-09-08 Thread Arnaud Charlet
The compiler skips reporting errors located in function expressions. After this patch the error is reported in the following sources: package Base is type Base_Type is tagged record V : Integer; end record; function Func_1 (B : Base_Type) return Integer is (B.V); end; with Base;

[Ada] Spurious error on formal package with Inline_Always

2017-09-08 Thread Arnaud Charlet
This patch removes spurious errors appearing on a formal package of an instantiation nestled within an enclosing instance body. when the inner instance is a package that includes a subprogram with an Inline_Always aspect. The following must compile quietly: gnstmske -q -gnatws main --- with

[Ada] Crash on string concatenation

2017-09-08 Thread Arnaud Charlet
This patch replaces several calls to New_Copy in aggregage expansion and all calls to New_Copy in concatenation expansion with calls to New_Copy_Tree. The former left the syntactic structure of the tree ambiguous, where certain nodes would theoretically have two parents, while the AST supports

[Ada] Compiler crash on mixed-case source file names

2017-09-08 Thread Arnaud Charlet
This patch fixes a bug in which if mixed-case file names are used, and a file name contains any of the capital letters 'U', 'W', 'Q', or 'O', then in rare cases the compiler can crash. No small test is available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Bob Duff

[Ada] T'Class'Input reading corrupted data

2017-09-08 Thread Arnaud Charlet
If T'Class'Input is called on a stream containing data that does not look like it comes from T'Class'Output, it could crash. This patch fixes that bug by making sure it raises an exception. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Bob Duff *

[Ada] New debug switch -gnatdJ

2017-09-08 Thread Arnaud Charlet
, committed on trunk 2017-09-08 Arnaud Charlet <char...@adacore.com> * exp_intr.adb (Append_Entity_Name): Move to ... * sem_util.ads, sem_util.adb: ... here to share it. (Subprogram_Name): New subprogram, to compute the name of the enclosing subprogram/

[Ada] Infinite loop on call to nested subprogram with -gnatE in SPARK

2017-09-08 Thread Arnaud Charlet
This patch suppresses the processing of references to internal variables for SPARK. As a result, this eliminates an infinite loop triggered by walking the scope chain of an internal variable which plays the role of an elaboration flag. -- Source -- -- gnat.adc pragma

[Ada] Copy representation aspects from type to constrained subtype

2017-09-08 Thread Arnaud Charlet
This change ensures that the representation aspects Atomic, Independent and Volatile_Full_Access are copied from the base type to the subtype when it is declared with an explicit constraint. For the following package: package P is type Bit is mod 2**1 with Size => 1; type UInt2 is

[Ada] Fix crash on expression function that is a completion

2017-09-08 Thread Arnaud Charlet
This change fixes a crash on an expression function which is the completion of a previous declaration, when the type of the expression is a record type which contains private components. Such a code is illegal as per AI12-0103, which says that expression functions that are a completion freeze

[Ada] Generic dispatching constructors of limited interface types

2017-09-08 Thread Arnaud Charlet
The compiler crashes processing a generic dispatching constructor that is invoked to build-in-place objects that cover limited interface types. After this patch the following test compiles without errors: package Base is type Root is limited interface; function Constructor (Params :

[Ada] Compiler crash on anonymous array with component with invariant

2017-09-08 Thread Arnaud Charlet
This patch fixes a compiler abort on an object declaration with an anonymous array when the component type of the array has an invariant aspect. The following must compile quietly: gcc -c -gnata main.adb with Lrs; procedure Main is begin Lrs.Initialise; end Main; --- with Global;

[Ada] Wrong interface tag visible through limited with clause

2017-09-08 Thread Arnaud Charlet
If the designated type of an access to a class-wide interface type is visible through a limited-with clause, and attribute 'Tag is applied to the dereference of a pointer of such type, and such 'Tag value is used to invoke the routines of the Ada.Tags runtime package then the Ada.Tags routine may

[Ada] Subtype indications inherit predicates

2017-09-08 Thread Arnaud Charlet
A subtype indication whose type mark is a predicated subtype inherits the predicates of its parent type. A loop whose specification has the form: for S1 in T range Lo .. Hi loop ... and in which T has a static predicate, is executed over the values of T in the specified range that satisfy the

[Ada] PR ada/80888 Text_IO encoding should match source encoding

2017-09-08 Thread Arnaud Charlet
The wide character encoding used for Text_IO files is supposed to match the encoding of the source files, as specified by the -gnatW switch, unless it is specified explicitly in the Form string. Instead it incorrectly defaults to brackets encoding. The same applies to Wide_Text_IO and

[Ada] Implement extended version of -gnatR for record sub-components

2017-09-08 Thread Arnaud Charlet
This adds a -gnatRe variant to the -gnatR switch, which displays extended representation information for components of records that are themselves records by recursing on the layout of sub-components. This also makes the compiler accept -gnatR0, as documented in the User Guide. For the following

[Ada] Spurious error on actual array type in generic child instantiation.

2017-09-08 Thread Arnaud Charlet
This patch suppresses the check for compatibility of the component types of the formal and the corresponding actual in the instantiation of a generic child unit, when the component type of the formal is itself a formal of an enclosing generic unit. This removes spurious conformance errors in

[Ada] Failure to allocate on storage subpool

2017-09-08 Thread Arnaud Charlet
This patch modifies the processing of allocators to account for a case where a simple allocation still requires a call to Allocate_Any_Controlled due to subpool management. No small reproducer possible. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Hristian Kirtchev

[Ada] Inheritance of Default_Iterator from interfaces

2017-09-08 Thread Arnaud Charlet
This patch fixes a bug in which if a type implements interfaces, the Default_Iterator aspect is not inherited from all interfaces, but only from the parent type. The following test should compile and run quietly. with Ada.Iterator_Interfaces; procedure Main is type Element_Type is null

[Ada] Do not generate .ali files for subunits

2017-09-08 Thread Arnaud Charlet
This patch fixes a bug in which the compiler creates .ali files when a subunit is compiled. Given the following code: package P is procedure F; end P; package body P is procedure F is separate; end P; separate (P) procedure F is begin null; end F; The command: gcc -c p-f.adb should

[Ada] Expand barrier conditions permitted by the restriction Pure_Barrier

2017-09-08 Thread Arnaud Charlet
This patch permits the use of type conversions and components of objects subject to the following conditions: type conversions cannot potentially raise contraint errors and access types cannot be dereferenced. These additions provide greater functionality to users while respecting the aims of the

[Ada] Infinite loop on an interface conversion involving private extensions.

2017-09-08 Thread Arnaud Charlet
This patch fixes a loop in the compiler, on an interface conversion from an interface declared as a synchronized private extension to one of its ancestors. databases-instantiations,adb below must compile quietly: --- package body Databases.Generics is New_Data_ID : Data_ID_Type := 1;

[Ada] Small fix for couple of internal glitches with record layout

2017-09-08 Thread Arnaud Charlet
This change ensures that (1) -gnatR always displays the record layout that was used internally by the compiler for code generation and (2) the record layout is fully adjusted internally when the reverse bit order is specified. No functional changes expected because the first issue was papering

[Ada] Use of renamings of function results in SPARK annotations

2017-09-08 Thread Arnaud Charlet
This patch changes the expansion of object renamings in SPARK to reuse the entity associated with the renaming when the name denotes a function call. The patch also modifies a routine used to extract the entity of references to abstract states and whole objects to handle renamings of function

[Ada] Proper handling of dimension information in a type conversion.

2017-09-07 Thread Arnaud Charlet
This patch implements the proper handling of dimension information on type conversions. Given a conversion T (Expr), where the expression has type TE, the following cases arise: a) If TE has dimension information, the dimensions of the conversion are those of TE. b) If TE has no dimension

[Ada] Adding switch to disable implicit Elaborate_All in task case

2017-09-07 Thread Arnaud Charlet
This patch adds switch -gnatd.y to disable the generation of implicit Elaborate_All on a package X when a task body calls a procedure in the same package, and that procedure calls a procedure in another package X. As documented in the GNAT User Guide, when sources cannot be modified, the

[Ada] Return raise with access class-wide interface

2017-09-07 Thread Arnaud Charlet
This patches fixes a bug in which a function returns an anonymous access type whose designated type is a class-wide interface type, and the return statement returns a raise expression, the compiler crashes. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-07 Bob Duff

[Ada] Spurious error in precondition and classwide parameter

2017-09-07 Thread Arnaud Charlet
This patch fixes a spurious error on a classwide precondition for a subprogram S that is a primitive of some type T, when the precondition includes a dispatching call on a classwide formal of S whose type is urelated to T. The following must compile quietly: gnatmake -q main --- with

[Ada] Fix internal error on package instantiation and inlining

2017-09-07 Thread Arnaud Charlet
This fixes a small regression introduced by the recent improvement to the algorithm used by Hide_Public_Entities to compute the final set of external visible entities of a package. Subprogram renamings not only need to be dealt with as declaring a subprogram but also as referencing another one.

[Ada] Fix handling of ghost entity in predicate

2017-09-07 Thread Arnaud Charlet
Ghost types are allowed to mention ghost entities in their predicate. Because Ghost is propagated from type to the generated predicate function, GNAT correctly identified valid from invalid cases, but this modification simplifies the reason for correction. Tested on x86_64-pc-linux-gnu, committed

[Ada] Spurious errors on dynamic predicates and private declarations.

2017-09-07 Thread Arnaud Charlet
This patch fixes spurious visibility errors on the expression for a dynamic predicate in a subtype declaration, when the enclosing package includes private declarations. The following packages much compile quietly: --- package foo is type Kind_Type is (None, Known); type

[Ada] Avoid secondary stack for nondispatching build-in-place calls

2017-09-07 Thread Arnaud Charlet
This patch fixes a performance regression. The compiler was using the secondary stack for a nondispatching build-in-place call, which is unnecessary, and indeed older compilers did not do so. The compiler no longer uses the secondary stack for such calls. Note that the secondary stack is necessary

<    1   2   3   4   5   6   7   8   9   10   >