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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr17526.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-fno-pcc-struct-return" { target i?86-*-* } } */
3
 
4
void abort(void);
5
 
6
typedef struct { int i; } A;
7
 
8
A __attribute__((noinline))
9
foo(void)
10
{
11
    A a = { -1 };
12
    return a;
13
}
14
 
15
void __attribute__((noinline))
16
bar(A *p)
17
{
18
    *p = foo();
19
}
20
 
21
int main(void)
22
{
23
    A a;
24
    bar(&a);
25
    if (a.i != -1) abort();
26
    return 0;
27
}

powered by: WebSVN 2.1.0

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