Hi, compiling a specific C++ code keeps de GCC 4.4.2 compiler hanging forever (or at least > 10 hours). Note that the c++ compiler works perfectly for the other c++ sources (>1000) Unfortunately I cannot provide the C++ as-is because of company policy. But I did some anlysis myself, hope you can help me further with this info.
These are the steps I took: - I generated a file with the preprocessed output and this file was identical with the one generated by my previous compiler (GCC 4.1.2/Solaris 8) - Compiling the preprocessed file with the 4.4.2 compiler did (of course) again fail with a hanging cc1plus process. Compiling the same preprocessed file with the 4.1.2 compiler did not cause any problems - I did try it to compile the preprocessed file with different optimizations with/without debug info but none of them were succesfull with the 4.4.2 compiler - Using different compilations of the compiler itself did not help either - I could reproduce it on bot solaris 8 & 10 - I could find out on which location in the preprocessed file the Compiler hangs. However if I for example reorder this file the compiler hangs on a different location, so this doesn't help the analysis either :-( - Next I forced a coredump of the hanging proces and I opened with GDB: Core was generated by `/sft/teamsdoc/sds_group/rjeurnin/gcc_cadenv/SunOS_5.8/gcc/gcc-4.4.2-B3/libexec/'. [New process 76177 ] #0 strip_array_types (type=0xfee91520) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/tree.c:5814 5814 while (TREE_CODE (type) == ARRAY_TYPE) - A backtrace gave: #0 strip_array_types (type=0xfee91520) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/tree.c:5814 #1 0x000dffb4 in cp_type_quals (type=0xfe1b3f48) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/typeck.c:7212 #2 0x0010e220 in cp_build_qualified_type_real (type=0xf865f588, type_quals=1, complain=<value optimized out>) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/tree.c:783 #3 0x0008111c in grokdeclarator (declarator=0x7a4398, declspecs=0x7a43bc, decl_context=PARM, initialized=0, attrlist=0x7a43fc) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/decl.c:8102 #4 0x000d1924 in cp_parser_parameter_declaration_list (parser=0xfef8d0a0, is_error=0xffbee42f "") at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/parser.c:14063 #5 0x000d222c in cp_parser_declarator (parser=0xfef8d0a0, dcl_kind=CP_PARSER_DECLARATOR_NAMED, ctor_dtor_or_conv_p=0xffbee498, parenthesized_p=<value optimized out>, member_p=0 '\0') at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/parser.c:13982 #6 0x000d7c2c in cp_parser_init_declarator (parser=0xfef8d0a0, decl_specifiers=0xffbee508, checks=0x0, function_definition_allowed_p=1 '\001', member_p=0 '\0', declares_class_or_enum=0, function_definition_p=0xffbee55f "") at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/parser.c:12661 #7 0x000d8694 in cp_parser_simple_declaration (parser=0xfef8d0a0, function_definition_allowed_p=1 '\001') at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/parser.c:8240 #8 0x000dca18 in cp_parser_declaration (parser=0xfef8d0a0) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/parser.c:8043 #9 0x000dc208 in cp_parser_declaration_seq_opt (parser=0xfef8d0a0) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/parser.c:7934 #10 0x000dc520 in c_parse_file () at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/cp/parser.c:3036 #11 0x001544a4 in c_common_parse_file (set_yydebug=0) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/c-opts.c:1252 #12 0x0038fbc8 in toplev_main (argc=<value optimized out>, argv=<value optimized out>) at /cws/rjeurnin/gcc/sources/gcc-4.4.2/gcc/toplev.c:970 #13 0x00065a58 in _start () ... Triggered by a bug (id: 42803), solved with the 4.4.3 release, I did some more checks: - I could reproduce this bug on GCC 4.4.2/solaris 8 with the test file, uploaded in the bugreport: bilateral2.ii - With the new compiler (4.4.3) this bug was not reproducable anymore with the file bilateral2.ii and that problem is solved on Solaris 8 too - however my problem still exists... :-( Can someone help me on this one? -- Summary: c++ compilation hang Product: gcc Version: 4.4.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Roger dot Jeurninck at home dot nl GCC build triplet: sparc-sun-solaris2.8 GCC host triplet: sparc-sun-solaris2.8 GCC target triplet: sparc-sun-solaris2.8 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43036