* Compilation halts on GNAT 3-13p, RedHat6.2 Linux
@ 2001-08-20 16:10 Frank
2001-08-20 21:01 ` Mark Johnson
0 siblings, 1 reply; 4+ messages in thread
From: Frank @ 2001-08-20 16:10 UTC (permalink / raw)
Hi!
The following code causes my compilation to halt (possibly loop forever).
It's beyond doubt that there are errors in the code, but the compilator
doesn't output anything.
My GNAT/gtk is recompiled with s-stratt.ad? for GLADE.
Could there be someone that could try to compile this on a un-GLADE GNAT
3-13p installation,
and give me the result? Please also note which parameters you succeded with
.
I have tried:
gnatgcc -c -O2 pa_tennis_engine.adb
and without options at all.
Frank
----------------------------------------------------------------------------
------------------------------------
package PA_TENNIS_ENGINE is
pragma Remote_Call_Interface;
type TYPE_GET_RACKET is access procedure (P_POS : out
PA_POSITION.TYPE_POSITION);
type TYPE_MOVE_MY_RACKET is access procedure (P_POS : in
PA_POSITION.TYPE_POSITION);
procedure REGISTER (P_REQUESTORS_MOVE_RACKET : out TYPE_MOVE_MY_RACKET;
P_REQUESTORS_GET_RACKET : out TYPE_GET_RACKET;
P_OPPONENTS_GET_RACKET : out TYPE_GET_RACKET);
end PA_TENNIS_ENGINE;
----------------------------------------------------------------------------
------------------------------------
with TEXT_IO;
package body PA_TENNIS_ENGINE is
procedure REGISTER (P_REQUESTORS_MOVE_RACKET : out TYPE_MOVE_MY_RACKET;
P_REQUESTORS_GET_RACKET : out TYPE_GET_RACKET;
P_OPPONENTS_GET_RACKET : out TYPE_GET_RACKET)
is
begin
P_OPPONENTS_GET_RACKET := GET_L_RACKET'Access;
end REGISTER;
end PA_TENNIS_ENGINE;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compilation halts on GNAT 3-13p, RedHat6.2 Linux
2001-08-20 16:10 Compilation halts on GNAT 3-13p, RedHat6.2 Linux Frank
@ 2001-08-20 21:01 ` Mark Johnson
2001-08-20 21:23 ` Frank
2001-08-21 14:46 ` Frank
0 siblings, 2 replies; 4+ messages in thread
From: Mark Johnson @ 2001-08-20 21:01 UTC (permalink / raw)
Frank wrote:
> Hi!
>
> The following code causes my compilation to halt (possibly loop forever).
> It's beyond doubt that there are errors in the code, but the compilator
> doesn't output anything.
> My GNAT/gtk is recompiled with s-stratt.ad? for GLADE.
> Could there be someone that could try to compile this on a un-GLADE GNAT
> 3-13p installation,
> and give me the result? Please also note which parameters you succeded with
> .
Hmm. Very odd. GNAT 3.15w goes into an infinite loop with the code you
provided.
You can compile the spec w/o any problems [other than the obvious errors].
gcc -c -O2 pa_tennis_engine.ads
You can replace the assignment statement in the body w/ a null; & it compiles
[with errors].
gcc -c -O2 pa_tennis_engine.adb
pa_tennis_engine.ads:6:01: "PA_POSITION" is undefined (more references
follow)
If you generate a dummy procedure for Get_L_Racket such as...
procedure Get_L_Racket(P_Pos : out PA_POSITION.Type_Position) is
begin
null;
end;
you get the following error messages...
gcc -c -O2 pa_tennis_engine.adb
pa_tennis_engine.adb:20:45: prefix must statically denote a remote subprogram
pa_tennis_engine.adb:20:45: not subtype conformant with declaration at
unknown location
pa_tennis_engine.adb:20:45: functions can only match functions
pa_tennis_engine.ads:6:01: "PA_POSITION" is undefined (more references
follow)
Once you did that & then comment it out, you still get the same set of error
messages.
Again, very odd - obviously you are exercising a piece of code that doesn't get
tested very often :-).
Needless to say - the code is broke. I was looking through the ARM E.2.3 & it
looks like you are violating one of those restrictions. The errors above may
give you a hint as to which one is being violated.
--Mark
PS: The last one of these I noticed & forwarded to ACT, they had a fix quite
quickly. Of course, you need support to get the updated version in a timely
manner.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compilation halts on GNAT 3-13p, RedHat6.2 Linux
2001-08-20 21:01 ` Mark Johnson
@ 2001-08-20 21:23 ` Frank
2001-08-21 14:46 ` Frank
1 sibling, 0 replies; 4+ messages in thread
From: Frank @ 2001-08-20 21:23 UTC (permalink / raw)
Hi!
Have you installed Glade, and recompiled with s-stratt.ads/s-stratt.adb when
trying this?
Thank you for help,
Frank
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compilation halts on GNAT 3-13p, RedHat6.2 Linux
2001-08-20 21:01 ` Mark Johnson
2001-08-20 21:23 ` Frank
@ 2001-08-21 14:46 ` Frank
1 sibling, 0 replies; 4+ messages in thread
From: Frank @ 2001-08-21 14:46 UTC (permalink / raw)
Hi!
Inspired by your hacking, I hacked some more:-)
Regarding the result:
>
> If you generate a dummy procedure for Get_L_Racket such as...
> procedure Get_L_Racket(P_Pos : out PA_POSITION.Type_Position) is
> begin
> null;
> end;
> you get the following error messages...
> gcc -c -O2 pa_tennis_engine.adb
> pa_tennis_engine.adb:20:45: prefix must statically denote a remote
subprogram
>
> pa_tennis_engine.adb:20:45: not subtype conformant with declaration at
> unknown location
> pa_tennis_engine.adb:20:45: functions can only match functions
> pa_tennis_engine.ads:6:01: "PA_POSITION" is undefined (more references
> follow)
I managed to recreate this error also, when I declared the procedure in the
package body and _not_ declaring it in the package specification part.
If I declare it in the spec part, the error "prefix must statically denote a
remote subprogram" disappeared. It is in that way I have programmed it in my
original source code, this is just a lobotomized version of a program that I
am going to send to report@gnat.com to show them a easy example
of my problem.
>
> Once you did that & then comment it out, you still get the same set of
error
> messages.
>
I am not quite sure I understand this paragraph, are you saying that you
commented out a change in the source code, saved and the compilator still
reported the errors from the commented code???
Regarding:
>You can replace the assignment statement in the body w/ a null; & it
compiles
>[with errors].
> gcc -c -O2 pa_tennis_engine.adb
> pa_tennis_engine.ads:6:01: "PA_POSITION" is undefined (more references
>follow
I have recreated this situation, further:
My impression is that if I move the declaration of the dummy function
_above_ the procedure REGISTER the compilation-hang disappeares.
Or if there is a declaration of it in the spec part of the package the
problem disappeares.
Frank
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-08-21 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-20 16:10 Compilation halts on GNAT 3-13p, RedHat6.2 Linux Frank
2001-08-20 21:01 ` Mark Johnson
2001-08-20 21:23 ` Frank
2001-08-21 14:46 ` Frank
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox