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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20050111-1.c] - Blame information for rev 711

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

Line No. Rev Author Line
1 688 jeremybenn
/* PR middle-end/19084, rtl-optimization/19348 */
2
 
3
unsigned int
4
foo (unsigned long long x)
5
{
6
  unsigned int u;
7
 
8
  if (x == 0)
9
    return 0;
10
  u = (unsigned int) (x >> 32);
11
  return u;
12
}
13
 
14
unsigned long long
15
bar (unsigned short x)
16
{
17
  return (unsigned long long) x << 32;
18
}
19
 
20
extern void abort (void);
21
 
22
int
23
main (void)
24
{
25
  if (sizeof (long long) != 8)
26
    return 0;
27
 
28
  if (foo (0) != 0)
29
    abort ();
30
  if (foo (0xffffffffULL) != 0)
31
    abort ();
32
  if (foo (0x25ff00ff00ULL) != 0x25)
33
    abort ();
34
  if (bar (0) != 0)
35
    abort ();
36
  if (bar (0x25) != 0x2500000000ULL)
37
    abort ();
38
  return 0;
39
}

powered by: WebSVN 2.1.0

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