public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line @ 2008-04-04 21:29 gcc at cohi dot at 2008-04-04 21:31 ` [Bug c++/35828] " gcc at cohi dot at ` (10 more replies) 0 siblings, 11 replies; 12+ messages in thread From: gcc at cohi dot at @ 2008-04-04 21:29 UTC (permalink / raw) To: gcc-bugs Just got an ICE while compiling some template-heavy C++ code; as shown below, the error is reported in parse_debug.hh, however the last change to the code, the one that triggered the ICE, was in parse_printer.hh (I split class printer into two classes, printer and printer_impl). I'll add the preprocessed file in a separate comment/file. > uname -a Darwin tigger.local 9.2.2 Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386 i386 i386 MacBookPro3,1 Darwin > g++-mp-4.3 -v Using built-in specs. Target: i386-apple-darwin9.2.0 Configured with: ../gcc-4.3.0/configure --prefix=/opt/macports-1.6.0 --enable-languages=c,c++,objc,obj-c++,java,fortran --libdir=/opt/macports-1.6.0/lib/gcc43 --includedir=/opt/macports-1.6.0/include/gcc43 --infodir=/opt/macports-1.6.0/share/info --mandir=/opt/macports-1.6.0/share/man --with-local-prefix=/opt/macports-1.6.0 --with-system-zlib --disable-nls --program-suffix=-mp-4.3 --with-gxx-include-dir=/opt/macports-1.6.0/include/gcc43/c++/ --with-gmp=/opt/macports-1.6.0 --with-mpfr=/opt/macports-1.6.0 Thread model: posix gcc version 4.3.0 (GCC) > g++-mp-4.3 -I. -std=gnu++0x -D_REENTRANT -pipe -O3 -Wall -Wextra -Wimplicit -Wconversion -Wcast-align -Woverloaded-virtual -Wold-style-cast -Wformat=2 -Wswitch-enum -Wswitch-default -Wredundant-decls -fno-enforce-eh-specs -fno-strict-overflow -lpthread calculator.cc -o calculator ./parse_debug.hh: In function 'int main(int, char**)': ./parse_debug.hh:101: internal compiler error: Bus error Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE on template-heavy C++ code, reported in innocent source line Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at cohi dot at GCC host triplet: i386-apple-darwin9.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] ICE on template-heavy C++ code, reported in innocent source line 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at @ 2008-04-04 21:31 ` gcc at cohi dot at 2008-04-04 21:44 ` gcc at cohi dot at ` (9 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: gcc at cohi dot at @ 2008-04-04 21:31 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from gcc at cohi dot at 2008-04-04 21:30 ------- Created an attachment (id=15430) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15430&action=view) The file that triggered the ICE (preprocessed). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] ICE on template-heavy C++ code, reported in innocent source line 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at 2008-04-04 21:31 ` [Bug c++/35828] " gcc at cohi dot at @ 2008-04-04 21:44 ` gcc at cohi dot at 2008-04-08 8:32 ` gcc at cohi dot at ` (8 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: gcc at cohi dot at @ 2008-04-04 21:44 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from gcc at cohi dot at 2008-04-04 21:44 ------- Looking for a workaround I noticed that the ICE might actually be in connection with the template template arguments of the overloaded functions pegtl::parse() ... it's the only place where template template arguments were used, I had introduced them shortly before the ICE, and the ICE only went away after I removed them... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] ICE on template-heavy C++ code, reported in innocent source line 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at 2008-04-04 21:31 ` [Bug c++/35828] " gcc at cohi dot at 2008-04-04 21:44 ` gcc at cohi dot at @ 2008-04-08 8:32 ` gcc at cohi dot at 2008-04-08 8:35 ` [Bug c++/35828] ICEs in template-heavy C++0x code gcc at cohi dot at ` (7 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: gcc at cohi dot at @ 2008-04-08 8:32 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from gcc at cohi dot at 2008-04-08 08:31 ------- Created an attachment (id=15445) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15445&action=view) Here's the preprocessed source for a similar bug that might be related. > g++-mp-4.3 -save-temps -I. -std=gnu++0x -D_REENTRANT -pipe -g -O3 -Wall -Wextra -Wimplicit -Wconversion -Wcast-align -Woverloaded-virtual -Wold-style-cast -Wformat=2 -Wswitch-enum -Wswitch-default -Wredundant-decls -fno-enforce-eh-specs -fno-strict-overflow -lpthread scheme.cc -o scheme g++-mp-4.3: warning: -pipe ignored because -save-temps specified ./rules_generic.hh: In instantiation of 'pegtl::seq_min_impl1<pegtl::type_list<scheme::nested_comment>, scheme::comment_text>': ./rules_generic.hh:199: instantiated from 'const size_t pegtl::seq_min_impl2<false, pegtl::type_list<>, scheme::nested_comment, scheme::comment_text>::min' ./rules_generic.hh:211: instantiated from 'const size_t pegtl::seq_min_impl1<pegtl::type_list<scheme::nested_comment>, scheme::comment_text>::min' ./rules_generic.hh:223: instantiated from 'const size_t pegtl::seq<scheme::nested_comment, scheme::comment_text>::min' ./rules_generic.hh:104: instantiated from 'pegtl::star<scheme::comment_cont>' ./parse_debugger.hh:214: instantiated from 'bool pegtl::trace_debug::match(Input&, Class&& ...) [with Rule = pegtl::star<scheme::comment_cont>, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./rules_generic.hh:242: instantiated from 'static bool pegtl::seq<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = pegtl::star<scheme::comment_cont>, Rules = pegtl::string<124, 35>]' ./rules_generic.hh:242: instantiated from 'static bool pegtl::seq<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = scheme::comment_text, Rules = pegtl::star<scheme::comment_cont>, pegtl::string<124, 35>]' ./parse_debugger.hh:214: instantiated from 'bool pegtl::trace_debug::match(Input&, Class&& ...) [with Rule = pegtl::seq<scheme::comment_text, pegtl::star<scheme::comment_cont>, pegtl::string<124, 35> >, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./rules_generic.hh:242: instantiated from 'static bool pegtl::seq<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = pegtl::seq<scheme::comment_text, pegtl::star<scheme::comment_cont>, pegtl::string<124, 35> >, Rules = ]' ./rules_generic.hh:242: instantiated from 'static bool pegtl::seq<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = pegtl::string<35, 124>, Rules = pegtl::seq<scheme::comment_text, pegtl::star<scheme::comment_cont>, pegtl::string<124, 35> >]' ./parse_debugger.hh:227: instantiated from 'bool pegtl::trace_debug::match(bool, Input&, Class&& ...) [with Rule = scheme::nested_comment, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./rules_generic.hh:183: instantiated from 'static bool pegtl::sor<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = scheme::nested_comment, Rules = pegtl::seq<pegtl::string<35, 59>, scheme::interlexeme_space, scheme::datum>, pegtl::string<35, 33, 114, 54, 114, 115>]' ./rules_generic.hh:183: instantiated from 'static bool pegtl::sor<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = pegtl::seq<pegtl::one<59>, pegtl::until_eol>, Rules = scheme::nested_comment, pegtl::seq<pegtl::string<35, 59>, scheme::interlexeme_space, scheme::datum>, pegtl::string<35, 33, 114, 54, 114, 115>]' ./parse_debugger.hh:227: instantiated from 'bool pegtl::trace_debug::match(bool, Input&, Class&& ...) [with Rule = scheme::comment, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./rules_generic.hh:183: instantiated from 'static bool pegtl::sor<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = scheme::comment, Rules = ]' ./rules_generic.hh:183: instantiated from 'static bool pegtl::sor<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = scheme::whitespace, Rules = scheme::comment]' ./parse_debugger.hh:227: instantiated from 'bool pegtl::trace_debug::match(bool, Input&, Class&& ...) [with Rule = scheme::interlexeme_space, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./rules_generic.hh:124: instantiated from 'static bool pegtl::star<Rule>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = scheme::interlexeme_space]' ./parse_debugger.hh:214: instantiated from 'bool pegtl::trace_debug::match(Input&, Class&& ...) [with Rule = pegtl::star<scheme::interlexeme_space>, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./rules_generic.hh:242: instantiated from 'static bool pegtl::seq<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = pegtl::star<scheme::interlexeme_space>, Rules = pegtl::seq<pegtl::seq<pegtl::one<35>, pegtl::list<116, 84, 102, 70> >, pegtl::at<scheme::delimiter> >, pegtl::star<scheme::interlexeme_space>]' ./parse_debugger.hh:227: instantiated from 'bool pegtl::trace_debug::match(bool, Input&, Class&& ...) [with Rule = scheme::boolean, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./rules_generic.hh:183: instantiated from 'static bool pegtl::sor<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = scheme::boolean, Rules = scheme::number, scheme::character, scheme::string, scheme::symbol]' ./parse_debugger.hh:227: instantiated from 'bool pegtl::trace_debug::match(bool, Input&, Class&& ...) [with Rule = scheme::lexeme_datum, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./rules_generic.hh:183: instantiated from 'static bool pegtl::sor<Rule, Rules ...>::s_match(Input&, Debug&, Class&& ...) [with Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = , Rule = scheme::lexeme_datum, Rules = scheme::compound_datum]' ./parse_debugger.hh:227: instantiated from 'bool pegtl::trace_debug::match(bool, Input&, Class&& ...) [with Rule = scheme::datum, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./parse_generic.hh:18: instantiated from 'bool pegtl::parse(Input&, Debug&, Class&& ...) [with TopRule = scheme::datum, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Debug = pegtl::trace_debug, Class = ]' ./parse_generic.hh:46: instantiated from 'bool pegtl::trace_parse(bool, Input&, Class&& ...) [with TopRule = scheme::datum, Input = pegtl::iterator_input<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, pegtl::ascii_location>, Class = ]' ./parse_string.hh:47: instantiated from 'bool pegtl::trace_parse_file(bool, const std::string&, Class&& ...) [with TopRule = scheme::datum, Location = pegtl::ascii_location, Class = ]' scheme.cc:295: instantiated from here ./rules_generic.hh:211: internal compiler error: in finish_member_declaration, at cp/semantics.c:2319 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] ICEs in template-heavy C++0x code 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at ` (2 preceding siblings ...) 2008-04-08 8:32 ` gcc at cohi dot at @ 2008-04-08 8:35 ` gcc at cohi dot at 2008-04-08 10:56 ` gcc at cohi dot at ` (6 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: gcc at cohi dot at @ 2008-04-08 8:35 UTC (permalink / raw) To: gcc-bugs -- gcc at cohi dot at changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |blocker Summary|ICE on template-heavy C++ |ICEs in template-heavy C++0x |code, reported in innocent |code |source line | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] ICEs in template-heavy C++0x code 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at ` (3 preceding siblings ...) 2008-04-08 8:35 ` [Bug c++/35828] ICEs in template-heavy C++0x code gcc at cohi dot at @ 2008-04-08 10:56 ` gcc at cohi dot at 2008-12-28 22:13 ` [Bug c++/35828] [C++0x] ICE on default template template parameter in template function reichelt at gcc dot gnu dot org ` (5 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: gcc at cohi dot at @ 2008-04-08 10:56 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from gcc at cohi dot at 2008-04-08 10:55 ------- The second example could be related with a recursive template, more precisely the templates seq_min_impl1 and seq_min_impl2 together perform a template meta-programming "recursive walk" of a template structure, in order to define their respective "const static size_t min" members. In the second example the template structure is recursive, i.e. while trying to determine seq_min_impl1< ... >::min for some template parameters the compiler will reach a point where that value, through some steps, depends on itself. (The meta-programming in the code included is a first step towards eliminating the recursion.) In other words: If my current understanding of my code is correct, the ICE from scheme.ii should be an error message. -- gcc at cohi dot at changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |major http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] [C++0x] ICE on default template template parameter in template function 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at ` (4 preceding siblings ...) 2008-04-08 10:56 ` gcc at cohi dot at @ 2008-12-28 22:13 ` reichelt at gcc dot gnu dot org 2009-04-20 17:51 ` gcc at abeckmann dot de ` (4 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: reichelt at gcc dot gnu dot org @ 2008-12-28 22:13 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from reichelt at gcc dot gnu dot org 2008-12-28 22:11 ------- Confirmed. Reduced testcase for comment #1: ===================================================================== template<typename> struct A; template<typename, template<typename> class = A> void foo(); void bar() { foo<int>(); } ===================================================================== bug.cc: In function 'void bar()': bug.cc:1: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] Removing the first template parameter yields a different error: ===================================================================== template<typename> struct A; template<template<typename> class = A> void foo(); void bar() { foo(); } ===================================================================== bug.cc: In function 'void bar()': bug.cc:1: internal compiler error: in tsubst_decl, at cp/pt.c:7958 Please submit a full bug report, [etc.] -- reichelt at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |reichelt at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-12-28 22:11:55 date| | Summary|ICEs in template-heavy C++0x|[C++0x] ICE on default |code |template template parameter | |in template function http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] [C++0x] ICE on default template template parameter in template function 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at ` (5 preceding siblings ...) 2008-12-28 22:13 ` [Bug c++/35828] [C++0x] ICE on default template template parameter in template function reichelt at gcc dot gnu dot org @ 2009-04-20 17:51 ` gcc at abeckmann dot de 2009-04-22 23:55 ` pinskia at gcc dot gnu dot org ` (3 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: gcc at abeckmann dot de @ 2009-04-20 17:51 UTC (permalink / raw) To: gcc-bugs [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1969 bytes --] ------- Comment #6 from gcc at abeckmann dot de 2009-04-20 17:51 ------- I stumbled across this ICE on a very similar testcase (on 4.3.4, 4.4.0, 4.5.0): ---------- 8< ---------- template < typename > struct A ; template < template < typename > class = A > void test () { test (); } ---------- >8 ---------- =========== 4.4.0 ========== $ x86_64-linux-gnu-g++-4.4.x -v -std=c++0x -c ice-in-tsubst_decl-cp_pt_c_8101.min.ii Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4_4-branch/configure --prefix=/opt/software/gcc-x86_64/gcc-4.4.x --program-suffix=-4.4.x --enable-languages=c,c++ --enable-checking Thread model: posix gcc version 4.4.0 20090413 (prerelease) (GCC) COLLECT_GCC_OPTIONS='-v' '-std=c++0x' '-c' '-shared-libgcc' '-mtune=generic' /opt/software/gcc-x86_64/gcc-4.4.x/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/cc1plus -fpreprocessed ice-in-tsubst_decl-cp_pt_c_8101.min.ii -quiet -dumpbase ice-in-tsubst_decl-cp_pt_c_8101.min.ii -mtune=generic -auxbase ice-in-tsubst_decl-cp_pt_c_8101.min -std=c++0x -version -o /tmp/ccAHdc5J.s GNU C++ (GCC) version 4.4.0 20090413 (prerelease) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.0 20090413 (prerelease), GMP version 4.2.2, MPFR version 2.3.1. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 4c95a5cf24794a394976148039ecc611 ice-in-tsubst_decl-cp_pt_c_8101.min.ii: In function void test(): ice-in-tsubst_decl-cp_pt_c_8101.min.ii:1: internal compiler error: in tsubst_decl, at cp/pt.c:8101 =========================== I also got the segmentation fault on this similar testcase, reported as bug #39822 before seeing this report: ---------- 8< ---------- template < typename > struct A ; template < typename X, template < typename > class = A > void test ( X ) { A < int > T ; test ( T ) ; } ---------- >8 ---------- -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] [C++0x] ICE on default template template parameter in template function 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at ` (6 preceding siblings ...) 2009-04-20 17:51 ` gcc at abeckmann dot de @ 2009-04-22 23:55 ` pinskia at gcc dot gnu dot org 2009-07-07 22:04 ` jason at gcc dot gnu dot org ` (2 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: pinskia at gcc dot gnu dot org @ 2009-04-22 23:55 UTC (permalink / raw) To: gcc-bugs ------- Comment #7 from pinskia at gcc dot gnu dot org 2009-04-22 23:55 ------- *** Bug 39822 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] [C++0x] ICE on default template template parameter in template function 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at ` (7 preceding siblings ...) 2009-04-22 23:55 ` pinskia at gcc dot gnu dot org @ 2009-07-07 22:04 ` jason at gcc dot gnu dot org 2009-07-07 22:11 ` jason at gcc dot gnu dot org 2009-07-07 22:16 ` jason at gcc dot gnu dot org 10 siblings, 0 replies; 12+ messages in thread From: jason at gcc dot gnu dot org @ 2009-07-07 22:04 UTC (permalink / raw) To: gcc-bugs ------- Comment #8 from jason at gcc dot gnu dot org 2009-07-07 22:04 ------- Subject: Bug 35828 Author: jason Date: Tue Jul 7 22:03:42 2009 New Revision: 149351 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149351 Log: PR c++/35828 * pt.c (tsubst_decl): Don't abort if we didn't change anything in a TEMPLATE_DECL's args. Added: trunk/gcc/testsuite/g++.dg/template/defarg12.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] [C++0x] ICE on default template template parameter in template function 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at ` (8 preceding siblings ...) 2009-07-07 22:04 ` jason at gcc dot gnu dot org @ 2009-07-07 22:11 ` jason at gcc dot gnu dot org 2009-07-07 22:16 ` jason at gcc dot gnu dot org 10 siblings, 0 replies; 12+ messages in thread From: jason at gcc dot gnu dot org @ 2009-07-07 22:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #9 from jason at gcc dot gnu dot org 2009-07-07 22:11 ------- Subject: Bug 35828 Author: jason Date: Tue Jul 7 22:11:31 2009 New Revision: 149353 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149353 Log: PR c++/35828 * pt.c (tsubst_decl): Don't abort if we didn't change anything in a TEMPLATE_DECL's args. Added: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/defarg12.C - copied unchanged from r149351, trunk/gcc/testsuite/g++.dg/template/defarg12.C Modified: branches/gcc-4_4-branch/gcc/ (props changed) branches/gcc-4_4-branch/gcc/ChangeLog-2008 (props changed) branches/gcc-4_4-branch/gcc/cp/ChangeLog branches/gcc-4_4-branch/gcc/cp/ChangeLog-2007 (props changed) branches/gcc-4_4-branch/gcc/cp/ChangeLog-2008 (props changed) branches/gcc-4_4-branch/gcc/cp/pt.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog branches/gcc-4_4-branch/gcc/testsuite/ChangeLog-2008 (props changed) branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ (props changed) branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C (props changed) branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/torture/pr36227.c (props changed) branches/gcc-4_4-branch/gcc/testsuite/gcc.target/x86_64/abi/callabi/ (props changed) Propchange: branches/gcc-4_4-branch/gcc/ ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/ChangeLog-2008 ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/cp/ChangeLog-2007 ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/cp/ChangeLog-2008 ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/ChangeLog-2008 ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/torture/pr36227.c ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/gcc.target/x86_64/abi/callabi/ ('svn:mergeinfo' modified) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35828] [C++0x] ICE on default template template parameter in template function 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at ` (9 preceding siblings ...) 2009-07-07 22:11 ` jason at gcc dot gnu dot org @ 2009-07-07 22:16 ` jason at gcc dot gnu dot org 10 siblings, 0 replies; 12+ messages in thread From: jason at gcc dot gnu dot org @ 2009-07-07 22:16 UTC (permalink / raw) To: gcc-bugs ------- Comment #10 from jason at gcc dot gnu dot org 2009-07-07 22:16 ------- Fixed for 4.4.1. -- jason at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Target Milestone|--- |4.4.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35828 ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-07-07 22:16 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-04-04 21:29 [Bug c++/35828] New: ICE on template-heavy C++ code, reported in innocent source line gcc at cohi dot at 2008-04-04 21:31 ` [Bug c++/35828] " gcc at cohi dot at 2008-04-04 21:44 ` gcc at cohi dot at 2008-04-08 8:32 ` gcc at cohi dot at 2008-04-08 8:35 ` [Bug c++/35828] ICEs in template-heavy C++0x code gcc at cohi dot at 2008-04-08 10:56 ` gcc at cohi dot at 2008-12-28 22:13 ` [Bug c++/35828] [C++0x] ICE on default template template parameter in template function reichelt at gcc dot gnu dot org 2009-04-20 17:51 ` gcc at abeckmann dot de 2009-04-22 23:55 ` pinskia at gcc dot gnu dot org 2009-07-07 22:04 ` jason at gcc dot gnu dot org 2009-07-07 22:11 ` jason at gcc dot gnu dot org 2009-07-07 22:16 ` jason at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).