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] - Blame information for rev 751

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile { target x86_64-*-* } }
2
// { dg-options "-fschedule-insns2 -fsel-sched-pipelining -fselective-scheduling2 -fno-exceptions -O" }
3
 
4
struct QBasicAtomicInt
5
{
6
  int i, j;
7
  bool deref ()
8
  {
9
    asm volatile ("":"=m" (i), "=qm" (j));
10
  }
11
};
12
 
13
struct Data
14
{
15
  QBasicAtomicInt ref;
16
  void *data;
17
};
18
 
19
struct QByteArray
20
{
21
  Data * d;
22
  ~QByteArray ()
23
  {
24
    d->ref.deref ();
25
  }
26
};
27
 
28
int indexOf (unsigned);
29
int stat (void *, int *);
30
QByteArray encodeName ();
31
 
32
bool makeDir (unsigned len)
33
{
34
  unsigned i = 0;
35
  while (len)
36
    {
37
      int st;
38
      int pos = indexOf (i);
39
      QByteArray baseEncoded = encodeName ();
40
      if (stat (baseEncoded.d->data, &st) && stat (baseEncoded.d, &st))
41
        return false;
42
      i = pos;
43
    }
44
}

powered by: WebSVN 2.1.0

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