* Ada and NTPL
@ 2003-04-24 11:24 Laurent Guerby
2003-04-24 11:39 ` Chris Proctor
2003-04-24 17:32 ` Geert Bosch
0 siblings, 2 replies; 5+ messages in thread
From: Laurent Guerby @ 2003-04-24 11:24 UTC (permalink / raw)
To: gcc
I did succeed at get tasking working on Red Hat 9 x86 and NTPL
using the ACT tree (HEAD + gcc-head as of 23Apr2003 around 20:00 GMT)
and GCC mainline. The resulting compiler gets much better results than
3.2 and results in line with the ACT 5.00 release
except for a miscompilation of a-calend.adb that gives 17 failures.
For the record here is a reduced test case:
with Ada.Calendar;
procedure P1 is
Some_Time : Ada.Calendar.Time;
begin
Some_Time := Ada.Calendar.Time_Of (Month => 9, Day => 16, Year => 1993);
end P1;
$ gnatmake p1
$ ./p1
raised CONSTRAINT_ERROR : a-calend.adb:418 explicit raise
$
The code failing in Ada.Calendar is:
if not Year 'Valid
or else not Month 'Valid
or else not Day 'Valid
or else not Seconds'Valid
then
raise Constraint_Error;
end if;
I did check the assembly.
The build process is as follows:
1/ replace gcc/ada in GCC by the sources from the ACT tree
2/ copy -f all files from the gcc-head ACT source tree into gcc/ada
3/ apply the following patch
Index: Make-lang.in
===================================================================
RCS file: /anoncvs/gnat/Make-lang.in,v
retrieving revision 1.131.2.10
diff -u -r1.131.2.10 Make-lang.in
--- Make-lang.in 21 Apr 2003 12:24:45 -0000 1.131.2.10
+++ Make-lang.in 23 Apr 2003 18:29:21 -0000
@@ -328,12 +328,12 @@
ADA_INCLUDES="-I- -Iada/ -I$(srcdir)/ada"\
CC="stage2/xgcc -Bstage2" STAGE_PREFIX=stage2/ gnattools1
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
- $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
+# $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
regnattools:
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
- $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
+# $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
# use host-gcc host-gnatmake host-gnatbind host-gnatlink
# put the host RTS dir first in the PATH to hide the default runtime
Index: Makefile.in
===================================================================
RCS file: /anoncvs/gnat/Makefile.in,v
retrieving revision 1.1679.2.8
diff -u -r1.1679.2.8 Makefile.in
--- Makefile.in 28 Mar 2003 10:13:17 -0000 1.1679.2.8
+++ Makefile.in 23 Apr 2003 18:29:25 -0000
@@ -1283,7 +1283,7 @@
include $(fsrcdir)/Makefile.rtl
-GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) g-trasym.o
+GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) g-trasym.o memtrack.o
# Files which are suitable in no run time/hi integrity mode
Index: 5iosinte.ads
===================================================================
RCS file: /anoncvs/gnat/5iosinte.ads,v
retrieving revision 1.31
diff -u -r1.31 5iosinte.ads
--- 5iosinte.ads 31 Oct 2002 15:44:58 -0000 1.31
+++ 5iosinte.ads 24 Apr 2003 06:58:55 -0000
@@ -507,9 +507,13 @@
end record;
pragma Convention (C, pthread_mutex_t);
+ type pthread_cond_padding_t is array (0 .. 35) of unsigned_char;
+ pragma Convention (C, pthread_cond_padding_t);
+
type pthread_cond_t is record
c_lock : struct_pthread_fast_lock;
c_waiting : System.Address;
+ c_padding : pthread_cond_padding_t;
end record;
pragma Convention (C, pthread_cond_t);
Then it should bootstrap without problem and run quite well on
http://perso.wanadoo.fr/guerby/ftp/acats4gnat-0.7.tgz
using "gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)"
as base compiler for C & Ada.
--
Laurent Guerby <guerby@acm.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ada and NTPL
2003-04-24 11:24 Ada and NTPL Laurent Guerby
@ 2003-04-24 11:39 ` Chris Proctor
2003-04-24 17:32 ` Geert Bosch
1 sibling, 0 replies; 5+ messages in thread
From: Chris Proctor @ 2003-04-24 11:39 UTC (permalink / raw)
To: gcc
On Thu, Apr 24, 2003 at 09:12:18AM +0200, Laurent Guerby wrote:
> I did succeed at get tasking working on Red Hat 9 x86 and NTPL
> using the ACT tree (HEAD + gcc-head as of 23Apr2003 around 20:00 GMT)
> and GCC mainline. The resulting compiler gets much better results than
> 3.2 and results in line with the ACT 5.00 release
> except for a miscompilation of a-calend.adb that gives 17 failures.
>
> For the record here is a reduced test case:
>
> with Ada.Calendar;
> procedure P1 is
> Some_Time : Ada.Calendar.Time;
> begin
> Some_Time := Ada.Calendar.Time_Of (Month => 9, Day => 16, Year => 1993);
> end P1;
> $ gnatmake p1
> $ ./p1
>
> raised CONSTRAINT_ERROR : a-calend.adb:418 explicit raise
> $
>
> The code failing in Ada.Calendar is:
>
> if not Year 'Valid
> or else not Month 'Valid
> or else not Day 'Valid
> or else not Seconds'Valid
> then
> raise Constraint_Error;
> end if;
>
> I did check the assembly.
>
The Seconds'Valid check is what failing.
This only miscompiles with optimisation and appears to be i386 only failure
(sparc-solaris works correctly).
This is failure is documented in ada/9536 and ada/9129 and
in message thread starting at
<http://gcc.gnu.org/ml/gcc/2002-12/msg00167.html>
The 'Valid check is optimized into False no matter what the actual
value of the parameter is.
Below is a more accurate test case:
--
-- Testcase for ada/9536, ada/9129
--
with Ada.Text_IO;
procedure Ada9536 is
type Day_Duration is new Duration range 0.0 .. 86400.0;
function Valid_Test (D : in Day_Duration) return Boolean is
begin
return D'Valid;
end Valid_Test;
begin
if Valid_Test (0.0) then
Ada.Text_IO.Put_Line ("PASSED");
else
Ada.Text_IO.Put_Line ("FAILED");
end if;
end Ada9536;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ada and NTPL
2003-04-24 11:24 Ada and NTPL Laurent Guerby
2003-04-24 11:39 ` Chris Proctor
@ 2003-04-24 17:32 ` Geert Bosch
1 sibling, 0 replies; 5+ messages in thread
From: Geert Bosch @ 2003-04-24 17:32 UTC (permalink / raw)
To: Laurent Guerby; +Cc: gcc
On Thursday, Apr 24, 2003, at 03:12 America/New_York, Laurent Guerby
wrote:
> I did succeed at get tasking working on Red Hat 9 x86 and NTPL
> using the ACT tree (HEAD + gcc-head as of 23Apr2003 around 20:00 GMT)
> and GCC mainline. The resulting compiler gets much better results than
> 3.2 and results in line with the ACT 5.00 release
> except for a miscompilation of a-calend.adb that gives 17 failures.
>
> For the record here is a reduced test case:
>
> with Ada.Calendar;
> procedure P1 is
> Some_Time : Ada.Calendar.Time;
> begin
> Some_Time := Ada.Calendar.Time_Of (Month => 9, Day => 16, Year =>
> 1993);
> end P1;
> $ gnatmake p1
> $ ./p1
>
> raised CONSTRAINT_ERROR : a-calend.adb:418 explicit raise
> $
>
> The code failing in Ada.Calendar is:
>
> if not Year 'Valid
> or else not Month 'Valid
> or else not Day 'Valid
> or else not Seconds'Valid
> then
> raise Constraint_Error;
> end if;
>
There is already a GNATS bug filed for this. I looked at it and
this is a bug triggered by a change in the GCC back end and is not
related to front end changes. This is a regression compared to 3.2.
-Geert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ada and NTPL
@ 2003-04-25 12:47 Robert Dewar
0 siblings, 0 replies; 5+ messages in thread
From: Robert Dewar @ 2003-04-25 12:47 UTC (permalink / raw)
To: chrisp, kenner; +Cc: gcc
> Note that there are about a half dozen patches from GNAT's gcc-32.dif that
> are still to be applied to the GCC mainline. Hopefully one of them will
> solve this, but it'll probably be about a week before they all make it in
> since I'm out of town for a few days.
Note also that the file gcc-32.dif is accessible at the libre site
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ada and NTPL
@ 2003-04-24 14:44 Richard Kenner
0 siblings, 0 replies; 5+ messages in thread
From: Richard Kenner @ 2003-04-24 14:44 UTC (permalink / raw)
To: chrisp; +Cc: gcc
Note that there are about a half dozen patches from GNAT's gcc-32.dif that
are still to be applied to the GCC mainline. Hopefully one of them will
solve this, but it'll probably be about a week before they all make it in
since I'm out of town for a few days.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-04-25 12:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-24 11:24 Ada and NTPL Laurent Guerby
2003-04-24 11:39 ` Chris Proctor
2003-04-24 17:32 ` Geert Bosch
2003-04-24 14:44 Richard Kenner
2003-04-25 12:47 Robert Dewar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).