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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr45623.c] - Rev 754

Go to most recent revision | Compare with Previous | Blame | View Log

/* { dg-do run } */
/* { dg-options "-std=c99" } */
 
#include <stdint.h>
 
extern void abort (void);
 
char *s1 = "foo";
char *s2 = "bar";
 
char **ss1 = &s1;
 
typedef union jsval_layout
{
    uint64_t asBits;
    char **ptr;
} jsval_layout;
 
int main()
{
  jsval_layout l, m;
  l.ptr = ss1;
  m.asBits = l.asBits;
  char ** data = m.ptr;
  *data = s2;
  if (s1 != s2)
    abort ();
  return 0;
}
 

Go to most recent revision | 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.