blob: f8070925db2ee2aafabdc6a0d9102057fb0917be [file] [log] [blame]
// PR c++/41997
// { dg-do compile { target c++11 } }
// { dg-options "-O2 -fdump-tree-optimized" }
// { dg-final { scan-tree-dump-not "_0" "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});
}