Re: Fix lto-symtab ICE during Ada LTO bootstrap

2015-11-23 Thread Arnaud Charlet
> > Will it also fix > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61954 > > Yes, probably, as well as the m68k issue, if that's really doable. Right, that's also why I think it's a more promising approach. Pretending that system.address is just an unsigned integer is bound to cause troub

Re: -fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing

2015-12-09 Thread Arnaud Charlet
> Hi > this patch implements the trik for punting if we get too many nested > pointers. > This fixes the ada tstcases. Curiously enough I would like to replace > safe_push > by quick_push but doing so I get weird error about freeing non-heap object > in the auto_vec desructor... > > Bootstraping/r

[Ada] Look at fullest view when checking for static types in unnesting

2020-09-03 Thread Arnaud Charlet
When seeing if any bound involved in a type is an uplevel reference, we must look at the fullest view of a type, since that's what the backends will do. Similarly for private types. We introduce Get_Fullest_View for that purpose. Tested on x86_64-pc-linux-gnu, committed on master

[Ada] Add push/pop capability in Output

2020-07-23 Thread Arnaud Charlet
Add the capability to use the Write_* procedures in an environment where you want to write debugging info but still use them to write to other files (such a C source files). [changelog] * output.ads (Push_Output, Pop_Output): New procedures. * output.adb (FD_Array, FD_Stack, FD_St

[Ada] Ada2020: AI12-0027 Access values and unaliased component

2020-07-23 Thread Arnaud Charlet
Access values should never designate unaliased components. This new feature is documented in AI12-0027-1. gcc/ada/ * sem_ch13.ads (Same_Representation): Renamed as Has_Compatible_Representation because now the order of the arguments are taken into account; its formals are

[Ada] Stub CUDA_Execute and CUDA_Global pragmas

2020-07-23 Thread Arnaud Charlet
This commit adds CUDA_Execute and CUDA_Global to the list of allowed pragmas. It also implements basic validation of said pragmas. gcc/ada/ * aspects.ads: Declare CUDA_Global as aspect. * einfo.ads: Use Flag118 for the Is_CUDA_Kernel flag. (Set_Is_CUDA_Kernel): New

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 onl

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 m

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" > > # defi

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. > > gcc/

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 th

[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. Test

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

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-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 wh

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] 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 a/gcc/ada/

[Ada] Ability to build the GNAT runtime with project files

2020-05-30 Thread Arnaud Charlet
This change adds project files to provide the ability to rebuild the runtime with gprbuild after setup-rts is called. Tested on x86_64-linux-gnu, committed on master gcc/ada/ * Makefile.rtl (ADA_INCLUDE_SRCS): Replace Makefile.adalib by libada.gpr and associated proje

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

2021-01-10 Thread Arnaud Charlet
> This fixes a compilation error preventing bootstrap with Ada on > x86_64-pc-cygwin. See PR bootstrap/94918 for details. > > Compared to the initial patch sent in May 2020, this v2 patch places > the fix in Ada's raise-gcc.c instead of the shared unwind-generic.h, > which should hopefully simplif

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

2021-01-14 Thread Arnaud Charlet
Gerald, Really sorry for the long delay on this one: > > I spoke too fast, that was a 404 page. > > > > > -> > href="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 y

Re: [PATCH] RTEMS: Fix Ada build for riscv

2021-01-14 Thread Arnaud Charlet
This is OK, thanks. > gcc/ada/ > > PR ada/98595 > Makefile.rtl (LIBGNAT_TARGET_PAIRS) : Use > wraplf version of Aux_Long_Long_Float. > --- > gcc/ada/Makefile.rtl | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl > index 8

Re: [PATCH] ada: c++: Get rid of libposix4, librt on Solaris

2020-11-17 Thread Arnaud Charlet
> I recently noticed that neither libposix4 nor librt are needed on > Solaris 11 any longer: > > * libposix4 was renamed to librt in Solaris 7 back in 1998. > > * librt was folded into libc in the OpenSolaris timeframe, leaving librt > only as a filter on libc. Thus, it's no longer needed on e

Re: [patch] [ada] Fix PR ada/97504 for mips*-linux

2020-12-07 Thread Arnaud Charlet
> Fix PR ada/97504 for mips*-linux, the bootstrap works again on mips*-linux. > Ok for the trunk? OK, thanks. > gcc/ada/ > PR ada/97504 > * Makefile.rtl (LIBGNAT_TARGET_PAIRS) : Use wraplf > version of Aux_Long_Long_Float. > > --- a/gcc/ada/Makefile.rtl > +++ b/gcc/ada/Makefile

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-21 Thread Arnaud Charlet
> This patch breaks bootstrap on Darwin platforms. > > Pierre-Marie de Rodat wrote: > > > The modification file time precision now defined by OS. > > > > Tested on x86_64-pc-linux-gnu, committed on trunk > > > > gcc/ada/ > > > > * adaint.c (__gnat_file_time): New routine. > > (__gnat_

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-21 Thread Arnaud Charlet
> >What about instead putting above extern long long __gnat_file_time the > >following: > > > >#if __APPLE__ > >#define st_mtim st_mtimespec > >#define st_atim st_atimespec > >#endif > > > >To avoid having the two (nested) #if __APPLE__ and keep the code easier two => three :-) > >to follow? > >

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-23 Thread Arnaud Charlet
> > For future reference, TRT for this kind of problem is to > > autoconf for the right struct field name, using AC_CHECK_MEMBER > > or AC_CHECK_MEMBERS (then use e.g. #if HAVE_STAT_ST_MTIM / #if > > HAVE_STAT_ST_MTIMESPEC, definitely not #if __APPLE__). > > I'm not diasgreeing with your technical

Re: [PATCH] Ada, Darwin, PowerPC : Fix bootstrap after 128 int changes.

2020-10-25 Thread Arnaud Charlet
> Three bootstrap breaks in one week must be close to a record, even for > powerpc-darwin ;) Indeed, sorry about that! > tested on powerpc-darwin9 (m32/m64), > OK for master? OK, thanks. > P.S. There are some apparent regressions/new GNAT fails for the m64 multilib > but these will be addressed

Re: [PATCH] Ada: hashed container Cursor type predefined equality non-conformance

2021-03-09 Thread Arnaud Charlet
> Oops, I wrote "effected" when I meant "affected". Of course, despite reading > it several times before sending, I only noticed it after sending. > > Edited version: > > --- > > * libgnat/a-cohase.ads, libgnat/a-cohase.adb, libgnat/a-cohama.ads, > libgnat/a-cohama.adb, libgnat/a-cihama.ads, lib

Re: [PATCH] Ada: hashed container Cursor type predefined equality non-conformance

2021-03-10 Thread Arnaud Charlet
> I appologise for making a mess of this final step. I have leared the errors > of my ways. Can you please submit everything self contained (the final final code changes along with the commit log) so that we are sure the proper patch is reviewed and approved? > Below are the change log entries fo

Re: [PATCH] Ada: hashed container Cursor type predefined equality non-conformance

2021-03-10 Thread Arnaud Charlet
> I'm not sure I correctly understand you here, but my interpretation is that > I should no longer submit Changelog entries, rather just the patch, and then Right. > a commit message (a-la git), and then presumably the Changelong entries will > be generated automatically. From what I can see, gcc

Re: [PATCH] ada/adaint.c (__gnat_copy_attribs): RTEMS should use utime()

2021-04-08 Thread Arnaud Charlet
> Change the preprocessor logic so RTEMS uses utime(). > gcc/ada/ > * adaint.c (__gnat_copy_attribs): RTEMS should use utime(). This change is OK. > --- > gcc/ada/adaint.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c > in

Re: [committed] ada: Avoid invalid "up" link in manual

2021-04-11 Thread Arnaud Charlet
> This is something I have been noticing for a while, and a hint by > Sandra in a somewhat similar context taught me how to avoid it. > > With this patch the bottom navigation of the page at > https://gcc.gnu.org/onlinedocs/gnat_ugn/index.html > changes from > Next: About This Guide, Up: (di

Re: [committed] ada: Avoid invalid "up" link in manual

2021-04-11 Thread Arnaud Charlet
> >> With this patch the bottom navigation of the page at > >> https://gcc.gnu.org/onlinedocs/gnat_ugn/index.html > >> changes from > >> Next: About This Guide, Up: (dir) [Contents][Index] > >> to > >> Next: About This Guide [Contents][Index] > >> and the invalid "(dir)" link that pointed

Re: [PATCH 1/3] Come up with startswith function.

2021-04-21 Thread Arnaud Charlet
> gcc/ada/ChangeLog: > > * adadecode.c (has_prefix): Remove has_prefix and replace it > with startswith. > (__gnat_decode): Likewise. This change is not OK: adadecode.c is also a runtime file and as such cannot include compiler include files. > * gcc-interface/utils.c (de

Re: [PATCH 0/3] Come up with startswith function

2021-04-21 Thread Arnaud Charlet
> The patchset is tested on x86_64-linux-gnu and I was able to build > all cross-compilers. > > Ready to be installed to master once GCC 11.1 is released? Not for the Ada part as just mentioned under your 1/3 email.

Re: [Ada] Use runtime from base compiler during stage1

2021-06-15 Thread Arnaud Charlet
> > gcc/ada/ > > > > * Make-generated.in: Add rule to copy runtime files needed > > during stage1. > > * raise.c: Remove obsolete symbols used during bootstrap. > > * gcc-interface/Make-lang.in: Do not use libgnat sources during > > stage1. > > (GNAT_ADA_OBJS, GNATBIND_OBJS

Re: Unable to build Ada on fedora

2021-06-16 Thread Arnaud Charlet
what output you are now getting. -- commit 452321a9514a0ab4c01c0aba2a37de794cf69ef8 Author: Arnaud Charlet Date: Wed Jun 16 03:55:17 2021 -0400 [Ada] Use runtime from base compiler during stage1 (continued) gcc/ada/ * gcc-interface/Make-lang.in: Use libgnat.so if libgnat.a

Re: Unable to build Ada on fedora

2021-06-17 Thread Arnaud Charlet
> >I've now committed it blindly (can't make things worse), let me know if the > >problem is fully solved or if not, what output you are now getting. > > That is looking pretty good, thanks. Great, thanks for confirming, and sorry again for the breakage on this delicate change! Arno

Re: GCC documentation: porting to Sphinx

2021-06-28 Thread Arnaud Charlet
> I've got something that is very close to be a patch candidate that can be > eventually merged. Right now, the patches are available here: > https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=log;h=refs/users/marxin/heads/sphinx-v3 FWIW I would prefer to review the changes posted here directly with a

Re: GCC documentation: porting to Sphinx

2021-06-29 Thread Arnaud Charlet
> >In particular can you explain the motivation behind all the changes in the > >gcc/ada/doc directory? > > Sure: > 1) All Sphinx manuals live in a directory where index page is called > index.rst. That's why > I moved e.g. this: gcc/ada/doc/{gnat_rm.rst => gnat_rm/index.rst} > 2) I moved latex_e

Re: [PATCH] fix PR ada/80888

2017-06-18 Thread Arnaud Charlet
> Ping > If OK, can it be applied please? > (patch applies cleanly to current sources) Patch is OK. I'll apply it when I get a chance. Arno

Re: [PATCH][AArch64] Fix ILP32 memory access

2017-07-04 Thread Arnaud Charlet
On Tue, Jul 04, 2017 at 12:19:35PM +, Wilco Dijkstra wrote: > Andreas Schwab wrote: > > @@ -5207,6 +5209,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) > >  > >    case MEM: > >  output_address (GET_MODE (x), XEXP (x, 0)); > > +   gcc_assert (GET_MODE (XEXP (x, 0)) == Pm

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 ha

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, so

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 > /home/ed/gnu/arm-linux-gnueabihf-linux64

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] 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: [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' t

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

2018-09-27 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: [PATCH 1/3] gcc/ada/s-osinte-rtems.adb: Correct formatting of comment

2014-08-11 Thread Arnaud Charlet
> This patch is needed to make Ada compile for *-*-rtems* > on GCC 4.8, 4.9, and the head. Is is ok to commit? Yes. This one even falls under the obvious category IMO. > 2014-08-11 Joel Sherrill > > * s-osinte-rtems.adb: Correct formatting of line in license block.

Re: [PATCH 3/3] gcc/ada/socket.c: Add conditionals for RTEMS

2014-08-11 Thread Arnaud Charlet
> This patch is needed to make Ada compile for *-*-rtems* > on GCC 4.8, 4.9, and the head. Is is ok to commit? OK. > 2014-08-11 Joel Sherrill > > * socket.c: Add conditionals for RTEMS. Add include of > and so correct prototype of gethostbyname_r() is used.

Re: [PATCH 3/3] gcc/ada/socket.c: Add conditionals for RTEMS

2014-08-11 Thread Arnaud Charlet
> > This patch is needed to make Ada compile for *-*-rtems* > > on GCC 4.8, 4.9, and the head. Is is ok to commit? > > OK. Actually, these includes should go in gsocket.h, as done on other targets, which also answers your previous question. Can you please repost an updated patch for review? Arn

Re: [PATCH 3/3] gcc/ada/socket.c: Add conditionals for RTEMS

2014-08-12 Thread Arnaud Charlet
> I think the best place is below this: > > #if defined (__vxworks) && ! defined (__RTP__) > #include > #else > #include > #endif > > And just move the conditional from socket.c with comment. Yes, that looks right to me. Arno

Re: [PATCH 2/2] gcc/ada/socket.c, gsocket.h: Add conditionals for RTEMS

2014-08-12 Thread Arnaud Charlet
> Hopefully this addresses the comments. > > OK to comment? > > 2014-08-12 Joel Sherrill > > * socket.c: For RTEMS, use correct prototype of gethostbyname_r(). > * gsocket.h Add include of on RTEMS. OK

Re: [PATCH 1/2] libada/Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C

2014-08-12 Thread Arnaud Charlet
> This didn't get any comments earlier. Is it OK to comment? This one is a bit tricky so requires more thoughts. On which targets did you test it? > Somewhere along the way, the Ada run-time Makefile's quit > honoring CFLAGS_FOR_TARGET. This just adds it back. > > 2014-08-12 Joel Sherrill > >

Re: [PATCH] Fix some typos

2014-08-12 Thread Arnaud Charlet
> gcc/ada/ChangeLog: > > 2014-08-12 Sylvestre Ledru > > * 9drpc.adb: Fix a typo > * s-interr.ads: Likewise > * s-taskin.ads: Likewise > * s-traces.ads: Likewise > * sysdep.c: Likewise The Ada part is OK.

Re: [PATCH 1/2] libada/Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C

2014-08-12 Thread Arnaud Charlet
> It was in the rts Makefile back when it was under gcc. I suspect it > disappeared when this > all moved to libada. Could check the history if we need to. Well, libada has been introduced many many years ago. Are you saying you haven't built Ada since then, or were using local patches? Arno

Re: [PATCH 1/2] libada/Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C

2014-08-12 Thread Arnaud Charlet
> I don't know when I last built it but it has been broken for a while and > I didn't get a chance to track it down and submit patches. OK well as I said, as long as your change doesn't break other targets, that's OK. > I have had local patches but didn't like them. Ada is just a volunteer > act

Re: Does anyone use Ada on Alpha?

2014-08-19 Thread Arnaud Charlet
> Unfortunately the Alpha box I used last time is no longer available > and so I've not been able to try the linker fix. I've not had any > responses from anyone saying they use Ada on Alpha (let alone on VMS > - where the original bug was reported - and Ada/VMS support has now > been retired). If

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-14 Thread Arnaud Charlet
> FAIL: gnat.dg/memtrap.adb (test for excess errors) > FAIL: gnat.dg/memtrap.adb scan-assembler > __gnat_begin_handler|__gnat_raise_nodefer > FAIL: gnat.dg/specs/addr1.ads (test for bogus messages, line 24) > FAIL: gnat.dg/specs/atomic1.ads (test for errors, line 9) > FAIL: gnat.dg/specs/atomic1.

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-14 Thread Arnaud Charlet
> > No, introducing all these extra/almost duplicated files is not OK, you'd > > need to find a way to share the existing files instead, thanks. > > I am not familiar with Ada. Can you recommend how to fix it? Can you send a diff between the *-linux files and your new files? This should help giv

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-14 Thread Arnaud Charlet
> >> I am not familiar with Ada. Can you recommend how to fix it? > > > > Can you send a diff between the *-linux files and your new files? This > > should help giving some options. > > > > This is the total diff. OK so I would declare a new type in System.Linux (e.g. time_t), have a new varian

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-14 Thread Arnaud Charlet
> I also changed s-osinte-posix.adb and s-osprim-posix.adb > for x32. They aren't Linux specific. What should I do with > them? I would use the time_t type defined in s-osinte* (all POSIX implementations of s-osinte* have such definition, or if they don't, it's easy to add), and in the s-osinte-

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-15 Thread Arnaud Charlet
> This is what I got. I added s-posix-time.ads which declares > System.OS_Time.time_t. I use it instead long for time_t. I > didn't add time_t to s-linux.ads since it isn't used by > s-osprim-posix.adb. Adding s-posix-time.ads isn't desirable, too intrusive. Better to use time_t (only) from sys

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-15 Thread Arnaud Charlet
> >> This is what I got. I added s-posix-time.ads which declares > >> System.OS_Time.time_t. I use it instead long for time_t. I > >> didn't add time_t to s-linux.ads since it isn't used by > >> s-osprim-posix.adb. > > > > Adding s-posix-time.ads isn't desirable, too intrusive. > > Better to use

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-15 Thread Arnaud Charlet
Looks better now, but please do not add a dependency on System.Linux in s-taprop-linux.adb, and instead use: type timeval is array (1 .. 2) of System.OS_Interface.time_t; Arno

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-15 Thread Arnaud Charlet
> > Looks better now, but please do not add a dependency on System.Linux in > > s-taprop-linux.adb, and instead use: > > > > type timeval is array (1 .. 2) of System.OS_Interface.time_t; > > > > Arno > > It doesn't work: > > s-taprop.adb:630:60: "time_t" is not a visible entity of "OS_Interfa

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-15 Thread Arnaud Charlet
> Here is the new patch. Does it look OK? Assuming you can successfully build on e.g. x86-linux and x32-linux, this looks OK to me, thanks for your efforts! Arno

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-15 Thread Arnaud Charlet
> Yes, it passed all tests with -m32, -mx32, -m64 on Linux/x86-64. > Installed on trunk. Is this OK to backport to 4.8 branch after > a few days? I would wait one or two weeks, to let time for people to report build failures on other configs which is always possible when doing this kind of delicat

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-18 Thread Arnaud Charlet
> Yes, it passed all tests with -m32, -mx32, -m64 on Linux/x86-64. > Installed on trunk. Is this OK to backport to 4.8 branch after > a few days? Actually there are two issues with your change: Using time_t for tv_nsec looks actually wrong, the definition on (my) linux is: struct timespec {

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-18 Thread Arnaud Charlet
> Actually there are two issues with your change: > > Using time_t for tv_nsec looks actually wrong, the definition on (my) > linux is: > > struct timespec { > __kernel_time_t tv_sec; /* seconds */ > longtv_nsec;/* nanoseconds */ > }; >

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-18 Thread Arnaud Charlet
> >> struct timespec { > >> __kernel_time_t tv_sec; /* seconds */ > >> longtv_nsec;/* nanoseconds */ > >> }; > > This is wrong for x32 where tv_nsec is long long, not > long. There are a couple places where long should be > long long for

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-18 Thread Arnaud Charlet
> Ada was using long for time_t and > > type timeval is array (1 .. 2) of C.long > > It assumes that the type of tv_nsec is the same as tv_sec. Yes, and that was indeed wrong/dangerous. > > --- s-osinte-solaris-posix.ads (revision 298928) > > +++ s-osinte-solaris-posix.ads (working copy) > >

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec

2013-11-18 Thread Arnaud Charlet
> >> __syscall_slong_t is a Linux specific type. We > >> can add tv_nsec_t, which should be the same > >> as time_t for all the current targets. > > > > Introducing tv_nsec_t looks reasonable to me. > > > > Can you make the change? > > Thanks. Not right now, I have lots of other things to do.

[Ada] New internal primitive Is_Subprogram_Or_Generic_Subprogram

2014-10-10 Thread Arnaud Charlet
This is a minor internal cleanup, to introduce a new primitive Is_Subprogram_Or_Generic_Subprogram with the obvious meaning. No external effect, no test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-10 Robert Dewar * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.ad

[Ada] Check for attempt to bind GNATprove files

2014-10-10 Thread Arnaud Charlet
If one or more objects is compiled in GNATprove mode (either by using GNATprove directly, or by using -gnatd.F), then the ALI file is marked and gnatbind will exit with a message as shown here. Given: 1. procedure linkdf is 2. begin 3.null; 4. end; If we first compile this

[Ada] Issue errors on illegal contracts unless SPARK_Mode is Off

2014-10-10 Thread Arnaud Charlet
Illegal Global/Depends contracts should be flagged by frontend in code for which SPARK_Mode is not specified, as GNATprove relies on contracts being legal in those cases. The frontend should skip these errors only when SPARK_Mode is Off. Now fixed, as shown on the following example. Command: -

[Ada] Loop parameter is a constant in an iterator over a formal container.

2014-10-10 Thread Arnaud Charlet
This patch enforces the same semantics for the handling of loop parameters in element iterators over formal containers, os those over formal containers: the loop parameter cannot be assigned to in user code. Compiling formal_test.adb must yield: formal_test.adb:15:07: assignment to loop parame

[Ada] Operator name returned by GNAT.Source_Info.Enclosing_Entity

2014-10-10 Thread Arnaud Charlet
The string returned by GNAT.Source_Info.Enclosing_Entity did not include names of operators (e.g. "**"). The following program: 1. with Text_IO; use Text_IO; 2. with GNAT.Source_Info; use GNAT.Source_Info; 3. procedure BadEE is 4.type R is new Boolean; 5.RV : R :=

[Ada] Implement new pragma Prefix_Exception_Messages

2014-10-10 Thread Arnaud Charlet
This implements a new configuration pragma pragma Prefix_Exception_Messages; which causes messages set using "raise x with s" to be prefixed by the expanded name of the enclosing entity if s is a string literal (if s is more complex, we assume the program is calculating exactly the message it

[Ada] Spurious error on local instantiation of pure generic unit

2014-10-10 Thread Arnaud Charlet
This patch fixes an error in the legality checks of aspects that apply to library units: these aspects are legal on a local instantiation of a library-level generic unit that carries the aspect pure. The following must compile quietly: gcc -c my_buffer.adb --- package My_Buffer with Elabora

[Ada] Ada2012 freeze rules for subprogram profiles

2014-10-10 Thread Arnaud Charlet
Ada05-019 specifies that freezing a subprogram does not automatically freeze the profile, i.e. the types of the formals and the return type. In particular an attribute reference 'Access and its relatives do not freeze the profile. Compiling bd.ads must yield: bd.ads:15:34: incorrect expression

[Ada] Missing inheritance of pragma Default_Initial_Condition

2014-10-17 Thread Arnaud Charlet
This patch modifies the inheritance of all attributes related to pragma Default_Initial_Condition to account for a case where the full view of a private type derives from another private type. -- Source -- -- parent.ads package Parent is type Parent_Typ is private

[Ada] Ensure record type equality treated correctly for codepeer

2014-10-17 Thread Arnaud Charlet
This is an internal change that does not affect the compiler, but fixes a problem in which a record comparison was not properly expanded. The compiler back end handled this, but it blew up codepeer. No further test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-17 Robert Dew

[Ada] Make System.Atomic_Counters available to user applications

2014-10-17 Thread Arnaud Charlet
The system unit System.Atomic_Counters which provides an atomic counter type, along with increment, decrement and test operations, available to user programs. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-17 Robert Dewar * gnat_rm.texi: Document System.Atomic_Counters.

[Ada] String literal is allowed for pragma Warnings in Ada 83

2014-10-17 Thread Arnaud Charlet
Documentation change only, no further test required Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-17 Robert Dewar * gnat_rm.texi: Document that string literal can be used for pragma Warnings when operating in Ada 83 mode. Index: gnat_rm.texi ==

[Ada] Class-wide type invariants for type extensions in other units.

2014-10-17 Thread Arnaud Charlet
A class-wide type invariant is inherited by a type extension, and incorporated into the invariant procedure for that type. When the expression for such an invariant (typically a function call) is first analyzed, we must preserve some semantic information in it, because the type extension may be dec

[Ada] Fix obscure case of compiler crash on bad attribute

2014-10-17 Thread Arnaud Charlet
This fixes an error in the handling of attributes where the prefix raises an exception. This resulted from other errors in the program. No simple test case has been found, but the correction is clearly safe. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-17 Robert Dewar * s

[Ada] Better messages for missing entities in configurable runtime

2014-10-17 Thread Arnaud Charlet
A new mechanism has been implemented that allows specialization of error messages for missing entities in a configurable run-time. Instead of just outputting the (sometimes obscure) name of the entity involved, a more meaningful message can be issued. This new mechanism is used for a case of rendez

[Ada] Short_Integer should be considered implementation defined

2014-10-17 Thread Arnaud Charlet
For the purposes of restriction No_Implementation_Identifiers, Standard.Short_Integer should be considered as being implementation defined and this was not the case. In addition, this patch fixes a compiler blow up with a compiler built with assertions in the test for implementation-defined identif

[Ada] Better error message for illegal iterator expression

2014-10-17 Thread Arnaud Charlet
This patch improves the error message on an iterator specification whose name is a function call that does not yield a type that implements an iterator interface. Compiling try_containers.adb must yield: try_containers.adb:17:18: expect object that implements iterator interface -- with Ada.Te

[Ada] Problems with type invariant aspects

2014-10-17 Thread Arnaud Charlet
This patch corrects various problems with the generation of checks for type invariants, when the type with an invariant is a discriminated type and the invariant refers to an array component constrained by discriminants. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-17 Ed Schonberg

[Ada] Directories are no longer created for abstract projects

2014-10-17 Thread Arnaud Charlet
Directories such as object directories are no longer created for abstract projects when the builder (gnatmake or gprbuild) is called with -P or with --subdirs=<...>, even when there is no explicit indication in the abstract project that there are no sources in the project. Tested on x86_64-pc-linu

[Ada] Internal clean up (use Is_Directory_Separator)

2014-10-17 Thread Arnaud Charlet
This is an internal clean up to use an existing abstraction more extensively. No external effect, no test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-17 Robert Dewar * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb, prj-conf.adb, prj-en

[Ada] Spurious output on optimized default-initialized limited aggregate

2014-10-20 Thread Arnaud Charlet
When expanding a limited aggregate into individual assignments, we create a transient scope if the type of a component requires it. This must not be done if the context is an initialization procedure, because the target of the assignment must be visible outside of the block, and stack cleanup will

[Ada] Aspect specifications and incomplete views

2014-10-20 Thread Arnaud Charlet
Typically an indexing aspect is specified on the private view of a tagged type. In the unusual case where there is an incomplete view and the aspect specification appears on the full view, the aspect specification must be analyzed on the full view rather than the incomplete one, to prevent freezing

[Ada] Lift limitation on inter-unit inlining of instantiated subprograms

2014-10-20 Thread Arnaud Charlet
This change makes it so that instantiations of generic subprograms marked as inline are considered for inter-unit inlining. This was not previously the case because of a technical limitation that was too broadly enforced (unlike the associated comment which was more accurate) and excluded instanti

[Ada] Implement pragma/aspect No_Tagged_Streams

2014-10-20 Thread Arnaud Charlet
The No_Tagged_Streams pragma (and aspect) provides a method for selectively inhibiting the generation of stream routines for tagged types. It can be used either in a form naming a specific tagged type, or in a sequence of declarations to apply to all subsequent declarations. The following tests sh

[Ada] Improve error recovery for bad comma/semicolon in expression

2014-10-20 Thread Arnaud Charlet
This patch improves the error recovery for an errant comma or semicolon after one condition in an expression when more conditions follow, as shown in this example: 1. procedure BadANDTHEN (X : Integer) is 2. begin 3.if X > 10 4. and then X mod 4 = 2;

[Ada] Improve recognition of misspelled aspects

2014-10-20 Thread Arnaud Charlet
As shown by this example, the recognition of misspelled aspects is improved: 1. package UnrecogAs with Prelaborate is | >>> "Prelaborate" is not a valid aspect identifier >>> possible misspelling of "Preelaborate" 2.type R is tagged nul

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