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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr26757.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// PR c++/26757
// PR c++/26757
// { dg-do run }
// { dg-do run }
// { dg-options "-O" }
// { dg-options "-O" }
extern "C" void abort ();
extern "C" void abort ();
typedef struct A
typedef struct A
{
{
  int c;
  int c;
  int d;
  int d;
} A;
} A;
A *b;
A *b;
void
void
foo ()
foo ()
{
{
  b->c++;
  b->c++;
  extern A *b;
  extern A *b;
  b->d++;
  b->d++;
}
}
void
void
bar ()
bar ()
{
{
  if (b->d)
  if (b->d)
    b->c++;
    b->c++;
}
}
int
int
main ()
main ()
{
{
  A a = { 0, 0 };
  A a = { 0, 0 };
  b = &a;
  b = &a;
  foo ();
  foo ();
  bar ();
  bar ();
  if (b->c != 2)
  if (b->c != 2)
    abort ();
    abort ();
  if (b->d != 1)
  if (b->d != 1)
    abort ();
    abort ();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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