I have an internal compiler error: Segmentation fault with gcc trunk (rev. 144201).
In a huge example it occurs in line 440 of gcc/langhooks.c that 'block' is NULL, and that causes this SegFault in 'TREE_CODE (block)'. Instead of shrinking this huge example down, I propose following patch. Can somebody with write access can commit this for me? Index: gcc/langhooks.c =================================================================== --- gcc/langhooks.c (revision 144201) +++ gcc/langhooks.c (working copy) @@ -437,7 +437,7 @@ while (block && TREE_CODE (block) == BLOCK) block = BLOCK_SUPERCONTEXT (block); - if (TREE_CODE (block) == FUNCTION_DECL) + if (block && TREE_CODE (block) == FUNCTION_DECL) fndecl = block; abstract_origin = NULL; } -- Summary: internal compiler error: Segmentation fault Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: regression AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: holger dot hopp at sap dot com GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39214