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/] [20000402-1.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
#include <limits.h>
2
 
3
#if ULONG_LONG_MAX != 18446744073709551615ull && ULONG_MAX != 18446744073709551615ull
4
int main(void) { exit (0); }
5
#else
6
#if ULONG_MAX != 18446744073709551615ull
7
typedef unsigned long long ull;
8
#else
9
typedef unsigned long ull;
10
#endif
11
 
12
#include <stdio.h>
13
 
14
void checkit(int);
15
 
16
main () {
17
    const ull a = 0x1400000000ULL;
18
    const ull b = 0x80000000ULL;
19
    const ull c = a/b;
20
    const ull d = 0x1400000000ULL / 0x80000000ULL;
21
 
22
    checkit ((int) c);
23
    checkit ((int) d);
24
 
25
    exit(0);
26
}
27
 
28
void checkit (int a)
29
{
30
  if (a != 40)
31
    abort();
32
}
33
#endif

powered by: WebSVN 2.1.0

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