URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
/* PR optimization/11210 */
|
/* PR optimization/11210 */
|
/* Originator: Guido Classen <guido@clagi.de> */
|
/* Originator: Guido Classen <guido@clagi.de> */
|
/* Reduced testcase by Falk Hueffner <falk@debian.org> */
|
/* Reduced testcase by Falk Hueffner <falk@debian.org> */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O" } */
|
/* { dg-options "-O" } */
|
|
|
/* Verify that the constant expressions folder doesn't
|
/* Verify that the constant expressions folder doesn't
|
throw away the cast operation in the comparison. */
|
throw away the cast operation in the comparison. */
|
|
|
struct str {
|
struct str {
|
int head;
|
int head;
|
signed char data[8];
|
signed char data[8];
|
};
|
};
|
|
|
int foo(struct str t)
|
int foo(struct str t)
|
{
|
{
|
return t.data[0] || (unsigned char) t.data[2] != 130; /* { dg-bogus "comparison is always 1" } */
|
return t.data[0] || (unsigned char) t.data[2] != 130; /* { dg-bogus "comparison is always 1" } */
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.