summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr36765.c
blob: 6883b0cfd753f77c8618d1a26b6ba8eca4786e44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int __attribute__((noinline))
foo(int i)
{
  int *p = __builtin_malloc (4 * sizeof(int));
  *p = 0;
  p[i] = 1;
  return *p;
}
extern void abort (void);
int main()
{
  if (foo(0) != 1)
    abort ();
  return 0;
}