Debian Codegraph @

gcc/testsuite/gm2/switches/uninit-variable-checking/fail/testrecinit2.mod

raw
1 MODULE testrecinit ;
2
3
4 TYPE
5 color = RECORD
6 r, g, b: CARDINAL ;
7 END ;
8
9 pixel = RECORD
10 fg, bg: color ;
11 END ;
12
13 PROCEDURE test ;
14 VAR
15 p: pixel ;
16 BEGIN
17 p.fg.r := 1 ;
18 IF p.fg.g = 6 (* should catch error. *)
19 THEN
20 END
21 END test ;
22
23 BEGIN
24 test
25 END testrecinit.