https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110644
--- Comment #6 from Alberto Luaces <aluaces at udc dot es> --- Thanks a lot for the guidance. This is the backtrace of the last call to gcc_assert() that makes it crash. It says something about a non-recursive function likely calling itself. I will inspect my source, even it is a bit too big. Maybe a better solution would be if I compiled gcc with debugging flags. Can I just use C_FLAGS="-O0 -g" and CXX_FLAGS="-O0 -g" at configure time, or if is there a specific configure flag? 1078 gcc_assert (loc->nextc - loc->lb->line >= 0); (gdb) bt #0 gfc_format_decoder (pp=0x2706750, text=0x7fffffffb840, spec=0x2708d10 "L", precision=<optimized out>, wide=false, set_locus=false, hash=false, quoted=0x7fffffffb667, buffer_ptr=0x2708b00) at ../../gcc-13.2.0/gcc/fortran/error.cc:1078 #1 0x0000000001b44c0a in pp_format (pp=<optimized out>, text=text@entry=0x7fffffffb840) at ../../gcc-13.2.0/gcc/pretty-print.cc:1475 #2 0x0000000001b34e02 in diagnostic_report_diagnostic (context=0x26ee380 <global_diagnostic_context>, diagnostic=diagnostic@entry=0x7fffffffb840) at ../../gcc-13.2.0/gcc/diagnostic.cc:1592 #3 0x000000000071cbc8 in gfc_report_diagnostic (diagnostic=0x7fffffffb840) at ../../gcc-13.2.0/gcc/fortran/error.cc:890 #4 gfc_warning(int, const char *, typedef __va_list_tag __va_list_tag *) (opt=0, gmsgid=0x1c9c420 "Non-RECURSIVE procedure %qs at %L is possibly calling itself recursively. Declare it RECURSIVE or use %<-frecursive%>", ap=ap@entry=0x7fffffffb9c8) at ../../gcc-13.2.0/gcc/fortran/error.cc:923 #5 0x000000000071d287 in gfc_warning (opt=opt@entry=0, gmsgid=gmsgid@entry=0x1c9c420 "Non-RECURSIVE procedure %qs at %L is possibly calling itself recursively. Declare it RECURSIVE or use %<-frecursive%>") at ../../gcc-13.2.0/gcc/fortran/error.cc:954 #6 0x00000000007a275f in resolve_procedure_expression (expr=0x32a9530) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:1956 #7 resolve_variable (e=0x32a9530) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:6066 #8 gfc_resolve_expr (e=e@entry=0x32a9530) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:7302 #9 0x000000000079ffca in gfc_resolve_expr (e=0x32a9530) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:7267 #10 resolve_structure_cons (expr=<optimized out>, init=init@entry=1) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:1341 #11 0x00000000007b0f02 in resolve_values (sym=0x3285270) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:12802 #12 0x00000000007c79d3 in do_traverse_symtree (st=<optimized out>, st_func=st_func@entry=0x0, sym_func=0x7b0e80 <resolve_values(gfc_symbol*)>) at ../../gcc-13.2.0/gcc/fortran/symbol.cc:4198 #13 0x00000000007d080d in gfc_traverse_ns (ns=<optimized out>, sym_func=<optimized out>) at ../../gcc-13.2.0/gcc/fortran/symbol.cc:4223 #14 0x00000000007a7671 in resolve_types (ns=ns@entry=0x2bf2140) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:17932 #15 0x00000000007ae8dd in gfc_resolve (ns=0x2bf2140) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:18029 #16 0x000000000079d711 in resolve_symbol (sym=<optimized out>) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:16601 #17 0x00000000007c79d3 in do_traverse_symtree (st=<optimized out>, st_func=st_func@entry=0x0, sym_func=0x79b5f0 <resolve_symbol(gfc_symbol*)>) at ../../gcc-13.2.0/gcc/fortran/symbol.cc:4198 #18 0x00000000007d080d in gfc_traverse_ns (ns=<optimized out>, sym_func=<optimized out>) at ../../gcc-13.2.0/gcc/fortran/symbol.cc:4223 #19 0x00000000007a759f in resolve_types (ns=ns@entry=0x2b5ed60) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:17914 #20 0x00000000007ae8dd in gfc_resolve (ns=0x2b5ed60) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:18029 #21 0x000000000079d711 in resolve_symbol (sym=<optimized out>) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:16601 #22 0x00000000007c79d3 in do_traverse_symtree (st=<optimized out>, st_func=st_func@entry=0x0, sym_func=0x79b5f0 <resolve_symbol(gfc_symbol*)>) at ../../gcc-13.2.0/gcc/fortran/symbol.cc:4198 #23 0x00000000007d080d in gfc_traverse_ns (ns=<optimized out>, sym_func=<optimized out>) at ../../gcc-13.2.0/gcc/fortran/symbol.cc:4223 #24 0x00000000007a759f in resolve_types (ns=ns@entry=0x27b4340) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:17914 #25 0x00000000007ae8dd in gfc_resolve (ns=0x27b4340) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:18029 #26 0x000000000079b5de in gfc_resolve (ns=<optimized out>) at ../../gcc-13.2.0/gcc/fortran/resolve.cc:18016 #27 0x000000000078dbf0 in gfc_parse_file () at ../../gcc-13.2.0/gcc/fortran/parse.cc:6861 #28 0x00000000007e6160 in gfc_be_parse_file () at ../../gcc-13.2.0/gcc/fortran/f95-lang.cc:229 #29 0x0000000000d021fe in compile_file () at ../../gcc-13.2.0/gcc/toplev.cc:444 #30 0x00000000006df6fe in do_compile (no_backend=false) at ../../gcc-13.2.0/gcc/toplev.cc:2125 #31 toplev::main (this=this@entry=0x7fffffffe0de, argc=<optimized out>, argc@entry=13, argv=<optimized out>, argv@entry=0x7fffffffe208) at ../../gcc-13.2.0/gcc/toplev.cc:2277 #32 0x00000000006e13bb in main (argc=13, argv=0x7fffffffe208) at ../../gcc-13.2.0/gcc/main.cc:39