http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48856

--- Comment #6 from Thiago Macieira <thiago at kde dot org> 2011-05-03 17:42:02 
UTC ---
(In reply to comment #3)
> It would also be helpful to reduce the testcase:
> http://gcc.gnu.org/bugs/minimize.html

Thanks for the suggestion. I can't promise I will have the time to do this
any-time soon. 

I'm hoping that the reason for a straight-out crash can be found easily :)

Hopefully this could help:
==11293== Invalid read of size 2
==11293==    at 0x816090E: convert_for_initialization (typeck.c:7410)
==11293==    by 0x81324B9: digest_init_r (typeck2.c:861)
==11293==    by 0x813306B: store_init_value (typeck2.c:674)
==11293==    by 0x81095C8: check_initializer (decl.c:5413)
==11293==    by 0x811029D: cp_finish_decl (decl.c:5881)
==11293==    by 0x814F79D: cp_parser_init_declarator (parser.c:14769)
==11293==    by 0x8156B6A: cp_parser_simple_declaration (parser.c:9709)
==11293==    by 0x8156D65: cp_parser_block_declaration (parser.c:9595)
==11293==    by 0x81577BE: cp_parser_declaration_statement (parser.c:9247)
==11293==    by 0x814BE19: cp_parser_statement (parser.c:8172)
==11293==    by 0x814C545: cp_parser_statement_seq_opt (parser.c:8431)
==11293==    by 0x814C5B8: cp_parser_compound_statement (parser.c:8385)
==11293==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Line where this fails:
7410      if ((TREE_CODE (TREE_TYPE (rhs)) == ARRAY_TYPE
7411           && TREE_CODE (type) != ARRAY_TYPE
7412           && (TREE_CODE (type) != REFERENCE_TYPE
7413               || TREE_CODE (TREE_TYPE (type)) != ARRAY_TYPE))
7414          || (TREE_CODE (TREE_TYPE (rhs)) == FUNCTION_TYPE
7415              && (TREE_CODE (type) != REFERENCE_TYPE
7416                  || TREE_CODE (TREE_TYPE (type)) != FUNCTION_TYPE))
7417          || TREE_CODE (TREE_TYPE (rhs)) == METHOD_TYPE)

Reply via email to