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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [for1.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do assemble  }

int i;
int j;

struct S {
  int operator()(int)
    {
      i = 1;
      return i;
    }

  typedef int I;

  void f() {
    for (S I; false; )
      ;
    int k = I(3);
  }
};

typedef int J;

struct T {
  int operator()(int)
    {
      j = 1;
      return j;
    }

  void f() {
    for (T J; false; )
      ;
    int k = J(3);
  }
};

int main()
{
  S s;
  s.f();
  return 2 * i + j;
}

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.