repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/82600
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wreturn-local-addr-4.C
blob
492dcb9e76fc6e3ab353c78281678fc120cf639c
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
}