modernc.org/cc@v1.0.1/v2/testdata/bug/4.c (about)

     1  struct s {
     2  	int i;
     3  } x;
     4  
     5  int foo(struct s *p) {
     6  	return p->i;
     7  }
     8  
     9  int foo2(struct s *p) {
    10  	return (*p).i;
    11  }
    12  
    13  int main() {
    14  	x.i = 42;
    15  	if (foo(&x) != 42) {
    16  		abort();
    17  	}
    18  	if (foo2(&x) != 42) {
    19  		abort();
    20  	}
    21  }