This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/21424] New: Infinite memory allocation when -O3 is used
- From: "vvv dot ivanov at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 May 2005 18:06:15 -0000
- Subject: [Bug rtl-optimization/21424] New: Infinite memory allocation when -O3 is used
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the following testcase with -O3 gcc tries to allocate an infinite
memory (and freezes the system for some time).
void f(int type){
int tmp;
for(tmp = 0; tmp < 2; tmp++){
switch(type) {
case 0:
s1(); break;
case 1:
s2(); break;
case 2:
s3(); break;
}
}
}
how to reproduce:
[test@test tmp]$ arm-unknown-linux-gnu-gcc -c -O3 test.c
The bug was reproduced in gcc-2005-04-29 build for arm-unknown-linux-gnu
gcc -v:
[test@test tmp]$
/fsf/inst/arm-3.4-20050429-2.3.2/arm-unknown-linux-gnu/gcc-3.4-20050429-glibc-2.3.2/bin/arm-unknown-linux-gnu-gcc
-v
Reading specs from
/fsf/inst/arm-3.4-20050429-2.3.2/arm-unknown-linux-gnu/gcc-3.4-20050429-glibc-2.3.2/lib/gcc/arm-unknown-linux-gnu/3.4.4/specs
Configured with:
/work/distr/fsf/crosstool-0.31/build/arm-unknown-linux-gnu/gcc-3.4-20050429-glibc-2.3.2/gcc-3.4-20050429/configure
--target=arm-unknown-linux-gnu --host=i686-host_pc-linux-gnu
--prefix=/fsf/inst/arm-3.4-20050429-2.3.2/arm-unknown-linux-gnu/gcc-3.4-20050429-glibc-2.3.2
--with-local-prefix=/fsf/inst/arm-3.4-20050429-2.3.2/arm-unknown-linux-gnu/gcc-3.4-20050429-glibc-2.3.2/arm-unknown-linux-gnu
--disable-multilib --with-newlib --without-headers --disable-nls
--enable-threads=no --enable-symvers=gnu --enable-__cxa_atexit
--enable-languages=c --disable-shared
Thread model: single
gcc version 3.4.4 20050429 (prerelease)
--
Summary: Infinite memory allocation when -O3 is used
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vvv dot ivanov at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21424