1*1f5207b7SJohn Levon extern const int *p; 2*1f5207b7SJohn Levon extern volatile void *q; 3*1f5207b7SJohn Levon extern volatile int *r; f(void)4*1f5207b7SJohn Levonstatic void f(void) 5*1f5207b7SJohn Levon { 6*1f5207b7SJohn Levon q = 1 ? p : q; // warn: const volatile void * -> const int * 7*1f5207b7SJohn Levon r = 1 ? r : q; // OK: volatile void * -> volatile int * 8*1f5207b7SJohn Levon r = 1 ? r : p; // warn: const volatile int * -> volatile int * 9*1f5207b7SJohn Levon } 10*1f5207b7SJohn Levon /* 11*1f5207b7SJohn Levon * check-name: type of conditional expression 12*1f5207b7SJohn Levon * check-description: Used to miss qualifier mixing and mishandle void * 13*1f5207b7SJohn Levon * 14*1f5207b7SJohn Levon * check-error-start 15*1f5207b7SJohn Levon cond_expr2.c:6:11: warning: incorrect type in assignment (different modifiers) 16*1f5207b7SJohn Levon cond_expr2.c:6:11: expected void volatile *extern [addressable] [toplevel] q 17*1f5207b7SJohn Levon cond_expr2.c:6:11: got void const volatile * 18*1f5207b7SJohn Levon cond_expr2.c:8:11: warning: incorrect type in assignment (different modifiers) 19*1f5207b7SJohn Levon cond_expr2.c:8:11: expected int volatile *extern [addressable] [toplevel] [assigned] r 20*1f5207b7SJohn Levon cond_expr2.c:8:11: got int const volatile * 21*1f5207b7SJohn Levon * check-error-end 22*1f5207b7SJohn Levon */ 23