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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [struct-cpy-1.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* powerpc64-linux gcc miscompiled this due to rs6000.c:expand_block_move
2
   not setting mem aliasing info correctly for the code implementing the
3
   structure assignment.  */
4
 
5
struct termios
6
{
7
  unsigned int a;
8
  unsigned int b;
9
  unsigned int c;
10
  unsigned int d;
11
  unsigned char pad[28];
12
};
13
 
14
struct tty_driver
15
{
16
  unsigned char pad1[38];
17
  struct termios t __attribute__ ((aligned (8)));
18
};
19
 
20
static struct termios zero_t;
21
static struct tty_driver pty;
22
 
23
void ini (void)
24
{
25
  pty.t = zero_t;
26
  pty.t.a = 1;
27
  pty.t.b = 2;
28
  pty.t.c = 3;
29
  pty.t.d = 4;
30
}
31
 
32
int main (void)
33
{
34
  extern void abort (void);
35
 
36
  ini ();
37
  if (pty.t.a != 1
38
      || pty.t.b != 2
39
      || pty.t.c != 3
40
      || pty.t.d != 4)
41
    abort ();
42
  return 0;
43
}

powered by: WebSVN 2.1.0

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