/in/foo.c: In function 'main':
/in/foo.c:9:14: warning: iteration 8 invokes undefined behavior [-Waggressive-loop-optimizations]
s=s+a[i]*(i+1);
~^~~
/in/foo.c:8:5: note: within this loop
for(i=0;i<9;i++)
^~~
/in/foo.c:16:13: warning: array subscript is above array bounds [-Warray-bounds]
printf("%d-%d%d%d-%d%d%d%d%d-X",a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.c:23:13: warning: array subscript is above array bounds [-Warray-bounds]
printf("%d-%d%d%d-%d%d%d%d%d-%d",a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~