aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20080806-1.c
blob: c54e7397f5d5653f86e27f3f99e8228a48236a04 (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
33
34
35
36
37
38
39
40
41
/* This used to ICE on s390x due to a reload bug.  */

#if defined(STACK_SIZE) && (STACK_SIZE < 65536)
  #define BYTES 64
#else
  #define BYTES 65400
#endif

int gl2;
typedef __SIZE_TYPE__ size_t;

extern void *memcpy (void *dest, const void *src, size_t n);

void
f1 ()
{
  int i2;
  unsigned char bf[BYTES];

  for (i2 = 0; i2 < 3; i2++)
    {
      unsigned char *p2 = bf;
      unsigned char *p3 = ((void *) 0);
      unsigned short ctf2;

      p2 += sizeof (short);

      for (ctf2 = 0; ctf2 < 3; ctf2++)
	{
	  if (ctf2 == 1)
	    {
	      unsigned short of = p2 - bf - 6;
	      unsigned short *ofp = (unsigned short *) &of;
	      memcpy (p3, ofp, sizeof (short));
	    }

	  if (gl2 == 1)
	    p2 += 3;
	}
    }
}