view rectypeTest/instruct.cbc @ 5:90e6146d24cd

fix stack1.c
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Wed, 22 Oct 2014 19:02:57 +0900
parents bacef8675607
children
line wrap: on
line source

#include <stdlib.h>

// miss
struct interface {
  __rectype *next;
};

__code print(struct interface p) {
  puts("print");
  exit(0);
}

__code csA(struct interface p) {
  struct interface ds;
  ds.next = csA;
  goto p.next(ds);
}

void main1() {
  struct interface ds;
  ds.next = print;
  goto csA(ds);
}

int main() {
  main1();
  return 0;
}