public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: <guerby@acm.org>
To: schwab@suse.de
Cc: gcc@gcc.gnu.org
Subject: Re: New Ada build problem on ia64
Date: Thu, 22 Nov 2001 00:18:00 -0000	[thread overview]
Message-ID: <200111292243.fATMhlF00491@ulmo.localdomain> (raw)
In-Reply-To: <jer8qhuskq.fsf@sykes.suse.de> (message from Andreas Schwab on 29 Nov 2001 23:21:09 +0100)

> The problem reappeared with the stage2 compiler, so it seems like it got
> miscompiled by the stage1 compiler.

If you have an IA32 to IA64 compiler able to produce IA64 executables
from Ada sources, may be it would be better to start by compiling
simple Ada programs (at least simpler than the whole Ada compiler :)
to check if they work. I attached a standalone Ada program to start
with, if you're able to make this work, then I can feed you with more
tests (tomorrow Paris time, need to sleep right now :).

I have included a C wrapper if you have problem binding and/or linking
Ada with the cross tools.

-- 
Laurent Guerby <guerby@acm.org>

$ cat t1c.c
extern void _ada_t1 (void);
int main (void) {
  _ada_t1 ();
  return 0;
}

$ cat t1.adb
procedure T1 is
   type AC is access all Character;
   type Str is array (Positive range <>) of aliased Character;

   procedure P (X : in AC);
   pragma Import (C, P, "printf");

   LF : constant Character := Character'Val (10);
   Z : constant Character := Character'Val (0);
   S1 : aliased Str := "Hello" & LF & Z;
   S2 : aliased Str := "Loop" & LF & Z;
begin
   P (S1 (1)'Access);

   for I in 1 .. 2 loop
      P (S2 (1)'Access);
   end loop;
end T1;

$ gcc -c t1.adb
$ gcc -o t1 t1c.c t1.o
$ ./t1
Hello
Loop
Loop
$ 

WARNING: multiple messages have this Message-ID
From: <guerby@acm.org>
To: schwab@suse.de
Cc: gcc@gcc.gnu.org
Subject: Re: New Ada build problem on ia64
Date: Thu, 29 Nov 2001 14:49:00 -0000	[thread overview]
Message-ID: <200111292243.fATMhlF00491@ulmo.localdomain> (raw)
Message-ID: <20011129144900.qYQz0a7xnD8PMZUDELeQjdt3sYxvd4lWOn3owIL4ehM@z> (raw)
In-Reply-To: <jer8qhuskq.fsf@sykes.suse.de>

> The problem reappeared with the stage2 compiler, so it seems like it got
> miscompiled by the stage1 compiler.

If you have an IA32 to IA64 compiler able to produce IA64 executables
from Ada sources, may be it would be better to start by compiling
simple Ada programs (at least simpler than the whole Ada compiler :)
to check if they work. I attached a standalone Ada program to start
with, if you're able to make this work, then I can feed you with more
tests (tomorrow Paris time, need to sleep right now :).

I have included a C wrapper if you have problem binding and/or linking
Ada with the cross tools.

-- 
Laurent Guerby <guerby@acm.org>

$ cat t1c.c
extern void _ada_t1 (void);
int main (void) {
  _ada_t1 ();
  return 0;
}

$ cat t1.adb
procedure T1 is
   type AC is access all Character;
   type Str is array (Positive range <>) of aliased Character;

   procedure P (X : in AC);
   pragma Import (C, P, "printf");

   LF : constant Character := Character'Val (10);
   Z : constant Character := Character'Val (0);
   S1 : aliased Str := "Hello" & LF & Z;
   S2 : aliased Str := "Loop" & LF & Z;
begin
   P (S1 (1)'Access);

   for I in 1 .. 2 loop
      P (S2 (1)'Access);
   end loop;
end T1;

$ gcc -c t1.adb
$ gcc -o t1 t1c.c t1.o
$ ./t1
Hello
Loop
Loop
$ 

  reply	other threads:[~2001-11-29 22:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-21 14:56 Andreas Schwab
2001-11-21 15:29 ` Andreas Schwab
2001-11-22  0:11   ` Andreas Schwab
2001-11-22  0:18     ` guerby [this message]
2001-11-22  0:35       ` Andreas Schwab
2001-11-29 15:01         ` Andreas Schwab
2001-11-29 14:49       ` guerby
2001-11-29 14:21     ` Andreas Schwab
2001-11-29  8:27   ` Andreas Schwab
2001-11-29  7:11 ` Andreas Schwab

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=200111292243.fATMhlF00491@ulmo.localdomain \
    --to=guerby@acm.org \
    --cc=gcc@gcc.gnu.org \
    --cc=schwab@suse.de \
    /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).