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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [null-pointer-1.c] - Rev 298

Compare with Previous | Blame | View Log

/* PR c/13382 */
/* Origin: Richard Hutchinson <richard.hutchinson@asa.co.uk> */
 
/* Verify that the null initializer is converted to the right
   pointer type.  */
 
/* { dg-do compile } */
/* { dg-options "-O" } */
 
struct t
{
  int aMember;
};
 
struct t *const aPointer = 0;
 
void foo()
{
  int anInt = (aPointer == 0) ? 0 : aPointer->aMember;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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