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 718
Go to most recent revision | 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;
}
}
Go to most recent revision | Compare with Previous | Blame | View Log