1*c85f09ccSJohn Levon extern int a;
2*c85f09ccSJohn Levon 
3*c85f09ccSJohn Levon int a = __INT_MAX__ * 2;
4*c85f09ccSJohn Levon 
foo(void)5*c85f09ccSJohn Levon int foo(void)
6*c85f09ccSJohn Levon {
7*c85f09ccSJohn Levon 	return __INT_MAX__ * 2;
8*c85f09ccSJohn Levon }
9*c85f09ccSJohn Levon 
10*c85f09ccSJohn Levon /*
11*c85f09ccSJohn Levon  * check-name: overflow
12*c85f09ccSJohn Levon  * check-command: sparse -Wno-decl $file
13*c85f09ccSJohn Levon  *
14*c85f09ccSJohn Levon  * check-known-to-fail
15*c85f09ccSJohn Levon  * check-error-start
16*c85f09ccSJohn Levon bug-overflow.c:3:21: warning: integer overflow in expression
17*c85f09ccSJohn Levon bug-overflow.c:7:28: warning: integer overflow in expression
18*c85f09ccSJohn Levon  * check-error-end
19*c85f09ccSJohn Levon  */
20