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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr30185.c] - Rev 816

Compare with Previous | Blame | View Log

/* PR target/30185 */
 
extern void abort (void);
 
typedef struct S { char a; long long b; } S;
 
S
foo (S x, S y)
{
  S z;
  z.b = x.b / y.b;
  return z;
}
 
int
main (void)
{
  S a, b;
  a.b = 32LL;
  b.b = 4LL;
  if (foo (a, b).b != 8LL)
    abort ();
  a.b = -8LL;
  b.b = -2LL;
  if (foo (a, b).b != 4LL)
    abort ();
  return 0;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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