From: hainque@news.enst.fr (Olivier Hainque)
Subject: Problem with GNAT 3.09 and gnatbind -n
Date: 1997/02/28
Date: 1997-02-28T00:00:00+00:00 [thread overview]
Message-ID: <5f6nia$7tt@enst.enst.fr> (raw)
Hi there,
As I was doing some tests, I saw a strange think occurring while using
the different options of gnatbind 3.09 (sparc-solaris) :
In b_xxx.c, generated by gnatbind ...
If "-n" is used, __main_priority is defined as a function
Otherwise, it is defined as an integer.
I had a look at 7stasini.adb in the sources of the runtime library
and saw :
package System.Tasking.Initialization
...
begin
declare
Main_Priority : Priority;
pragma Import (C, Main_Priority, "__main_priority");
begin
Init_RTS (Main_Priority);
end;
end xxx;
Priority comes from the "System" package, where it is defined as a kind
of integer.
I looked around in the other files for the library and found nothing
else significant related to __main_priority. I also had a quick look
at the documentation and found no more information.
Anyway, I think that there could be a problem in the tasking initialization
when __main_priority is defined as a function, ie when the gnatbind is
invoqued with "-n".
I re-installed the whole thing, compiling the library files with "-gnata",
and tried a simple thing :
- provide a trivial ada "foo" routine calling delay(2.0);
- provide a "main" c routine calling ada_init(), the ada routine and then
adafinal().
- make a big adalib.a file with all the .o's of the runtime library to avoid
having to call gnatlink.
- compile :
gcc -c foo.adb main.c
gnatbind -n foo.ali -> generates b_foo.c, containing __main_priority as
a function
gcc -c b_foo.c
gcc -o foo b_foo.o foo.o main.o .../adalib.a -lthread -lposix4
- run :
foo
I got a somewhat non surprising result (IMHO) :
Failed Runtime Assertion : GNULLI failure---Set_Priority
I may make a huge mistake myself and just wanted to know if somebody had
more information about this.
Thanks in advance for any kind of help.
-- Olivier Hainque
--
E-mail: hainque@inf.enst.fr
P-mail: Telecom Paris
46, rue Barrault - 75634 Paris cedex 13
next reply other threads:[~1997-02-28 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-28 0:00 Olivier Hainque [this message]
1997-03-02 0:00 ` Problem with GNAT 3.09 and gnatbind -n Robert Dewar
-- strict thread matches above, loose matches on Subject: below --
1997-02-27 0:00 Olivier Hainque
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox