http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49096
Summary: internal compiler error: in calc_dfs_tree, at dominance.c:394 Product: gcc Version: 4.5.3 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: die...@hotmail.com Created attachment 24316 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24316 save-temps file A plugin containing two passes (one pass after "ch" and the second one after "loop2_init). Purpose is just to get the number of loops by calling number_of_loops function. Works fine and produces output if the called function is not returning a value, but if there is a return value then it produces the following error. internal compiler error: in calc_dfs_tree, at dominance.c:394 Tested with 4.5.0, 4.5.2, 4.5.3 and 4.6.0 Command line: ~/compilers/gcc-4.5.3/install/bin/gcc -O3 -fplugin=./plugin.so hello.c (gdb) bt #0 fancy_abort (file=0xd11258 "../../../gcc/dominance.c", line=394, function=0xd113e0 "calc_dfs_tree") at ../../../gcc/diagnostic.c:762 #1 0x00000000005b37b7 in calc_dfs_tree (di=0x7fffffffdac0, reverse=0 '\000') at ../../../gcc/dominance.c:394 #2 0x00000000005b5158 in calculate_dominance_info (dir=CDI_DOMINATORS) at ../../../gcc/dominance.c:655 #3 0x000000000057a23b in flow_loops_find (loops=0x7ffff5816240) at ../../../gcc/cfgloop.c:387 #4 0x00000000006eb93f in loop_optimizer_init (flags=7) at ../../../gcc/loop-init.c:52 #5 0x00007ffff589c8bc in execute_rtl () at new.c:31 #6 0x000000000072868b in execute_one_pass (pass=0x7ffff5a9d100) at ../../../gcc/passes.c:1568 #7 0x0000000000728915 in execute_pass_list (pass=0x7ffff5a9d100) at ../../../gcc/passes.c:1623 #8 0x0000000000819ac5 in tree_rest_of_compilation (fndecl=0x7ffff580cf00) at ../../../gcc/tree-optimize.c:413 #9 0x00000000009a0311 in cgraph_expand_function (node=0x7ffff5812750) at ../../../gcc/cgraphunit.c:1555 #10 0x00000000009a2b95 in cgraph_expand_all_functions () at ../../../gcc/cgraphunit.c:1634 #11 cgraph_optimize () at ../../../gcc/cgraphunit.c:1890 #12 0x00000000009a32f5 in cgraph_finalize_compilation_unit () at ../../../gcc/cgraphunit.c:1103 #13 0x00000000004b1083 in c_write_global_declarations () at ../../../gcc/c-decl.c:9520 #14 0x00000000007c8cd5 in compile_file (argc=4, argv=0x7fffffffdeb8) at ../../../gcc/toplev.c:1065 #15 do_compile (argc=4, argv=0x7fffffffdeb8) at ../../../gcc/toplev.c:2417 #16 toplev_main (argc=4, argv=0x7fffffffdeb8) at ../../../gcc/toplev.c:2459 #17 0x00007ffff6437bfd in __libc_start_main () from /lib64/libc.so.6 #18 0x0000000000494f59 in _start () at ../sysdeps/x86_64/elf/start.S:113