public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/115536] New: Expression is evaluated incorrectly when encountering relops and indirection
@ 2024-06-18 10:22 gaius at gcc dot gnu.org
  2024-06-18 10:31 ` [Bug modula2/115536] " gaius at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-06-18 10:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115536
           Summary: Expression is evaluated incorrectly when encountering
                    relops and indirection
           Product: gcc
           Version: 15.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: ---

The following code fails with:

$ gm2 -g testcond2.mod
$ ./a.out
failed

MODULE condtest2 ;

FROM libc IMPORT printf, exit ;


PROCEDURE test (VAR a, b, c, d: CARDINAL) ;
BEGIN
   IF (a = b) # (c = d)
   THEN
      printf ("passed\n")
   ELSE
      printf ("failed\n") ;
      exit (1)
   END
END test ;


VAR
   e, f, g, h: CARDINAL ;
BEGIN
   e := 1 ;
   f := 2 ;
   g := 3 ;
   h := 3 ;
   test (e, f, g, h)
END condtest2.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-25 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-18 10:22 [Bug modula2/115536] New: Expression is evaluated incorrectly when encountering relops and indirection gaius at gcc dot gnu.org
2024-06-18 10:31 ` [Bug modula2/115536] " gaius at gcc dot gnu.org
2024-06-22 17:52 ` gaius at gcc dot gnu.org
2024-06-25 17:35 ` cvs-commit at gcc dot gnu.org
2024-06-25 17:37 ` gaius at gcc dot gnu.org

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).