2 strlen-1.c from the execute part of the gcc torture tests.
7 /* Copyright (C) 2002 Free Software Foundation.
9 Test strlen with various combinations of pointer alignments and lengths to
10 make sure any optimizations in the library are correct.
12 Written by Michael Meissner, March 9, 2002. */
17 #if !defined(__SDCC_pdk14) // Lack of memory
19 #define MAX_OFFSET (sizeof (long long))
23 #define MAX_TEST (8 * sizeof (long long))
27 #define MAX_EXTRA (sizeof (long long))
30 #define MAX_LENGTH (MAX_OFFSET + MAX_TEST + MAX_EXTRA + 1)
35 #if 0 // TODO: enable when SDCC supports long double!
42 testTortureExecute (void)
44 #if !defined(__SDCC_pdk14) // Lack of memory
45 size_t off
, len
, len2
, i
;
48 for (off
= 0; off
< MAX_OFFSET
; off
++)
49 for (len
= 0; len
< MAX_TEST
; len
++)
52 for (i
= 0; i
< off
; i
++)
55 for (i
= 0; i
< len
; i
++)
59 for (i
= 0; i
< MAX_EXTRA
; i
++)