Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
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
);
}