http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> --- current_loops is setup by (gdb) bt #0 set_loops_for_fn (fn=0x7ffff15901f8, loops=0x7fffef079e20) at ../../../../gcc/gcc/function.h:747 #1 0x00000000008fe35e in input_cfg (ib=0x7fffffffdbc0, data_in=0x1fc4a80, fn=0x7ffff15901f8, count_materialization_scale=10000) at ../../../../gcc/gcc/lto-streamer-in.c:687 #2 0x00000000008ff088 in input_function (fn_decl=0x7ffff1a6d800, data_in=0x1fc4a80, ib=0x7fffffffdbb0, ib_cfg=0x7fffffffdbc0) at ../../../../gcc/gcc/lto-streamer-in.c:935 #3 0x00000000008ff7ca in lto_read_body (file_data=0x7ffff1866000, node=0x7ffff10468f8, data=0x2439810 "\003", section_type=LTO_section_function_body) at ../../../../gcc/gcc/lto-streamer-in.c:1081 #4 0x00000000008ffa55 in lto_input_function_body (file_data=0x7ffff1866000, node=0x7ffff10468f8, data=0x2439810 "\003") at ../../../../gcc/gcc/lto-streamer-in.c:1123 #5 0x000000000063ea32 in cgraph_get_body (node=0x7ffff10468f8) at ../../../../gcc/gcc/cgraph.c:3012 #6 0x00000000006466ad in expand_function (node=0x7ffff10468f8) at ../../../../gcc/gcc/cgraphunit.c:1746 #7 0x0000000000646d5e in expand_all_functions () at ../../../../gcc/gcc/cgraphunit.c:1908 #8 0x000000000064772a in compile () at ../../../../gcc/gcc/cgraphunit.c:2252 #9 0x000000000059a615 in lto_main () at ../../../../gcc/gcc/lto/lto.c:3427 ---Type <return> to continue, or q <return> to quit--- #10 0x0000000000a53c2c in compile_file () at ../../../../gcc/gcc/toplev.c:548 #11 0x0000000000a55dc3 in do_compile () at ../../../../gcc/gcc/toplev.c:1914 #12 0x0000000000a55f2e in toplev_main (argc=22, argv=0x1ac9810) at ../../../../gcc/gcc/toplev.c:1990 #13 0x00000000011ddec4 in main (argc=22, argv=0x7fffffffdef8) at ../../../../gcc/gcc/main.c:36 if (current_loops) { } is entered without calling loop_optimizer_init first.