public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Gaius Mulley <gaius@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/modula-2] New regression tests added.
Date: Wed,  9 Nov 2022 14:13:58 +0000 (GMT)	[thread overview]
Message-ID: <20221109141358.907293858D1E@sourceware.org> (raw)

https://gcc.gnu.org/g:b7bbab2f69e50bb3bbb52016aea562a766e2c9c6

commit b7bbab2f69e50bb3bbb52016aea562a766e2c9c6
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Wed Nov 9 14:09:08 2022 +0000

    New regression tests added.
    
    New test to check INTEGER CARDINAL comparisions are caught.  New test
    to check missing actual parameters for intrinsic procedure functions
    are also caught.
    
    gcc/testsuite/gm2/ChangeLog:
    
            * gm2/errors/fail/badhigh.mod: New file.
            * gm2/errors/fail/badexpr.mod: New file.
    
    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

Diff:
---
 gcc/testsuite/gm2/errors/fail/badexpr.mod | 13 +++++++++++++
 gcc/testsuite/gm2/errors/fail/badhigh.mod |  9 +++++++++
 2 files changed, 22 insertions(+)

diff --git a/gcc/testsuite/gm2/errors/fail/badexpr.mod b/gcc/testsuite/gm2/errors/fail/badexpr.mod
new file mode 100644
index 00000000000..3e5d3ce9106
--- /dev/null
+++ b/gcc/testsuite/gm2/errors/fail/badexpr.mod
@@ -0,0 +1,13 @@
+MODULE badexpr ;
+
+FROM SYSTEM IMPORT ADDRESS ;
+
+VAR
+    i: CARDINAL;
+    a: ADDRESS ;
+BEGIN
+    a := NIL;
+    WHILE i < a DO
+        INC (i)
+    END;
+END badexpr.
diff --git a/gcc/testsuite/gm2/errors/fail/badhigh.mod b/gcc/testsuite/gm2/errors/fail/badhigh.mod
new file mode 100644
index 00000000000..44ba128bc05
--- /dev/null
+++ b/gcc/testsuite/gm2/errors/fail/badhigh.mod
@@ -0,0 +1,9 @@
+MODULE badhigh;
+VAR
+    i, high : CARDINAL;
+BEGIN
+    high := 10;
+    WHILE i < HIGH DO
+        INC(i);
+    END;
+END badhigh.
\ No newline at end of file

             reply	other threads:[~2022-11-09 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 14:13 Gaius Mulley [this message]
2022-11-29 15:10 Gaius Mulley

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=20221109141358.907293858D1E@sourceware.org \
    --to=gaius@gcc.gnu.org \
    --cc=gcc-cvs@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).