1 /*
2  * Sparse used to get this wrong.
3  *
4  * When evaluating the argument to the inline function for the array, Sparse
5  * didn't properly demote the "char []" to a "char *", but instead it would
6  * follow the dereference and get a "struct hello".
7  *
8  * Which made no sense at all.
9  */
10 
deref(const char * s)11 static inline int deref(const char *s)
12 {
13 	return *s;
14 }
15 
16 struct hello {
17 	char array[10];
18 };
19 
test(struct hello * arg)20 static int test(struct hello *arg)
21 {
22 	return deref(arg->array);
23 }
24 
25 /*
26  * check-name: "char []" to "char *" demotion
27  */
28