PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / null-pointer-1.c
blob8cc15c6d8662cd42d44e15699745ed6a726d9a2c
1 /* PR c/13382 */
2 /* Origin: Richard Hutchinson <richard.hutchinson@asa.co.uk> */
4 /* Verify that the null initializer is converted to the right
5 pointer type. */
7 /* { dg-do compile } */
8 /* { dg-options "-O" } */
10 struct t
12 int aMember;
15 struct t *const aPointer = 0;
17 void foo()
19 int anInt = (aPointer == 0) ? 0 : aPointer->aMember;