aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/algol68/execute/selection-2.a68
blob: 0d7b6c6730b5c19f1d8a673d970ec5df8043686d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# { dg-options "-fstropping=upper" }  #
# Selecting a struct name results in sub-names.  #
BEGIN MODE PERSON = STRUCT (INT age, REAL income, INT num children);
      PERSON person;
      age OF person := 44;
      income OF person := 999.99;
      num children OF person := 0;
      ASSERT (age OF person = 44);
      ASSERT (num children OF person = 0);
      REF INT ptr to age := age OF person;
      ASSERT (ptr to age = 44);
      age OF person := 55;
      ASSERT (ptr to age = 55)
END