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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wstrict-aliasing-float-ref-int-obj.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
3
 
4
 
5
int foo() {
6
  int x;
7
  float& q = reinterpret_cast (x);  /* { dg-message "dereferencing type-punned" "" { target *-*-* } } */
8
  q = 1.0; /* { dg-warning "does break strict-aliasing" "" { xfail *-*-* } } */
9
  return x;
10
}
11
 
12
/* { dg-message "initialized" "" { xfail *-*-* } 7 } */

powered by: WebSVN 2.1.0

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