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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr43987.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
char B[256 * sizeof(void *)];
2
typedef void *FILE;
3
typedef struct globals {
4
    int c;
5
    FILE *l;
6
} __attribute__((may_alias)) T;
7
void add_input_file(FILE *file)
8
{
9
  (*(T*)&B).l[0] = file;
10
}
11
extern void abort (void);
12
int main()
13
{
14
  FILE x;
15
  (*(T*)&B).l = &x;
16
  add_input_file ((void *)-1);
17
  if ((*(T*)&B).l[0] != (void *)-1)
18
    abort ();
19
  return 0;
20
}

powered by: WebSVN 2.1.0

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