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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr30778.c] - Blame information for rev 717

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

Line No. Rev Author Line
1 688 jeremybenn
extern void *memset (void *, int, unsigned long);
2
extern void abort (void);
3
 
4
struct reg_stat {
5
  void *last_death;
6
  void *last_set;
7
  void *last_set_value;
8
  int   last_set_label;
9
  char  last_set_sign_bit_copies;
10
  int   last_set_mode : 8;
11
  char  last_set_invalid;
12
  char sign_bit_copies;
13
  long nonzero_bits;
14
};
15
 
16
static struct reg_stat *reg_stat;
17
 
18
void __attribute__((noinline))
19
init_reg_last (void)
20
{
21
  memset (reg_stat, 0, __builtin_offsetof (struct reg_stat, sign_bit_copies));
22
}
23
 
24
int main (void)
25
{
26
  struct reg_stat r;
27
 
28
  reg_stat = &r;
29
  r.nonzero_bits = -1;
30
  init_reg_last ();
31
  if (r.nonzero_bits != -1)
32
    abort ();
33
  return 0;
34
}

powered by: WebSVN 2.1.0

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