blob: 39a71a5a3c17021bc91ca07bb819b6bfd666a639 (
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
|
/*
20070201-1.c from the execute part of the gcc torture suite.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma std_c99
#endif
#include <stdio.h>
/* PR middle-end/30473 */
#if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
char *
foo (char *buf, char *p)
{
sprintf (buf, "abcde", p++);
return p;
}
#endif
void
testTortureExecute (void)
{
#if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
#if !(defined (__GNUC__) && (__GNUC__ < 5))
char buf[6];
if (foo (buf, &buf[2]) != &buf[3])
ASSERT (0);
return;
#endif
#endif
}
|