URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist-opt.C] - Rev 301
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});
}