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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr34174-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* Based on PR target/27386 testcase by Joerg Wunsch.  */
3
 
4
extern void abort (void);
5
extern void exit (int);
6
 
7
#if __INT_MAX__ >= 9223372036854775807LL
8
typedef unsigned int uint64_t;
9
#elif __LONG_MAX__ >= 9223372036854775807LL
10
typedef unsigned long int uint64_t;
11
#elif __LONG_LONG_MAX__ >= 9223372036854775807LL
12
typedef unsigned long long int uint64_t;
13
#else
14
int
15
main (void)
16
{
17
  exit (0);
18
}
19
#endif
20
 
21
uint64_t a, b, c;
22
 
23
int
24
foo (uint64_t x, uint64_t y, uint64_t z, int i)
25
{
26
  a = x;
27
  b = y;
28
  c = z;
29
  return 2 * i;
30
}
31
 
32
int
33
main (void)
34
{
35
  if (foo (1234512345123ull, 3456734567345ull, 7897897897897ull, 42) != 84)
36
    abort ();
37
  if (a != 1234512345123ull)
38
    abort ();
39
  if (b != 3456734567345ull)
40
    abort ();
41
  if (c != 7897897897897ull)
42
    abort ();
43
  exit (0);
44
}

powered by: WebSVN 2.1.0

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