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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr50729.c] - Blame information for rev 754

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target int32plus } */
3
 
4
extern void abort (void);
5
unsigned short __attribute__((noinline))
6
foo (int i)
7
{
8
  if (i >= 0
9
      && i <= 0x400000)
10
    return (unsigned short)(signed char)i;
11
  return i;
12
}
13
int main()
14
{
15
  int i;
16
  for (i = 0; i < 0xffff; ++i)
17
    if (foo(i) != (unsigned short)(signed char) i)
18
      abort ();
19
  return 0;
20
}

powered by: WebSVN 2.1.0

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