OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [complit12.C] - Diff between revs 301 and 384

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

Rev 301 Rev 384
// PR c++/40948
// PR c++/40948
// { dg-do run }
// { dg-do run }
// { dg-options "" }
// { dg-options "" }
int c;
int c;
struct M
struct M
{
{
  M () { ++c; }
  M () { ++c; }
  M (const M&) { ++c; }
  M (const M&) { ++c; }
  ~M () { --c; }
  ~M () { --c; }
};
};
struct S
struct S
{
{
  S ();
  S ();
  M m[1];
  M m[1];
};
};
S::S () : m ((M[1]) { M () })
S::S () : m ((M[1]) { M () })
{
{
}
}
struct T
struct T
{
{
  T ();
  T ();
  M m[4];
  M m[4];
};
};
T::T () : m ((M[4]) { M (), M (), M (), M () })
T::T () : m ((M[4]) { M (), M (), M (), M () })
{
{
}
}
typedef M MA[1];
typedef M MA[1];
MA &bar (MA, MA& r) { return r; }
MA &bar (MA, MA& r) { return r; }
M f(M m) { return m; }
M f(M m) { return m; }
int main ()
int main ()
{
{
  {
  {
    M m[1] = (M[1]) { M () };
    M m[1] = (M[1]) { M () };
    if (c != 1)
    if (c != 1)
      return 1;
      return 1;
    M n = (M) { M () };
    M n = (M) { M () };
    if (c != 2)
    if (c != 2)
      return 2;
      return 2;
    M o[4] = (M[4]) { M (), M (), M (), M () };
    M o[4] = (M[4]) { M (), M (), M (), M () };
    if (c != 6)
    if (c != 6)
      return 3;
      return 3;
    S s;
    S s;
    if (c != 7)
    if (c != 7)
      return 4;
      return 4;
    T t;
    T t;
    if (c != 11)
    if (c != 11)
      return 5;
      return 5;
    MA ma = bar ((M[2]) { M(), M() }, m);
    MA ma = bar ((M[2]) { M(), M() }, m);
    if (c != 12)
    if (c != 12)
      return 7;
      return 7;
    M mm[2] = ((M[2]) { f(M()), f(M()) });
    M mm[2] = ((M[2]) { f(M()), f(M()) });
    if (c != 14)
    if (c != 14)
      return 8;
      return 8;
  }
  }
  if (c != 0)
  if (c != 0)
    return 6;
    return 6;
}
}
 
 

powered by: WebSVN 2.1.0

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