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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20020216-1.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* PR c/3444
2
   This used to fail because bitwise xor was improperly computed in char type
3
   and sign extended to int type.  */
4
 
5
extern void abort ();
6
extern void exit (int);
7
 
8
signed char c = (signed char) 0xffffffff;
9
 
10
int foo (void)
11
{
12
  return (unsigned short) c ^ (signed char) 0x99999999;
13
}
14
 
15
int main (void)
16
{
17
  if ((unsigned char) -1 != 0xff
18
      || sizeof (short) != 2
19
      || sizeof (int) != 4)
20
    exit (0);
21
  if (foo () != (int) 0xffff0066)
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.