URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow=4" } */
|
/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow=4" } */
|
|
|
/* Source: Ian Lance Taylor. Based on strict-overflow-2.c. */
|
/* Source: Ian Lance Taylor. Based on strict-overflow-2.c. */
|
|
|
/* We can only simplify the division when using strict overflow
|
/* We can only simplify the division when using strict overflow
|
semantics. */
|
semantics. */
|
|
|
int
|
int
|
foo (int i)
|
foo (int i)
|
{
|
{
|
return (i * 100) / 10; /* { dg-warning "assuming signed overflow does not occur" "correct warning" } */
|
return (i * 100) / 10; /* { dg-warning "assuming signed overflow does not occur" "correct warning" } */
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.