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] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-std=c99" } */
3
 
4
#include <stdint.h>
5
 
6
extern void abort (void);
7
 
8
char *s1 = "foo";
9
char *s2 = "bar";
10
 
11
char **ss1 = &s1;
12
 
13
typedef union jsval_layout
14
{
15
    uint64_t asBits;
16
    char **ptr;
17
} jsval_layout;
18
 
19
int main()
20
{
21
  jsval_layout l, m;
22
  l.ptr = ss1;
23
  m.asBits = l.asBits;
24
  char ** data = m.ptr;
25
  *data = s2;
26
  if (s1 != s2)
27
    abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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