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.dg/] [torture/] [pr28045.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
 
3
extern void abort(void);
4
struct a
5
{
6
   unsigned int bits : 1;
7
   signed long val : ((sizeof(long) * 8) - 1);
8
};
9
int Fnegate (struct a b)
10
{
11
  if ((-((long)b.val)) <= ((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))
12
      && (-((long)b.val)) >= (-(((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))) - 1))
13
     return 0 ;
14
  abort ();
15
}
16
int main ()
17
{
18
  struct a b = {1, 1};
19
  Fnegate (b);
20
  return 0;
21
}
22
 

powered by: WebSVN 2.1.0

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