OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [alias-2.c] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do compile }
// { dg-do compile }
// { dg-options "-Wstrict-aliasing=2 -fstrict-aliasing" }
// { dg-options "-Wstrict-aliasing=2 -fstrict-aliasing" }
 
 
struct foo {
struct foo {
  char c;
  char c;
  char d;
  char d;
  short s;
  short s;
  int i;
  int i;
} bar;
} bar;
 
 
int
int
sub1 (long long int foobar)
sub1 (long long int foobar)
{
{
  struct foo *tmp = (struct foo *) &foobar; // { dg-warning "type-punned pointer might" "" }
  struct foo *tmp = (struct foo *) &foobar; // { dg-warning "type-punned pointer might" "" }
  return tmp->i;
  return tmp->i;
}
}
 
 

powered by: WebSVN 2.1.0

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