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