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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr21407.C] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
/* { dg-do run } */
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2" } */
extern "C" void abort(void);
extern "C" void abort(void);
struct T1 {int a, b; virtual void f(){}};
struct T1 {int a, b; virtual void f(){}};
struct T : T1 { struct T1 w;  int b; };
struct T : T1 { struct T1 w;  int b; };
void foo (struct T1 *p) { struct T *q = dynamic_cast(p); if (q->b != 2) abort (); }
void foo (struct T1 *p) { struct T *q = dynamic_cast(p); if (q->b != 2) abort (); }
/* We shouldn't kill the store to c.b, because foo uses it.  */
/* We shouldn't kill the store to c.b, because foo uses it.  */
int main () { struct T c; c.b = 2; foo (&c); return 0; }
int main () { struct T c; c.b = 2; foo (&c); return 0; }
 
 

powered by: WebSVN 2.1.0

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