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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [null-pointer-1.c] - Rev 801

Go to most recent revision | 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;
}
 

Go to most recent revision | 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.