http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53261
Bug #: 53261 Summary: [4.8 Regression] ICE in tree_strip_nop_conversions Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: dang...@gcc.gnu.org Host: hppa*-*-* (32-bit) Target: hppa*-*-* (32-bit) Build: hppa*-*-* (32-bit) Created attachment 27329 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27329 Preprocessed source /home/dave/gnu/gcc/objdir/./prev-gcc/g++ -B/home/d ave/gnu/gcc/objdir/./prev-gcc/ -B/home/dave/opt/gnu/gcc/gcc-4.7.0/hppa-linux-gnu /bin/ -nostdinc++ -B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/s rc/.libs -B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/ .libs -I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include/hppa- linux-gnu -I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include - I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++ -L/home/dave/gnu/gcc/objdir/prev- hppa-linux-gnu/libstdc++-v3/src/.libs -L/home/dave/gnu/gcc/objdir/prev-hppa-linu x-gnu/libstdc++-v3/libsupc++/.libs -I../../gcc/libcpp -I. -I../../gcc/libcpp/.. /include -I../../gcc/libcpp/include -g -O2 -W -Wall -Wno-narrowing -Wwrite-stri ngs -Wmissing-format-attribute -pedantic -Wno-long-long -Werror -fno-exceptions -fno-rtti -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcp p/include -c -o files.o -MT files.o -MMD -MP -MF .deps/files.Tpo ../../gcc/libc pp/files.c ../../gcc/libcpp/files.c: In function ‘bool pch_open_file(cpp_reader*, _cpp_file *, bool*)’: ../../gcc/libcpp/files.c:288:43: internal compiler error: Segmentation fault if (file->name[0] == '\0' || !pfile->cb.valid_pch) Program received signal SIGSEGV, Segmentation fault. tree_strip_nop_conversions (exp=0x0) at ../../gcc/gcc/tree.c:11211 11211 while (tree_nop_conversion (exp)) (gdb) bt #0 tree_strip_nop_conversions (exp=0x0) at ../../gcc/gcc/tree.c:11211 #1 0x00954b9c in integer_zerop (expr=<optimized out>) at ../../gcc/gcc/tree.c:1731 #2 0x002d6f2c in warn_logical_operator (location=1226970, code=<optimized out>, type=0x40f4e660, code_left=<optimized out>, op_left=0x4130f260, code_right=EQ_EXPR, op_right=0x4130f2e0) at ../../gcc/gcc/c-family/c-common.c:1647 #3 0x00096944 in build_new_op_1 (loc=1226970, code=TRUTH_ORIF_EXPR, flags=3, arg1=0x4130f260, arg2=0x4130f2e0, arg3=<optimized out>, overload=0xfbf02df8, complain=3) at ../../gcc/gcc/cp/call.c:5261 #4 0x00096aa4 in build_new_op (loc=1093726944, code=TRUTH_ORIF_EXPR, flags=1089803568, arg1=0x0, arg2=0x4130f2e0, arg3=0x0, overload=0xfbf02df8, complain=3) at ../../gcc/gcc/cp/call.c:5326 #5 0x001f4568 in build_x_binary_op (loc=1089803568, code=TRUTH_ORIF_EXPR, arg1=0x0, arg1_code=1226970, arg2=0x4130f260, arg2_code=ERROR_MARK, overload=0xfbf02df8, complain=3) at ../../gcc/gcc/cp/typeck.c:3608 #6 0x001d1f54 in cp_parser_binary_expression (parser=0x4130f2e0, cast_p=<optimized out>, no_toplevel_fold_p=<optimized out>, prec=PREC_INCLUSIVE_OR_EXPRESSION, pidk=0x0) at ../../gcc/gcc/cp/parser.c:7399 #7 0x001d2168 in cp_parser_assignment_expression (parser=0x4102e460, cast_p=<optimized out>, pidk=0x0) at ../../gcc/gcc/cp/parser.c:7504 #8 0x001d8b34 in cp_parser_expression (parser=0x4102e460, ---Type <return> to continue, or q <return> to quit--- cast_p=<optimized out>, pidk=0x0) at ../../gcc/gcc/cp/parser.c:7650 #9 0x001db68c in cp_parser_condition (parser=0x4102e460) at ../../gcc/gcc/cp/parser.c:9281 #10 0x001c2cb0 in cp_parser_selection_statement (if_p=0x0, parser=0x4102e460) at ../../gcc/gcc/cp/parser.c:9058 #11 cp_parser_statement (parser=0x4102e460, in_statement_expr=0x0, in_compound=<optimized out>, if_p=0x0) at ../../gcc/gcc/cp/parser.c:8645 #12 0x001c434c in cp_parser_statement_seq_opt (parser=0x0, in_statement_expr=0x4f) at ../../gcc/gcc/cp/parser.c:9004 #13 0x001c45a8 in cp_parser_compound_statement (parser=0x0, in_statement_expr=0x12b8c0, in_try=<optimized out>, function_body=<optimized out>) at ../../gcc/gcc/cp/parser.c:8958 #14 0x001dfd2c in cp_parser_function_body (parser=0x4102e460) at ../../gcc/gcc/cp/parser.c:17422 #15 cp_parser_ctor_initializer_opt_and_function_body (parser=0x4102e460) at ../../gcc/gcc/cp/parser.c:17456 #16 0x001e0408 in cp_parser_function_definition_after_declarator (parser=0x0, inline_p=<optimized out>) at ../../gcc/gcc/cp/parser.c:21069 #17 0x001e09ac in cp_parser_function_definition_from_specifiers_and_declarator (declarator=0xd6d370, attributes=0x0, decl_specifiers=<optimized out>, parser=0x4102e460) at ../../gcc/gcc/cp/parser.c:20989 #18 cp_parser_init_declarator (parser=0x4102e460, decl_specifiers=<optimized out>, checks=0x0, ---Type <return> to continue, or q <return> to quit--- function_definition_allowed_p=<optimized out>, member_p=0 '\000', declares_class_or_enum=0, function_definition_p=0xfbf02724 "\001ѹ$", maybe_range_for_decl=0x0) at ../../gcc/gcc/cp/parser.c:15584 #19 0x001e2018 in cp_parser_simple_declaration (parser=0x4102e460, function_definition_allowed_p=112 'p', maybe_range_for_decl=0x46) at ../../gcc/gcc/cp/parser.c:10427 #20 0x001e48c4 in cp_parser_block_declaration (parser=0x4102e460, statement_p=<optimized out>) at ../../gcc/gcc/cp/parser.c:10313 #21 0x001e9a14 in cp_parser_declaration (parser=0x4102e460) at ../../gcc/gcc/cp/parser.c:10210 #22 0x001e8350 in cp_parser_declaration_seq_opt (parser=0x4102e460) at ../../gcc/gcc/cp/parser.c:10096 #23 0x001ea034 in cp_parser_translation_unit (parser=0x4102e460) at ../../gcc/gcc/cp/parser.c:3797 #24 c_parse_file () at ../../gcc/gcc/cp/parser.c:27449 #25 0x0031a5e8 in c_common_parse_file () at ../../gcc/gcc/c-family/c-opts.c:1128 #26 0x0071ac28 in compile_file () at ../../gcc/gcc/toplev.c:551 #27 do_compile () at ../../gcc/gcc/toplev.c:1874 #28 toplev_main (argc=23, argv=0xfbf02028) at ../../gcc/gcc/toplev.c:1950 #29 0x00af1934 in main (argc=<optimized out>, argv=<optimized out>) at ../../gcc/gcc/main.c:36 (gdb) disass $pc-16,$pc+16 Dump of assembler code from 0x953c9c to 0x953cbc: 0x00953c9c <tree_strip_nop_conversions+256>: ldil L%4000,r23 0x00953ca0 <tree_strip_nop_conversions+260>: b,l 0x938814 <tree_operand_check_failed>,rp 0x00953ca4 <tree_strip_nop_conversions+264>: ldo -1434(r23),r23 0x00953ca8 <tree_strip_nop_conversions+268>: ldw 14(r3),r3 => 0x00953cac <tree_strip_nop_conversions+272>: ldh 0(r3),ret0 0x00953cb0 <tree_strip_nop_conversions+276>: cmpb,= r9,ret0,0x953cc0 <tree_strip_nop_conversions+292> 0x00953cb4 <tree_strip_nop_conversions+280>: ldo 570(r4),r19 0x00953cb8 <tree_strip_nop_conversions+284>: cmpclr,= r12,ret0,r0 End of assembler dump. (gdb) p/x $r3 $1 = 0x0 r187158 was ok.