URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
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;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.