Bug 53658 - internal compiler error -- segmentation fault
Summary: internal compiler error -- segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.9.0
Assignee: Paolo Carlini
URL:
Keywords:
: 60210 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-13 15:29 UTC by Philipp Büttgenbach
Modified: 2014-05-13 16:39 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-06-14 00:00:00


Attachments
Preprocessed source (556.71 KB, application/x-gzip)
2012-06-13 15:29 UTC, Philipp Büttgenbach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Büttgenbach 2012-06-13 15:29:39 UTC
Created attachment 27616 [details]
Preprocessed source

Hello,

I'm using g++ 4.7:

Using built-in specs.
COLLECT_GCC=g++-4.7
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.0-8' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.0 (Debian 4.7.0-8) 

I encounter an ICE when running:

/tmp$ gunzip ccDalx3O.i.gz
/tmp$ LANG=C g++-4.7 -std=c++11 -Wall -c ccDalx3O.i 
In file included from ../src/structured_grid.hpp:47:0,
                 from test_neumann.cpp:34:
../src/boundary.hpp:775:34: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccurVmfw.out file, please attach this to your bugreport.


Kind regards,

Philipp
Comment 1 Markus Trippelsdorf 2012-06-13 17:07:13 UTC
Reduced:

 % cat test.ii
struct A;
template <typename> using Foo = const A;
template <typename Item> Foo <Item>;

 % c++ -std=c++11 test.ii
test.ii:3:35: internal compiler error: Segmentation fault
 template <typename Item> Foo <Item>;
                                   ^
Please submit a full bug report,
with preprocessed source if appropriate.
Comment 2 Markus Trippelsdorf 2012-06-14 07:04:54 UTC
(In reply to comment #1)
> Reduced:
> 
>  % cat test.ii
> struct A;
> template <typename> using Foo = const A;
> template <typename Item> Foo <Item>;
                                    ^^    
If one adds "bar()" to the last line above, then clang++ and Intel's icpc
compile it without problems, while gcc still crashes.
Comment 3 Jakub Jelinek 2012-06-14 07:44:59 UTC
Seems this ICEs since template alias support has been checked in:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181118
Before that it has been rejected.
Comment 4 Paolo Carlini 2013-06-07 00:36:42 UTC
Mine.
Comment 5 Paolo Carlini 2013-06-07 08:35:05 UTC
Fixed for 4.9.0.
Comment 6 Paolo Carlini 2014-05-13 16:39:32 UTC
*** Bug 60210 has been marked as a duplicate of this bug. ***