public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gaius at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/114227] New: InstallTerminationProcedure does not work with -fiso
Date: Mon, 04 Mar 2024 12:06:49 +0000	[thread overview]
Message-ID: <bug-114227-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114227

            Bug ID: 114227
           Summary: InstallTerminationProcedure does not work with -fiso
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: gaius at gcc dot gnu.org
  Target Milestone: ---

Forwarded from the gm2 mailing list.  Given a program:

MODULE glibc_test2;

FROM IOChan IMPORT
  ChanId;
FROM StdChans IMPORT
  StdOutChan;
FROM TextIO IMPORT
  WriteLn, WriteString;

FROM M2RTS IMPORT
  InstallTerminationProcedure ;

VAR
  cid_out:                      ChanId;

PROCEDURE P1();
  BEGIN                         (* PROCEDURE P1 *)
    WriteString(cid_out, 'This is P1');
    WriteLn(cid_out);
  END P1;

PROCEDURE P2();
  BEGIN                         (* PROCEDURE P2 *)
    WriteString(cid_out, 'This is P2');
    WriteLn(cid_out);
  END P2;

BEGIN                           (* MODULE glibc_test *)
   cid_out:=StdOutChan();
   IF InstallTerminationProcedure (P2)
   THEN
      P1();
   END
END glibc_test2.


$ gm2 -fiso glibc_test2.mod
$ ./a.out 
This is P1

whereas if it is compiled and linked with:


$ gm2 glibc_test2.mod
$ ./a.out 
This is P1
This is P2

             reply	other threads:[~2024-03-04 12:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 12:06 gaius at gcc dot gnu.org [this message]
2024-03-04 12:16 ` [Bug modula2/114227] " gaius at gcc dot gnu.org
2024-03-04 21:44 ` gaius at gcc dot gnu.org
2024-03-04 21:47 ` cvs-commit at gcc dot gnu.org
2024-03-04 21:50 ` gaius at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114227-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).