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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [vrp2.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* { 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.