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/] [i386/] [pr35540.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
 
4
extern void abort (void);
5
 
6
int __attribute__ ((noinline))
7
test (unsigned int *a, int b)
8
{
9
  return b ? 1 : __builtin_parity (*a);
10
}
11
 
12
int __attribute__ ((noinline))
13
testl (unsigned long *a, int b)
14
{
15
  return b ? 1 : __builtin_parityl (*a);
16
}
17
 
18
int __attribute__ ((noinline))
19
testll (unsigned long long *a, int b)
20
{
21
  return b ? 1 : __builtin_parityll (*a);
22
}
23
 
24
int
25
main ()
26
{
27
  unsigned int a = 0;
28
  unsigned long al;
29
  unsigned long long all;
30
 
31
  a = 0x12345670;
32
  if (test (&a, 0))
33
    abort ();
34
 
35
  al = 0x12345670ul;
36
  if (testl (&al, 0))
37
    abort();
38
 
39
#if 1
40
  all = 0x12345678abcdef0ull;
41
  if (testll (&all, 0))
42
    abort ();
43
#endif
44
  return 0;
45
}

powered by: WebSVN 2.1.0

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