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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr31081-2.C] - Blame information for rev 701

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
 
3
class CString
4
{
5
public:
6
    CString();
7
    ~CString() { operator delete(_rep); }
8
    operator const char*() const { return _rep; }
9
private:
10
    CString(char* cstr);
11
    char* _rep;
12
};
13
 
14
class String
15
{
16
public:
17
 
18
    String();
19
    String(const char* str);
20
    ~String();
21
    CString getCString() const;
22
};
23
 
24
int is_absolute_path(const char *path);
25
 
26
inline void getAbsolutePath(
27
    const char* path,
28
    const String& filename)
29
{
30
    (!is_absolute_path(filename.getCString()) && path);
31
    return;
32
}
33
 
34
int foo(int &value);
35
 
36
int main(int argc, char** argv)
37
{
38
    int repeatTestCount = 0;
39
    if (foo(repeatTestCount))
40
    {
41
        repeatTestCount = 1;
42
    }
43
    for (int numTests = 1; numTests <= repeatTestCount; numTests++)
44
    {
45
            getAbsolutePath("blah", "blah");
46
    }
47
    return 0;
48
}

powered by: WebSVN 2.1.0

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