public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/114026] New: incorrect location during for loop type check
@ 2024-02-20 22:09 gaius at gcc dot gnu.org
  2024-02-20 22:09 ` [Bug modula2/114026] " gaius at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-02-20 22:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114026
           Summary: incorrect location during for loop type check
           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: ---

If a for loop has a type expression incompatibility it uses an incorrect
location (0).  For example:

$ cat forloop.mod
MODULE forloop ;


PROCEDURE init ;
VAR
   i: INTEGER ;
   c: CARDINAL ;
BEGIN
   c := 10 ;
   FOR i := 0 TO c DO   (* INTEGER CARDINAL expression incompatible.  *)
   END
END init ;


BEGIN
   init
END forloop.

$ gm2 forloop.mod 
/home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/Indexing.mod: In
function ‘init’:
/home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/Indexing.mod:346:1:
error: In procedure ‘init’: type incompatibility between ‘INTEGER’ and
‘CARDINAL’

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

end of thread, other threads:[~2024-02-27 15:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20 22:09 [Bug modula2/114026] New: incorrect location during for loop type check gaius at gcc dot gnu.org
2024-02-20 22:09 ` [Bug modula2/114026] " gaius at gcc dot gnu.org
2024-02-21  1:46 ` gaius at gcc dot gnu.org
2024-02-21 16:21 ` cvs-commit at gcc dot gnu.org
2024-02-21 16:29 ` gaius at gcc dot gnu.org
2024-02-22 22:35 ` ro at gcc dot gnu.org
2024-02-27 15:26 ` 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).