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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [unsigned-long-compare.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* Copyright (C) 2006 Free Software Foundation, Inc. */
/* Copyright (C) 2006 Free Software Foundation, Inc. */
/* Contributed by Carlos O'Donell on 2006-01-30 */
/* Contributed by Carlos O'Donell on 2006-01-30 */
 
 
/* Test a division corner case where the expression simplifies
/* Test a division corner case where the expression simplifies
   to a comparison, and the optab expansion is wrong. The optab
   to a comparison, and the optab expansion is wrong. The optab
   expansion emits a function whose return is unbiased and needs
   expansion emits a function whose return is unbiased and needs
   adjustment. */
   adjustment. */
/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
/* { dg-do run } */
/* { dg-do run } */
/* { dg-options "" } */
/* { dg-options "" } */
#include <stdlib.h>
#include <stdlib.h>
 
 
#define BIG_CONSTANT 0xFFFFFFFF80000000ULL
#define BIG_CONSTANT 0xFFFFFFFF80000000ULL
 
 
int main (void)
int main (void)
{
{
  unsigned long long OneULL = 1ULL;
  unsigned long long OneULL = 1ULL;
  unsigned long long result;
  unsigned long long result;
 
 
  result = OneULL / BIG_CONSTANT;
  result = OneULL / BIG_CONSTANT;
  if (result)
  if (result)
    abort ();
    abort ();
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

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