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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [unsigned-long-compare.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Copyright (C) 2006 Free Software Foundation, Inc. */
2
/* Contributed by Carlos O'Donell on 2006-01-30 */
3
 
4
/* Test a division corner case where the expression simplifies
5
   to a comparison, and the optab expansion is wrong. The optab
6
   expansion emits a function whose return is unbiased and needs
7
   adjustment. */
8
/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
9
/* { dg-do run } */
10
/* { dg-options "" } */
11
#include <stdlib.h>
12
 
13
#define BIG_CONSTANT 0xFFFFFFFF80000000ULL
14
 
15
int main (void)
16
{
17
  unsigned long long OneULL = 1ULL;
18
  unsigned long long result;
19
 
20
  result = OneULL / BIG_CONSTANT;
21
  if (result)
22
    abort ();
23
  exit (0);
24
}

powered by: WebSVN 2.1.0

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