Laurent GUERBY wrote:
However I see no reason why Osint body elaboration must be done before Osint.M body elaboration, it seems to me that the binder could perfectly choose to elaborate Osint.M body before Osint body, and this would leave Running_Program with the "wrong" value Rainer observes when gnatmake is running.
Sorry I don't get this. There is an elaboration call from the package body of Osint.M to a subprogram declared in the body of Osint. That means that the body of Osint has to be elaborated before the body of Osint.M. That is what the static model of elaboration is all about, ensuring such conditions are met. Note that it is quite wrong to try to compile GNAT with the dynamic model of elaboration.
If I'm guessing correctly there are two solutions:
No problem in the sources, so no solution needed. If you are managing to see a problem, this is not the source. You can of course check the order of elaboration by looking at it. I would be surprised if there were a bug in the statid elab model for such a simple case, and indeed the elab order is certainly right in my builds.