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: Tue, 29 Nov 2022 15:10:10 +0000 (GMT) [thread overview] Message-ID: <20221129151010.71F533858C2C@sourceware.org> (raw) https://gcc.gnu.org/g:918e3a0d1fb7dce3088cb291605e56eb7624c9cd commit 918e3a0d1fb7dce3088cb291605e56eb7624c9cd Author: Gaius Mulley <gaiusmod2@gmail.com> Date: Tue Nov 29 14:54:09 2022 +0000 New regression tests added. gcc/testsuite/gm2/ChangeLog: * iso/fail/constarray.mod: New file. * iso/fail/constarray2.mod: New file. * iso/fail/constrecord.mod: New file. * iso/fail/constrecord2.mod: New file. * iso/fail/constrecord3.mod: New file. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com> Diff: --- gcc/testsuite/gm2/iso/fail/constarray.mod | 11 +++++++++++ gcc/testsuite/gm2/iso/fail/constarray2.mod | 11 +++++++++++ gcc/testsuite/gm2/iso/fail/constrecord.mod | 13 +++++++++++++ gcc/testsuite/gm2/iso/fail/constrecord2.mod | 13 +++++++++++++ gcc/testsuite/gm2/iso/fail/constrecord3.mod | 15 +++++++++++++++ 5 files changed, 63 insertions(+) diff --git a/gcc/testsuite/gm2/iso/fail/constarray.mod b/gcc/testsuite/gm2/iso/fail/constarray.mod new file mode 100644 index 00000000000..71f0804a099 --- /dev/null +++ b/gcc/testsuite/gm2/iso/fail/constarray.mod @@ -0,0 +1,11 @@ +MODULE constarray ; + +TYPE + VEC = ARRAY [0..2] OF REAL; + +CONST + VecConst = VEC {1.0, 2.0, 3.0}; + +BEGIN + VecConst[1] := 1.0 +END constarray. diff --git a/gcc/testsuite/gm2/iso/fail/constarray2.mod b/gcc/testsuite/gm2/iso/fail/constarray2.mod new file mode 100644 index 00000000000..590cd57e617 --- /dev/null +++ b/gcc/testsuite/gm2/iso/fail/constarray2.mod @@ -0,0 +1,11 @@ +MODULE constarray2 ; + +TYPE + VEC = ARRAY [0..2] OF REAL; + +CONST + VecConst = VEC {1.0, 2.0, 3.0}; + +BEGIN + VecConst := VEC {2.0, 3.0, 4.0} +END constarray2. diff --git a/gcc/testsuite/gm2/iso/fail/constrecord.mod b/gcc/testsuite/gm2/iso/fail/constrecord.mod new file mode 100644 index 00000000000..8019b3f2ce7 --- /dev/null +++ b/gcc/testsuite/gm2/iso/fail/constrecord.mod @@ -0,0 +1,13 @@ +MODULE constrecord ; (*!m2iso*) + +TYPE + VEC = RECORD + x, y, z: REAL ; + END ; + +CONST + VecConst = VEC {1.0, 2.0, 3.0} ; + +BEGIN + VecConst.y := 1.0 +END constrecord. diff --git a/gcc/testsuite/gm2/iso/fail/constrecord2.mod b/gcc/testsuite/gm2/iso/fail/constrecord2.mod new file mode 100644 index 00000000000..78b3f263b9b --- /dev/null +++ b/gcc/testsuite/gm2/iso/fail/constrecord2.mod @@ -0,0 +1,13 @@ +MODULE constrecord2 ; (*!m2iso*) + +TYPE + VEC = RECORD + x, y, z: REAL ; + END ; + +CONST + VecConst = VEC {1.0, 2.0, 3.0} ; + +BEGIN + VecConst := VEC {2.0, 3.0, 4.0} +END constrecord2. diff --git a/gcc/testsuite/gm2/iso/fail/constrecord3.mod b/gcc/testsuite/gm2/iso/fail/constrecord3.mod new file mode 100644 index 00000000000..654c6ed2ae4 --- /dev/null +++ b/gcc/testsuite/gm2/iso/fail/constrecord3.mod @@ -0,0 +1,15 @@ +MODULE constrecord3 ; (*!m2iso*) + +TYPE + VEC = RECORD + x, y, z: REAL ; + END ; + +CONST + VecConst = VEC {1.0, 2.0, 3.0} ; + +BEGIN + WITH VecConst DO + y := 1.0 + END +END constrecord3.
next reply other threads:[~2022-11-29 15:10 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-29 15:10 Gaius Mulley [this message] -- strict thread matches above, loose matches on Subject: below -- 2022-11-09 14:13 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=20221129151010.71F533858C2C@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: linkBe 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).