URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist-opt.C] - Rev 826
Compare with Previous | Blame | View Log
// PR c++/41997
// { dg-options "-std=c++0x -O2 -fdump-tree-optimized" }
// { dg-final { scan-tree-dump-not "_0" "optimized" } }
// { dg-final { cleanup-tree-dump "optimized" } }
#include <initializer_list>
inline int max_val(std::initializer_list<int> il)
{
int i = *(il.begin());
int j = *(il.begin() + 1);
return (i > j ? i : j);
}
int main(void)
{
return max_val({1,2});
}