From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1287 invoked by alias); 30 Oct 2003 05:08:55 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 1277 invoked by uid 48); 30 Oct 2003 05:08:53 -0000 Date: Thu, 30 Oct 2003 05:12:00 -0000 Message-ID: <20031030050853.1275.qmail@sources.redhat.com> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031029174045.12828.chlunde+bug@ifi.uio.no> References: <20031029174045.12828.chlunde+bug@ifi.uio.no> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/12828] -floop-optimize is unstable on PowerPC (float to int conversion problem) X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg02655.txt.bz2 List-Id: 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 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