OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20031012-1.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* PR optimization/8750
2
   Used to fail under Cygwin with
3
   -O2 -fomit-frame-pointer
4
   Testcase by David B. Trout     */
5
 
6
#if defined(STACK_SIZE) && STACK_SIZE < 16000
7
#define ARRAY_SIZE (STACK_SIZE / 2)
8
#define STRLEN     (ARRAY_SIZE - 9)
9
#else
10
#define ARRAY_SIZE 15000
11
#define STRLEN     13371
12
#endif
13
 
14
extern void *memset (void *, int, __SIZE_TYPE__);
15
extern void abort (void);
16
 
17
static void foo ()
18
{
19
    char a[ARRAY_SIZE];
20
 
21
    a[0]=0;
22
    memset( &a[0], 0xCD, STRLEN );
23
    a[STRLEN]=0;
24
    if (strlen(a) != STRLEN)
25
      abort ();
26
}
27
 
28
int main ( int argc, char* argv[] )
29
{
30
    foo();
31
    return 0;
32
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.