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.c-torture/] [compile/] [pr41646.c] - Blame information for rev 302

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR rtl-optimization/41646 */
2
 
3
struct A { unsigned long a; };
4
struct B { unsigned short b, c, d; };
5
struct B bar (unsigned long);
6
 
7
char *
8
foo (char *a, struct A *x)
9
{
10
  struct B b = bar (x->a);
11
  unsigned char c;
12
  unsigned short d;
13
  a[3] = ((unsigned char) (b.b % 10) + 48);
14
  d = b.b / 10;
15
  a[2] = ((unsigned char) (d % 10) + 48);
16
  d = d / 10;
17
  a[1] = ((unsigned char) (d % 10) + 48);
18
  a[0] = ((unsigned char) ((d / 10) % 10) + 48);
19
  a[4] = 46;
20
  c = (unsigned char) b.c;
21
  a[6] = (c % 10 + 48);
22
  a[5] = ((c / 10) % 10 + 48);
23
  a[7] = 46;
24
  c = b.d;
25
  a[9] = (c % 10 + 48);
26
  a[8] = ((c / 10) % 10 + 48);
27
  return a + 10;
28
}

powered by: WebSVN 2.1.0

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