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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [20000614-2.c] - Rev 816

Compare with Previous | Blame | View Log

/* { dg-do run { target i?86-*-* x86_64-*-*} } */
/* { dg-options "-O2" } */
 
extern void abort (void);
extern void exit (int);
 
char buf[8];
 
void bar(char *p)
{
}
 
int main()
{
  union {
    unsigned int val;
    unsigned char p[4];
  } serial;
 
  int i;
  serial.val = 0;
  bar(buf);
  for(i = 0; i < 8; i += 4)
    {
      serial.p [0] += buf [i + 0];
      serial.p [1] += buf [i + 1];
      serial.p [2] += buf [i + 2];
      serial.p [3] += buf [i + 3];
    }
  if (serial.val)
    abort();
  exit(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.