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-const2.C
blob
884163a291ea1d20086197ed2ebe787f57a3852a
1
// PR c++/52026
2
// { dg-options "-O" }
3
// { dg-do run { target c++11 } }
4
5
template<bool B>
6
int func() {
7
const int constVal1 = B ? 100 : -100;
8
const int constVal = constVal1;
9
return [] { return constVal; }();
10
}
11
12
int main() {
13
if (func<true>() != 100)
14
__builtin_abort ();
15
}