summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr78775.c
blob: 120c252c99ee128be05ff3d660c0bc91e5707bf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR c/78775 - [7 Regression] ICE in maybe_warn_alloc_args_overflow
   { dg-do compile }
   { dg-options "-O2" } */

int a, b, *c;

int main (void)
{
  unsigned long d = 0;
  while (1)
    {
      switch (b)
      case 'S':
	d = a;
      c = __builtin_malloc (d);
    }

  return 0;
}