This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/12828] -floop-optimize is unstable on PowerPC (float to int conversion problem)
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Oct 2003 05:08:53 -0000
- Subject: [Bug optimization/12828] -floop-optimize is unstable on PowerPC (float to int conversion problem)
- References: <20031029174045.12828.chlunde+bug@ifi.uio.no>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12828
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-30 05:08 -------
Here is the code:
/*
* This gives me a SIGSEGV when compiled with -floop-optimize on PPC w/3.3
* chlunde at ifi.uio.no
*/
#include <math.h>
typedef unsigned int uint;
int main(int, char**)
{
const uint size = 181; // 180 and lower seems to work
unsigned char data[size][size];
for(uint x = 0; x < size; ++x)
{
for(uint y = 0; y < size; ++y)
{
int intensity = (int)(x * 10.0); // This is needed
data[y][x] = (intensity >= 0) ? 0 : 1;
}
}
}
// vim: ts=2 sw=2 et