OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [null-pointer-1.c] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR c/13382 */
2
/* Origin: Richard Hutchinson <richard.hutchinson@asa.co.uk> */
3
 
4
/* Verify that the null initializer is converted to the right
5
   pointer type.  */
6
 
7
/* { dg-do compile } */
8
/* { dg-options "-O" } */
9
 
10
struct t
11
{
12
  int aMember;
13
};
14
 
15
struct t *const aPointer = 0;
16
 
17
void foo()
18
{
19
  int anInt = (aPointer == 0) ? 0 : aPointer->aMember;
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.