summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20040313-1.c
blob: 895756ae20887804c5e91959b77481de66065ce3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
   20040313-1.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

/* PR middle-end/14470 */
/* Origin: Lodewijk Voge <lvoge@cs.vu.nl> */

void
testTortureExecute (void)
{
  int t[4] = { 1 }, d;

  d = 0;
  d = t[d]++;
  ASSERT (t[0] == 2);
  ASSERT (d == 1);
  return;
}