Hi gcc-4.7 seems to segfault when compiling digikam ( A KDE Photo management app ). Relevant information as requested : Output of gcc -v : Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.0-12ubuntu1' --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 --disable-werror --with-arch-32=i686 --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.7.0 (Ubuntu/Linaro 4.7.0-12ubuntu1) Partial build log : [ 28%] Building CXX object extra/kipi-plugins/panorama/CMakeFiles/libpanorama.dir/ptoparser/ptoparser.cpp.o cd /tmp/buildd/digikam-2.6.0/obj-x86_64-linux-gnu/extra/kipi-plugins/panorama && /usr/lib/ccache/c++ -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=11 -DKDE_DEFAULT_DEBUG_AREA=51000 -DAREA_CODE_GENERAL=51000 -DAREA_CODE_LOADING=51001 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -DNDEBUG -DQT_NO_DEBUG -I/tmp/buildd/digikam-2.6.0/obj-x86_64-linux-gnu/extra/kipi-plugins/panorama -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/common/libkipiplugins -I/tmp/buildd/digikam-2.6.0/obj-x86_64-linux-gnu/extra/kipi-plugins/common/libkipiplugins -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/common/libkipiplugins/dialogs -I/tmp/buildd/digikam-2.6.0/obj-x86_64-linux-gnu/extra/kipi-plugins/common/libkipiplugins/dialogs -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/common/libkipiplugins/widgets -I/tmp/buildd/digikam-2.6.0/obj-x86_64-linux-gnu/extra/kipi-plugins/common/libkipiplugins/widgets -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/common/libkipiplugins/tools -I/tmp/buildd/digikam-2.6.0/obj-x86_64-linux-gnu/extra/kipi-plugins/common/libkipiplugins/tools -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/common/libkipiplugins/tools/threads -I/tmp/buildd/digikam-2.6.0/obj-x86_64-linux-gnu/extra/kipi-plugins/common/libkipiplugins/tools/threads -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/common/libkipiplugins/tools/imageio -I/tmp/buildd/digikam-2.6.0/obj-x86_64-linux-gnu/extra/kipi-plugins/common/libkipiplugins/tools/imageio -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/importwizard -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/manager -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/plugin -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/ptoparser -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/ptotype -I/tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/tasks -I/usr/include/opencv -I/usr/include/KDE -I/usr/include/qt4/phonon -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4/QtDBus -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4 -I/usr/include/boost -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -fexceptions -UQT_NO_EXCEPTIONS -fPIC -o CMakeFiles/libpanorama.dir/ptoparser/ptoparser.cpp.o -c /tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/ptoparser/ptoparser.cpp In file included from /usr/include/boost/spirit/home/qi/detail/parse_auto.hpp:14:0, from /usr/include/boost/spirit/home/qi/auto.hpp:16, from /usr/include/boost/spirit/home/qi.hpp:15, from /usr/include/boost/spirit/include/qi.hpp:16, from /tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/ptoparser/common.h:47, from /tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/ptoparser/ptoparser.h:35 from /tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/ptoparser/ptoparser.cpp:51 /usr/include/boost/spirit/home/qi/parse.hpp: In instantiation of 'struct boost::spirit::qi::phrase_parse(Iterator&, Iterator, const Expr&, const Skipper&, boost::spirit::qi::skip_flag::enum_type, Attr&) [with Iterator = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >; Expr = KIPIPanoramaPlugin::PtoParser::ptoGrammar<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > >; Skipper = boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::spirit::tag::char_code<boost::spirit::tag::blank, boost::spirit::char_encoding::ascii> >, 0l>; Attr = KIPIPanoramaPlugin::PTOType]::err /usr/include/boost/spirit/home/qi/parse.hpp:155:416: required from 'bool boost::spirit::qi::phrase_parse(Iterator&, Iterator, const Expr&, const Skipper&, boost::spirit::qi::skip_flag::enum_type, Attr&) [with Iterator = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >; Expr = KIPIPanoramaPlugin::PtoParser::ptoGrammar<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > >; Skipper = boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::spirit::tag::char_code<boost::spirit::tag::blank, boost::spirit::char_encoding::ascii> >, 0l>; Attr = KIPIPanoramaPlugin::PTOType]' /usr/include/boost/spirit/home/qi/parse.hpp:197:86: required from 'bool boost::spirit::qi::phrase_parse(Iterator&, Iterator, const Expr&, const Skipper&, Attr&) [with Iterator = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >; Expr = KIPIPanoramaPlugin::PtoParser::ptoGrammar<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > >; Skipper = boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::spirit::tag::char_code<boost::spirit::tag::blank, boost::spirit::char_encoding::ascii> >, 0l>; Attr = KIPIPanoramaPlugin::PTOType]' /tmp/buildd/digikam-2.6.0/extra/kipi-plugins/panorama/ptoparser/ptoparser.cpp:158:122: required from here /usr/include/boost/spirit/home/qi/parse.hpp:155:188: 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/ccCRdbio.out file, please attach this to your bugreport. make[3]: *** [extra/kipi-plugins/panorama/CMakeFiles/libpanorama.dir/ptoparser/ptoparser.cpp.o] Error Full build logs and preprocessed file have been attached
Seems like my files are too large to be attached, hence you can find them here http://people.ubuntu.com/~rohangarg/gcc/
(In reply to comment #1) > Seems like my files are too large to be attached, hence you can find them here > http://people.ubuntu.com/~rohangarg/gcc/ They need to be attached, but you can also attach a compressed version.
(In reply to comment #2) > (In reply to comment #1) > > Seems like my files are too large to be attached, hence you can find them here > > http://people.ubuntu.com/~rohangarg/gcc/ > > They need to be attached, but you can also attach a compressed version. Or better still read http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction . I cannot reproduce the ICE on recent 4.7 branch.
Created attachment 27596 [details] Build log and preprocessed source
(In reply to comment #2) > (In reply to comment #1) > > Seems like my files are too large to be attached, hence you can find them here > > http://people.ubuntu.com/~rohangarg/gcc/ > > They need to be attached, but you can also attach a compressed version. Done
The attached testcase crashes in determine_visibility. 4.8 is also affected. Here is an ugly testcase: markus@x4 /tmp % cat test.ii template<typename>class H; template<typename _CharT, typename = int, typename = H<_CharT> >class A; template<typename _Iterator>struct B { B(const _Iterator&); }; template<typename _Tp>struct C { typedef _Tp *const_pointer; template<typename>struct D { typedef C other; }; }; template<typename _Tp>class H : public C<_Tp>{}; template<typename _CharT, typename _Traits, typename _Alloc>class A { typedef typename _Alloc::template D<_CharT>::other _CharT_alloc_type; public: typedef typename _CharT_alloc_type::const_pointer const_pointer; typedef B<const_pointer> const_iterator; }; int blank; template<typename Iterator, typename Expr, typename Skipper, typename Attr>bool phrase_parse(Iterator, Expr, Skipper, Attr&) { struct error_invalid_expression; typedef struct { int *error_invalid_expression::*assert_arg; } mpl_assert_arg156; enum { mpl_assertion_in_line_156 = mpl_assert_arg156::assert_arg }; } class F { bool parseFile(); struct G; }; struct F::G { static int ptoParser; }; bool F::parseFile() { A<int>::const_iterator iter = 0, last = 0; bool result = phrase_parse(iter, last, G::ptoParser, blank); return result; } markus@x4 /tmp % g++ test.ii test.ii: In instantiation of ‘struct phrase_parse(Iterator, Expr, Skipper, Attr&) [with Iterator = B<int*>; Expr = B<int*>; Skipper = int; Attr = int]::mpl_assert_arg156’: test.ii:33:3: required from ‘bool phrase_parse(Iterator, Expr, Skipper, Attr&) [with Iterator = B<int*>; Expr = B<int*>; Skipper = int; Attr = int]’ test.ii:47:77: required from here test.ii:27:37: internal compiler error: Segmentation fault int *error_invalid_expression::*assert_arg; ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
Sounds like dup of PR53599. *** This bug has been marked as a duplicate of bug 53599 ***