From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21920 invoked by alias); 11 Dec 2012 19:12:58 -0000 Received: (qmail 21804 invoked by uid 48); 11 Dec 2012 19:12:41 -0000 From: "david.abdurachmanov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55652] New: [C++11][4.8] ICE (segfault) with templates and structs Date: Tue, 11 Dec 2012 19:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: david.abdurachmanov at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg01148.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55652 Bug #: 55652 Summary: [C++11][4.8] ICE (segfault) with templates and structs Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: david.abdurachmanov@gmail.com Created attachment 28929 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28929 testcase used. Hi folks, I have started re-compiling my RPMs with GNU GCC 4.8.0 (revision 194323) to check the status. Below your will find the smallest test case I currently could produce showing setfault (ICE). Yet I am still not fully sure what is causing it. I compiles w/ C++03, but not w/ C++11. It also compiles w/ GCC 4.7.2. I am attaching *.ii. ## TESTCASE ## #include template struct P { T1 first; T2 second; P() : first(T1()), second(T2()) {} }; struct E { }; struct B { B(); B(const B &obj) throw(E); }; int main(void) { P > a; return 0; } ## COMPILE LINE ## g++ -v -save-temps -std=c++11 -c -o test.o ./test.cxx ## GCC OUTPUT ## ./test.cxx: In function 'int main()': ./test.cxx:19:25: internal compiler error: Segmentation fault P > a; ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. ## GCC FULL OUTPUT ## Using built-in specs. COLLECT_GCC=g++ Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/build/davidlt/gcc480/b/tmp/BUILDROOT/48f7c7c6aea9a202503cd9453105a971/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0 --disable-multilib --disable-nls --enable-languages=c,c++,fortran --enable-gold=yes --enable-lto --with-gmp=/build/davidlt/gcc480/b/tmp/BUILDROOT/48f7c7c6aea9a202503cd9453105a971/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0 --with-mpfr=/build/davidlt/gcc480/b/tmp/BUILDROOT/48f7c7c6aea9a202503cd9453105a971/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0 --with-mpc=/build/davidlt/gcc480/b/tmp/BUILDROOT/48f7c7c6aea9a202503cd9453105a971/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0 --with-isl=/build/davidlt/gcc480/b/tmp/BUILDROOT/48f7c7c6aea9a202503cd9453105a971/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0 --with-cloog=/build/davidlt/gcc480/b/tmp/BUILDROOT/48f7c7c6aea9a202503cd9453105a971/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0 --disable-isl-version-check --enable-shared CC='gcc -fPIC' CXX='c++ -fPIC' CPP=cpp CXXCPP='c++ -E' Thread model: posix gcc version 4.8.0 20121208 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-c' '-o' 'test.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -E -quiet -v -iprefix /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/ -D_GNU_SOURCE ./test.cxx -mtune=generic -march=x86-64 -std=c++11 -fpch-preprocess -o test.ii ignoring nonexistent directory "/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include" ignoring duplicate directory "/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0" ignoring duplicate directory "/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu" ignoring duplicate directory "/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward" ignoring duplicate directory "/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include" ignoring duplicate directory "/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed" ignoring nonexistent directory "/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0 /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed /usr/local/include /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../include /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-c' '-o' 'test.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -fpreprocessed test.ii -quiet -dumpbase test.cxx -mtune=generic -march=x86-64 -auxbase-strip test.o -std=c++11 -version -o test.s GNU C++ (GCC) version 4.8.0 20121208 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.8.0 20121208 (experimental), GMP version 5.0.5, MPFR version 3.1.1, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU C++ (GCC) version 4.8.0 20121208 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.8.0 20121208 (experimental), GMP version 5.0.5, MPFR version 3.1.1, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 7710cb843e8b8b547eb436a388da025f ./test.cxx: In function 'int main()': ./test.cxx:19:25: internal compiler error: Segmentation fault P > a; ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions.