Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wreturn-local-addr-4.C
blob: 492dcb9e76fc6e3ab353c78281678fc120cf639c [
file
] [
log
] [
blame
]
// PR c++/82600
// { dg-do compile }
void
*
b
[
10
];
template
<
int
N
>
void
**
foo
(
int
x
)
{
void
**
a
=
b
;
// { dg-bogus "address of local variable 'a' returned" }
return
&
a
[
x
];
}
void
**
bar
(
int
x
)
{
return
foo
<
0
>
(
x
);
}