summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20030221-1.c
blob: a9cb0ebbb97cac3dd85ea97d2ca3b5581bb7e121 (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
25
26
27
28
29
/*
   20030221-1.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

#include <string.h>

/* PR optimization/8613 */
/* Contributed by Glen Nakamura */
 
void
testTortureExecute (void)
{
  char buf[16] = "1234567890";
  char *p = buf;

  *p++ = (char) strlen (buf);

  if ((buf[0] != 10) || (p - buf != 1))
    ASSERT (0);

  return;
}