public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Laurent Guerby <guerby@acm.org>
To: gcc@gcc.gnu.org
Subject: Ada and NTPL
Date: Thu, 24 Apr 2003 11:24:00 -0000	[thread overview]
Message-ID: <1051168338.26580.42.camel@localhost.localdomain> (raw)

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>

             reply	other threads:[~2003-04-24  7:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-24 11:24 Laurent Guerby [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1051168338.26580.42.camel@localhost.localdomain \
    --to=guerby@acm.org \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).