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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20080604-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
struct barstruct { char const* some_string; } x;
2
extern void abort (void);
3
void __attribute__((noinline))
4
foo(void)
5
{
6
  if (!x.some_string)
7
    abort ();
8
}
9
void baz(int b)
10
{
11
  struct barstruct bar;
12
  struct barstruct* barptr;
13
  if (b)
14
    barptr = &bar;
15
  else
16
    {
17
      barptr = &x + 1;
18
      barptr = barptr - 1;
19
    }
20
  barptr->some_string = "Everything OK";
21
  foo();
22
  barptr->some_string = "Everything OK";
23
}
24
int main()
25
{
26
  x.some_string = (void *)0;
27
  baz(0);
28
  if (!x.some_string)
29
    abort ();
30
  return 0;
31
}
32
 

powered by: WebSVN 2.1.0

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