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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [vrp2.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
 
4
/* VRP was miscompiling the following as it thought &a->b was a dereference
5
   and therfore a was non-null.
6
   Reduced from Mozilla by Serge Belyshev .  */
7
 
8
extern "C" void abort (void);
9
struct T { int i; } t;
10
struct A : T { int j; } *p = __null;
11
 
12
int main (void)
13
{
14
  if (p == &t)
15
    return 0;
16
  if (p)
17
    abort ();
18
  return 0;
19
}
20
 

powered by: WebSVN 2.1.0

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