2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / c90-const-expr-4.c
blob6a449870ed3f8b430ef85e7f23a87a5272b320e3
1 /* Test for constant expressions: const variable with value 0 is not a
2 null pointer constant so the conditional expression should have
3 type void * and the assignment is OK. */
4 /* Origin: Joseph Myers <joseph@codesourcery.com> */
5 /* { dg-do compile } */
6 /* { dg-options "-std=iso9899:1990 -O2" } */
7 int *p;
8 long *q;
9 static void *const n = 0;
10 int j;
11 void f(void) { q = j ? p : n; }