OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr30375.c] - Blame information for rev 300

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
 
3
typedef struct _s {
4
    int a;
5
    int b;
6
    int c;
7
    int d;
8
} s;
9
 
10
extern void abort(void);
11
 
12
void __attribute__((noinline)) g(s *p)
13
{
14
  if (p->d != 0)
15
    abort ();
16
}
17
 
18
char *c = (void*)0;
19
void __attribute__((noinline)) f(void) { if (c) *c = 1; }
20
 
21
void test_signed_msg_encoding(void)
22
{
23
    s signInfo = { sizeof(signInfo), 0 };
24
 
25
    signInfo.b = 1;
26
    signInfo.c = 0;
27
    g(&signInfo);
28
    signInfo.d = 1;
29
    f();
30
}
31
 
32
int main()
33
{
34
  test_signed_msg_encoding ();
35
  test_signed_msg_encoding ();
36
  return 0;
37
}

powered by: WebSVN 2.1.0

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