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/] [execute/] [pr40057.c] - Blame information for rev 301

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR middle-end/40057 */
2
 
3
extern void abort (void);
4
 
5
__attribute__((noinline)) int
6
foo (unsigned long long x)
7
{
8
  unsigned long long y = (x >> 31ULL) & 1ULL;
9
  if (y == 0ULL)
10
    return 0;
11
  return -1;
12
}
13
 
14
__attribute__((noinline)) int
15
bar (long long x)
16
{
17
  long long y = (x >> 31LL) & 1LL;
18
  if (y == 0LL)
19
    return 0;
20
  return -1;
21
}
22
 
23
int
24
main (void)
25
{
26
  if (sizeof (long long) != 8)
27
    return 0;
28
  if (foo (0x1682a9aaaULL))
29
    abort ();
30
  if (!foo (0x1882a9aaaULL))
31
    abort ();
32
  if (bar (0x1682a9aaaLL))
33
    abort ();
34
  if (!bar (0x1882a9aaaLL))
35
    abort ();
36
  return 0;
37
}

powered by: WebSVN 2.1.0

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