]> git.ipfire.org Git - thirdparty/gcc.git/commit
Bugfix for tiny modules importing from definition for "C".
authorGaius Mulley <gaiusmod2@gmail.com>
Tue, 15 Nov 2022 14:11:04 +0000 (14:11 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Tue, 15 Nov 2022 14:11:04 +0000 (14:11 +0000)
commit0c1fe5e2aad3fedcd7b7543b51361fa1c85cd050
tree321e9451ceed32f95a2dfbc5917aad05449b75dd
parentd1eed6043121a0f546b60b89b8d508c3f1adb0ac
Bugfix for tiny modules importing from definition for "C".

If a tiny application module imports only from a definition for "C"
the import graph will not join with the core modula-2 libraries.
Thus if a range exception were to occur in the application the
libraries might be uninitialized.  This patch forces the application
module to be initialized last.

gcc/m2/ChangeLog:

* gm2-libs/M2Dependent.mod (DisplayModuleInfo): Use variable count
to display entry number.  (CheckApplication) Check that the
application is the last entry in the list and move the list head
if appropriate.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-libs/M2Dependent.mod