blob: 2052d3991e83eb4b4c767e911306c4577ccaef71 [file] [log] [blame]
// Test for throwing bad_array_new_length on invalid array length
// { dg-do run { target c++11 } }
#include <new>
void * f(int i)
{
return new int[i];
}
int main()
{
try
{
f(-1);
}
catch (std::bad_array_new_length) { return 0; }
__builtin_abort ();
}