summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr60072.c
blob: 9971761a0275183a132d969ac21bcce0deef6cb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
   pr60072.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

/* PR target/60072 */

int c = 1;

static int *foo (int *p)
{
  return p;
}

int
m ()
{
  *foo (&c) = 2;
  return c - 2;
}

void
testTortureExecute (void)
{
  m();
}