blob: 53381b76cd3704e6c5e10a4ec2773853280dd9e6 (
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
|
/*
20030626-2.c from the execute part of the gcc torture tests.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma std_c99
#endif
#include <stdio.h>
#if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
char buf[40];
#endif
void
testTortureExecute (void)
{
#if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
int i = 0;
int l = sprintf (buf, "%s", i++ ? "string" : "other string");
if (l != sizeof ("other string") - 1 || i != 1)
ASSERT (0);
return;
#endif
}
|