OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr26565.c] - Rev 154

Compare with Previous | Blame | View Log

/* { dg-do run } */
/* m32c is already packed.  */
/* { dg-skip-if "" { "m32c-*-*" } { "*" } { "" } } */
 
void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n);
 
struct timeval {
    long tv_sec;
};
 
struct outdata {
    long align;
    char seq;
    struct timeval tv __attribute__((packed));
};
 
void send_probe(struct outdata *outdata, struct timeval *tp) __attribute__((noinline));
void send_probe(struct outdata *outdata, struct timeval *tp)
{
    memcpy(&outdata->tv, tp, sizeof outdata->tv);
}
 
struct timeval t;
struct outdata outdata;
 
int main()
{
  send_probe(&outdata, &t);
  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.