summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/str_empty.C
blob: e24f0b6ac9f73df4fdc7433666d4b8b0947472b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/31617
// Segfault in integer_zerop
// Origin: Andrew Pinski  <andrew_pinski@playstation.sony.com>
// { dg-do compile }

struct polynomial {
  ~polynomial ();
};

void spline_rep1 ()
{
  new polynomial[0];  // { dg-bogus "allocating zero-element array" }
}