☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wreturn-local-addr-4.C
☽
☼
gcc/testsuite/g++.dg/warn/Wreturn-local-addr-4.C
code
plain
raw
1
// PR c++/82600
2
// { dg-do compile }
3
4
void *b[10];
5
6
template <int N>
7
void **
8
foo (int x)
9
{
10
void **a = b; // { dg-bogus "address of local variable 'a' returned" }
11
return &a[x];
12
}
13
14
void **
15
bar (int x)
16
{
17
return foo <0> (x);
18
}