Bug 46071 - [C++0x] ill-formed use of decltype and auto causes segfault
Summary: [C++0x] ill-formed use of decltype and auto causes segfault
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.5.1
: P3 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2010-10-18 17:54 UTC by Ennio Barbaro
Modified: 2011-05-25 21:19 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.7.0
Known to fail: 4.4.4, 4.5.2, 4.6.0
Last reconfirmed: 2010-10-18 18:23:23


Attachments
preprocessed code (180 bytes, text/plain)
2010-10-18 17:54 UTC, Ennio Barbaro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ennio Barbaro 2010-10-18 17:54:55 UTC
Created attachment 22080 [details]
preprocessed code

Hi all,

The attached code causes a segfault in gcc 4.5.1 (Debian 4.5.1-9), maybe an infinite recursion of decltype?

my system is a debian testing (kernel 2-6.32-5-amd64)

gcc configuration options:

Target: x86_64-linux-gnu                                                                                                      
Configured with: ../src/configure -v --with-pkgversion='Debian 4.5.1-9' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --with-plugin-ld=ld.gold --enable-objc-gc --with-arch-32=i586 --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.5.1 (Debian 4.5.1-9)   

command line and output:
gcc-4.5 -std=c++0x bug.cpp                                                                                        
gcc-4.5: Internal error: Segmentation fault (program cc1plus)                                                                 
Please submit a full bug report.                                                                                              
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.

Ennio
Comment 1 Paolo Carlini 2011-05-16 21:20:25 UTC
Jason, this doesn't ICE anymore in mainline, I guess thanks to your recent work. Shall we close it as fixed / dup ?
Comment 2 Paolo Carlini 2011-05-25 21:19:00 UTC
Fixed.