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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [ftrapv-1.c] - Diff between revs 154 and 816

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

Rev 154 Rev 816
/* Copyright (C) 2004 Free Software Foundation.
/* Copyright (C) 2004 Free Software Foundation.
 
 
   PR other/15526
   PR other/15526
   Verify correct overflow checking with -ftrapv.
   Verify correct overflow checking with -ftrapv.
 
 
   Written by Falk Hueffner, 20th May 2004.  */
   Written by Falk Hueffner, 20th May 2004.  */
 
 
/* { dg-do run } */
/* { dg-do run } */
/* { dg-options "-ftrapv" } */
/* { dg-options "-ftrapv" } */
 
 
__attribute__((noinline)) int
__attribute__((noinline)) int
mulv(int a, int b)
mulv(int a, int b)
{
{
  return a * b;
  return a * b;
}
}
 
 
int
int
main()
main()
{
{
  mulv( 0,  0);
  mulv( 0,  0);
  mulv( 0, -1);
  mulv( 0, -1);
  mulv(-1,  0);
  mulv(-1,  0);
  mulv(-1, -1);
  mulv(-1, -1);
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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