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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr49243.c] - Blame information for rev 724

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR tree-optimization/49243 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -Winline" } */
4
 
5
extern unsigned long jb[];
6
extern int my_setjmp(unsigned long jb[]) __attribute__((returns_twice));
7
extern int decode(const char*);
8
 
9
static inline int wrapper(const char **s_ptr) /* { dg-warning "(inlining failed|function 'wrapper' can never be inlined because it uses setjmp)" } */
10
{
11
    if (my_setjmp(jb) == 0) {
12
        const char *s = *s_ptr;
13
        while (decode(s) != 0)
14
            *s_ptr = ++s;
15
        return 0;
16
    } else
17
        return -1;
18
}
19
 
20
void parse(const char *data)
21
{
22
    const char *s = data;
23
    if (!(wrapper(&s) == -1 && (s - data) == 1)) /* { dg-warning "called from here" } */
24
        __builtin_abort();
25
}

powered by: WebSVN 2.1.0

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