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-bogus-struct-included.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
struct S {
6
  int i;
7
  float f;
8
};
9
 
10
int foo () {
11
  struct S s;
12
  s.i = 7;
13
  float* f = &s.f;  /* { dg-bogus "float included in struct S" } */
14
  *f = 2.0;
15
  return s.i + (int)s.f;
16
}

powered by: WebSVN 2.1.0

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