1 extern int i; 2 foo(void)3int foo(void) 4 { 5 return *i; 6 } 7 bar(void)8int bar(void) 9 { 10 return i[0]; 11 } 12 qux(void)13int *qux(void) 14 { 15 return &i[0]; 16 } 17 18 /* 19 * check-name: premature-examination 20 * check-command: sparse -Wno-decl $file 21 * 22 * check-error-start 23 eval/premature-examination.c:5:16: error: cannot dereference this type 24 eval/premature-examination.c:10:17: error: cannot dereference this type 25 eval/premature-examination.c:15:18: error: cannot dereference this type 26 * check-error-end 27 */ 28