Debian Codegraph @

gcc/testsuite/gm2/errors/fail/badsubexpradr.mod

raw
1 (* Copyright (C) 2020 Free Software Foundation, Inc.
2 Contributed by Gaius Mulley <[email protected]>.
3
4 This file is part of GNU Modula-2.
5
6 GNU Modula-2 is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
10
11 GNU Modula-2 is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Modula-2; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. *)
19
20 MODULE badsubexpradr ;
21
22 FROM SYSTEM IMPORT ADR, ADDRESS ;
23
24 VAR
25 a: ADDRESS ;
26 c: CHAR ;
27 BEGIN
28 (* should generate a subexpression error with the call to ADR. *)
29 a := ADR (c) + c ;
30 END badsubexpradr.