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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [Wstrict-aliasing-float-ptr-int-obj.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -Wstrict-aliasing -fstrict-aliasing" } */
3
 
4
extern int flag;
5
 
6
int foo() {
7
 
8
  int x;
9
  int y = 9;
10
  float* q;
11
  float* r;
12
 
13
  if (flag) {
14
    q = (float*) &x;  /* { dg-message "initialized" "" { xfail *-*-* } } */
15
  } else {
16
    q = (float*) &y;  /* { dg-message "initialized" "" { xfail *-*-* } } */
17
  }
18
 
19
  *q = 1.0;  /* { dg-warning "does break strict-aliasing" "" { xfail *-*-* } } */
20
 
21
  return x;
22
 
23
}

powered by: WebSVN 2.1.0

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