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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr20583.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR target/20583
2
   On m68k-none-elf, CSE used to generate
3
 
4
     (set (reg:HI ...)
5
          (const:HI (truncate:HI (minus:SI (label_ref ...)
6
                                           (label_ref ...)))))
7
 
8
   which output functions do not know how to handle.  Make sure that
9
   such a constant will be rejected.  */
10
 
11
void bar (unsigned int);
12
 
13
void
14
foo (void)
15
{
16
  char buf[1] = { 3 };
17
  const char *p = buf;
18
  const char **q = &p;
19
  unsigned int ch;
20
  switch (**q)
21
    {
22
    case 1:  ch = 5; break;
23
    case 2:  ch = 4; break;
24
    case 3:  ch = 3; break;
25
    case 4:  ch = 2; break;
26
    case 5:  ch = 1; break;
27
    default: ch = 0; break;
28
    }
29
  bar (ch);
30
}

powered by: WebSVN 2.1.0

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