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
Rebase.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-template10.C
blob
4fcc965275131235b14fd22467c80425d2587a30
1
// PR c++/50276
2
// { dg-options "-Wuninitialized" }
3
// { dg-do run { target c++11 } }
4
5
template<typename T>
6
unsigned testfun(const T& func)
7
{
8
return func();
9
}
10
11
template<int i>
12
unsigned test()
13
{
14
if (unsigned value = testfun( [] () { return 0; }))
15
return value;
16
return i;
17
}
18
19
int main()
20
{
21
if (test<42>() != 42)
22
__builtin_abort ();
23
}