[Bug objc/80949] ICE in do_warn_duplicated_branches_r

egall at gwmail dot gwu.edu gcc-bugzilla@gcc.gnu.org
Sat Jun 3 02:50:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80949

--- Comment #4 from Eric Gallager <egall at gwmail dot gwu.edu> ---
(In reply to Marek Polacek from comment #3)
> This is x86_64-pc-linux-gnu.  I tried various combinations of the above
> options but I'm always seeing some errors.  Perhaps it would be possible to
> isolate the function where the crash occurs and thus get rid of
> target-dependent stuff?
> 
> I'd be interested in seeing a better backtrace, too.

I looked into creduce but apparently it doesn't work with objc yet:
https://github.com/csmith-project/creduce/issues/31

Anyways here's a better backtrace:


Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00135430 in do_warn_duplicated_branches (expr=0x560ba10) at
../../gcc/c-family/c-warn.c:2362
2362      if (TREE_CODE (thenb) == NOP_EXPR
(gdb) bt
#0  0x00135430 in do_warn_duplicated_branches (expr=0x560ba10) at
../../gcc/c-family/c-warn.c:2362
#1  0x001355ff in do_warn_duplicated_branches_r (tp=0x55fdaa0) at
../../gcc/c-family/c-warn.c:2401
#2  0x01751efd in walk_tree_1 (tp=0x55fdaa0, func=0x1355de
<_Z29do_warn_duplicated_branches_rPP9tree_nodePiPv>, data=0x0, pset=0xbfff6f4c,
lh=0) at ../../gcc/tree.c:11838
#3  0x017522a2 in walk_tree_1 (tp=0x56149a4, func=0x1355de
<_Z29do_warn_duplicated_branches_rPP9tree_nodePiPv>, data=0x0, pset=0xbfff6f4c,
lh=0) at ../../gcc/tree.c:11943
#4  0x017522a2 in walk_tree_1 (tp=0x560b960, func=0x1355de
<_Z29do_warn_duplicated_branches_rPP9tree_nodePiPv>, data=0x0, pset=0xbfff6f4c,
lh=0) at ../../gcc/tree.c:11943
#5  0x017522a2 in walk_tree_1 (tp=0x560ba5c, func=0x1355de
<_Z29do_warn_duplicated_branches_rPP9tree_nodePiPv>, data=0x0, pset=0xbfff6f4c,
lh=0) at ../../gcc/tree.c:11943
#6  0x01751b3b in walk_tree_without_duplicates_1 (tp=0x53a7bec, func=0x1355de
<_Z29do_warn_duplicated_branches_rPP9tree_nodePiPv>, data=0x0, lh=0) at
../../gcc/tree.c:12181
#7  0x001091ba in c_genericize (fndecl=0x53a7b80) at
../../gcc/c-family/c-gimplify.c:129
#8  0x0003f382 in finish_function () at ../../gcc/c/c-decl.c:9350
#9  0x00081370 in c_parser_declaration_or_fndef (parser=0x436a60a8,
fndef_ok=true, static_assert_ok=true, empty_ok=true, nested=false,
start_attr_ok=true, objc_foreach_object_declaration=0x0,
omp_declare_simd_clauses={m_vec = 0x0}, oacc_routine_data=0x0,
fallthru_attr_p=0x0) at ../../gcc/c/c-parser.c:2147
#10 0x000ab4fd in c_parser_external_declaration (parser=0x436a60a8) at
../../gcc/c/c-parser.c:1469
#11 0x000ab650 in c_parser_translation_unit (parser=0x436a60a8) at
../../gcc/c/c-parser.c:1349
#12 0x000ab7ca in c_parse_file () at ../../gcc/c/c-parser.c:18112
#13 0x0011349f in c_common_parse_file () at ../../gcc/c-family/c-opts.c:1104
#14 0x01468198 in compile_file () at ../../gcc/toplev.c:468
#15 0x01469d18 in do_compile () at ../../gcc/toplev.c:2021
#16 0x01469fcf in toplev::main (this=0xbfff741e, argc=257, argv=0xbfff7450) at
../../gcc/toplev.c:2155
#17 0x018a42ab in main (argc=257, argv=0xbfff7450) at ../../gcc/main.c:39
Current language:  auto; currently c++


I'll leave the debug session open; let me know if you need any more info...


More information about the Gcc-bugs mailing list