#include <perms.h>

//          Edinburgh IMP77 Compiler - Version 8.4
//
//     1  %recordformat Commfm(%integer i, j, k)

struct COMMFM {
  union {
    struct {
      int I;
      int J;
      int K;
    };
  };
};

//     2
//     3  %externalroutine PASS2(%record(Commfm)%name Interface)

void PASS2(struct COMMFM *INTERFACE) {
  //     4
  //     5     ! If the procedure below is removed, the Interface_k = 23 statement translates OK!
  //     6
  //     7     %routine Initialise

  void INITIALISE(void) {
    //     8     %end

    return;
  } /* end of INITIALISE */

  //     9
  //    10  !  This fails to translate - the field is not found. *BUT* ONLY IF icode2ast IS RUN WITHOUT "-d"!
  //    11
  //    12     Interface_k = 23;

  INTERFACE->K = 23;

  //    13
  //    14  %end

  return;
} /* end of PASS2 */

// ?INITIALISE unused
//    15
//    16  %endoffile