blob: 314904bbd06e138d66b0a965daf808c30dbf274b (
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
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96301
// { dg-additional-options "-fPIC" { target fpic } }
// { dg-do compile }
struct Type
{
size_t length;
int* ptr;
}
class Container
{
Type children;
void remove(void* data)
{
Type remove(Type range)
{
auto result = range;
if (result.front)
return result;
assert(0);
}
if (data)
remove(children);
}
}
int front(Type a)
{
return a.ptr[0];
}
|