From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d15a4f8fdf13426b X-Google-Attributes: gid103376,public From: hainque@news.enst.fr (Olivier Hainque) Subject: Problem with GNAT 3.09 and gnatbind -n Date: 1997/02/28 Message-ID: <5f6nia$7tt@enst.enst.fr>#1/1 X-Deja-AN: 222073722 Organization: Ecole Nationale Superieure des Telecommunications, Paris France Newsgroups: comp.lang.ada Date: 1997-02-28T00:00:00+00:00 List-Id: 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