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.target/] [sh/] [sh-relax.c] - Blame information for rev 327

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

Line No. Rev Author Line
1 325 jeremybenn
/* Check that -mrelax works.  */
2
/* { dg-do run { target { { sh-*-* sh?-*-* } && { ! { sh*-*-vxworks* && nonpic } } } } } */
3
/* { dg-options "-O1 -mrelax" } */
4
 
5
extern void abort (void);
6
extern int qwerty (int);
7
 
8
int
9
f (int i)
10
{
11
  return qwerty (i) + 1;
12
}
13
 
14
int
15
qwerty (int i)
16
{
17
  switch (i)
18
    {
19
    case 1:
20
      return 'q';
21
    case 2:
22
      return 'w';
23
    case 3:
24
      return 'e';
25
    case 4:
26
      return 'r';
27
    case 5:
28
      return 't';
29
    case 6:
30
      return 'y';
31
    }
32
}
33
 
34
int
35
main ()
36
{
37
  if (f (1) != 'q' + 1 || f (2) != 'w' + 1 || f (3) != 'e' + 1
38
      || f(4) != 'r' + 1 || f (5) != 't' + 1 || f (6) != 'y' + 1)
39
    abort ();
40
  return 0;
41
}

powered by: WebSVN 2.1.0

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