[Bug c/66903] The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ... ))

2015-07-19 Thread speirofr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66903

--- Comment #4 from Salva Peiró speirofr at gmail dot com ---
Confirmed, the cause of the crash is the parser 
_cpp_lex_direct() consuming the default 8 MB Linux stack.

Indeed, ulimit -s shows the stack size limit is set to 8192 KB,
After recompiling with ulimit -s unlimited, the gcc compilation 
succeeds without crashes.

Thanks for the explanation  the time to look at this,
PS: I raised the issue mainly because I was unsure of causes that lead to the
crash.

[Bug c/66903] New: The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ... ))

2015-07-17 Thread speirofr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66903

Bug ID: 66903
   Summary: The gcc 4.9.2 crashes when processing declarations
such as: int (( ... (x) ... ))
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: speirofr at gmail dot com
  Target Milestone: ---

The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ...
)), with the number of parens  400.


[Bug c/66903] The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ... ))

2015-07-17 Thread speirofr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66903

--- Comment #1 from Salva Peiró speirofr at gmail dot com ---
Created attachment 36001
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36001action=edit
parens.i: Preprocesed sourced with gcc -v -save-temps

[Bug c/66903] The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ... ))

2015-07-17 Thread speirofr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66903

--- Comment #2 from Salva Peiró speirofr at gmail dot com ---

$ gcc parens.c 
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.9/README.Bugs for instructions.
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)