2 pr15296.c from the execute part of the gcc torture tests.
10 #pragma disable_warning 85
13 #ifndef __SDCC_pdk14 // Lack of memory - see RFE #607 for details.
15 /* PR optimization/15296. The delayed-branch scheduler caused code that
16 SEGV:d for CRIS; a register was set to -1 in a delay-slot for the
17 fall-through code, while that register held a pointer used in code at
20 /* Assume that if stdint.h defined INTPTR_MAX, it has also defined intptr_t */
21 /* oƒ otherwise, define it ourselves */
38 #if !(defined(__SDCC_pic14) && !defined(__SDCC_PIC14_ENHANCED)) // Pseudo-stack size limit
39 void f (void *, struct s1
*, const union u0
*, W
, W
, W
);
40 void g (void *, char *);
43 f (void *a
, struct s1
*b
, const union u0
*h
, W v0
, W v1
, W v4
)
47 union u0
**v5
= b
->m0
;
49 union u0
**d
= &v5
[0];
79 void g (void *a
, char *b
) { ASSERT(0); }
84 testTortureExecute (void)
86 #ifndef __SDCC_pdk14 // Lack of memory - see RFE #607 for details.
88 union u0 uv
[] = {{ .i
= 111 }, { .i
= 222 }, { .i
= 333 }, { .i
= 444 }};
89 struct s1 s
= { 0, {{ .i
= 555 }, { .i
= 0 }, { .i
= 999 }, { .i
= 777 }}};
90 #if !(defined(__SDCC_pic14) && !defined(__SDCC_PIC14_ENHANCED)) // Pseudo-stack size limit
91 f (0, &s
, 0, 20000, 10000, (W
) uv
);
92 if (s
.m1
[0].i
!= (W
) uv
|| s
.m1
[1].i
!= 0 || s
.m1
[2].i
!= 999
93 || s
.m1
[3].i
!= 777 || uv
[0].i
!= 111 || uv
[1].i
!= 222
94 || uv
[2].i
!= 0 || uv
[3].i
!= 444)