This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New Ada build problem on ia64

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

$ 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;
   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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]