GCC 4.5 regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,


I've spotted this regression while testing gcc 4.5.2.
It hangs while doing one of the configure test of diffutils.

I've attached a reduced test case. The program is supposed to
segfault because of a stack overflow. However, with 4.5, it just hangs.
It seems that 4.5 simply over-optimize the function and replaces it
with a single jump.

Should I open a PR ?
Do you need other info ?

Here is how gcc is configured :

terminator test # gcc-4.4.5 -v
Using built-in specs.
Target: hppa2.0-unknown-linux-gnu
Configured
with: /var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/configure
--prefix=/usr --bindir=/usr/hppa2.0-unknown-linux-gnu/gcc-bin/4.4.5
--includedir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.4.5/include
--datadir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/4.4.5
--mandir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/4.4.5/man
--infodir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/4.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.4.5/include/g++-v4
--host=hppa2.0-unknown-linux-gnu --build=hppa2.0-unknown-linux-gnu
--disable-altivec --disable-fixed-point --without-ppl --without-cloog
--enable-nls --without-included-gettext --with-system-zlib
--disable-werror --enable-secureplt --disable-multilib
--enable-libmudflap --disable-libssp --enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/hppa2.0-unknown-linux-gnu/4.4.5/python
--enable-checking=release --disable-libgcj
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.5
p1.2, pie-0.4.5' Thread model: posix gcc version 4.4.5 (Gentoo 4.4.5
p1.2, pie-0.4.5) 


terminator test # gcc-4.5.2 -v
Using built-in specs.
COLLECT_GCC=gcc-4.5.2
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/hppa2.0-unknown-linux-gnu/4.5.2/lto-wrapper
Target: hppa2.0-unknown-linux-gnu
Configured
with: /var/tmp/portage/sys-devel/gcc-4.5.2/work/gcc-4.5.2/configure
--prefix=/usr --bindir=/usr/hppa2.0-unknown-linux-gnu/gcc-bin/4.5.2
--includedir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.2/include
--datadir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/4.5.2
--mandir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/4.5.2/man
--infodir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/4.5.2/info
--with-gxx-include-dir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.2/include/g++-v4
--host=hppa2.0-unknown-linux-gnu --build=hppa2.0-unknown-linux-gnu
--disable-altivec --disable-fixed-point --without-ppl --without-cloog
--disable-lto --enable-nls --without-included-gettext
--with-system-zlib --disable-werror --enable-secureplt
--disable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/hppa2.0-unknown-linux-gnu/4.5.2/python
--enable-checking=release --disable-libgcj
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.2
p1.0, pie-0.4.5' Thread model: posix gcc version 4.5.2 (Gentoo 4.5.2
p1.0, pie-0.4.5) 




Cheers,
  Guy
#include <unistd.h>

static int recurse (char *a)
 {
   char tmp[500];
   *tmp = *a + 1;
   return recurse(tmp);
 }

int main (void) {
   return recurse ("\1");
}

Attachment: conftest-4.5.s
Description: Binary data

Attachment: conftest-4.4.s
Description: Binary data


[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux