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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr46640.C] - Rev 693

Compare with Previous | Blame | View Log

// { dg-do compile { target x86_64-*-* } }
// { dg-options "-fschedule-insns2 -fsel-sched-pipelining -fselective-scheduling2 -fno-exceptions -O" }

struct QBasicAtomicInt
{
  int i, j;
  bool deref ()
  {
    asm volatile ("":"=m" (i), "=qm" (j));
  }
};

struct Data
{
  QBasicAtomicInt ref;
  void *data;
};

struct QByteArray
{
  Data * d;
  ~QByteArray ()
  {
    d->ref.deref ();
  }
};

int indexOf (unsigned);
int stat (void *, int *);
QByteArray encodeName ();

bool makeDir (unsigned len)
{
  unsigned i = 0;
  while (len)
    {
      int st;
      int pos = indexOf (i);
      QByteArray baseEncoded = encodeName ();
      if (stat (baseEncoded.d->data, &st) && stat (baseEncoded.d, &st))
        return false;
      i = pos;
    }
}

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.