scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0050-inits.c (154B)


      1 int x = 10;
      2 
      3 struct S {int a; int *p;};
      4 struct S s = { .p = &x, .a = 1};
      5 
      6 int
      7 main()
      8 {
      9 	if(s.a != 1)
     10 		return 1;
     11 	if(*s.p != 10)
     12 		return 2;
     13 	return 0;
     14 }