blob: de641a689de85cc974c71d47ffdc4975b77678ea [file] [log] [blame]
/* Test that VLA types do not crash with -Walloc-size
{ dg-do compile }
{ dg-options "-Walloc-size" }
* */
struct foo { int x[10]; };
void fo0(int n)
{
struct foo (*p)[n] = __builtin_malloc(sizeof *p);
}
void fo1(int n)
{
struct bar { int x[n]; };
struct bar *p = __builtin_malloc(sizeof *p);
}