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