Hello, I have a testcase that, during parsing, generates an invalid tree. This invalid tree triggers tree_check_failed, which was expecting a string_cst. tree_check_failed calls internal_error with tree_code_name[TREE_CODE (node)] without checking that TREE_CODE (node) is valid.
I attach a patch as a suggestion of a fix. I would like some comments. This patch eliminates the segfault and generates the error: ../../../../../source/adsl-mech/components/common/PsdInfo.c:717:1: internal compiler error: tree check: expected string_cst, have (invalid code name) in get_named_section, at varasm.c:415 This is obviously another thing I still have to understand why it's happening. The testcase is still too big (1Mb) and I haven't reproduced it with any upstream port so I am not reporting a bug yet. For the patch attached: 2013-10-11 Paulo Matos <pma...@broadcom.com> * tree.c (tree_check_failed): Check that TREE_CODE is valid before passing it to tree_code_name. Paulo Matos
tree_check_failed.patch
Description: tree_check_failed.patch