public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aluaces at udc dot es" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/110644] Error in gfc_format_decoder
Date: Thu, 19 Oct 2023 08:00:27 +0000	[thread overview]
Message-ID: <bug-110644-4-MHaKyjhvNi@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110644-4@http.gcc.gnu.org/bugzilla/>

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

  parent reply	other threads:[~2023-10-19  8:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 16:04 [Bug fortran/110644] New: " kyle.shores44 at gmail dot com
2023-07-12 17:46 ` [Bug fortran/110644] " kargl at gcc dot gnu.org
2023-10-13 19:41 ` jvdelisle at gcc dot gnu.org
2023-10-16 14:32 ` kyle.shores44 at gmail dot com
2023-10-18 15:56 ` aluaces at udc dot es
2023-10-18 17:03 ` sgk at troutmask dot apl.washington.edu
2023-10-19  8:00 ` aluaces at udc dot es [this message]
2023-10-19 15:44 ` sgk at troutmask dot apl.washington.edu
2023-10-19 16:00 ` aluaces at udc dot es
2023-10-19 16:19 ` sgk at troutmask dot apl.washington.edu
2023-10-20 15:13 ` aluaces at udc dot es
2023-10-20 17:29 ` sgk at troutmask dot apl.washington.edu
2023-10-23 15:16 ` aluaces at udc dot es
2024-03-06  3:40 ` jvdelisle at gcc dot gnu.org
2024-03-08 16:44 ` kyle.shores44 at gmail dot com
2024-03-08 16:56 ` kyle.shores44 at gmail dot com
2024-03-08 17:22 ` sgk at troutmask dot apl.washington.edu
2024-03-08 17:42 ` kyle.shores44 at gmail dot com
2024-03-08 17:42 ` kyle.shores44 at gmail dot com
2024-03-08 19:44 ` sgk at troutmask dot apl.washington.edu
2024-03-08 20:01 ` kyle.shores44 at gmail dot com
2024-03-08 20:32 ` sgk at troutmask dot apl.washington.edu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-110644-4-MHaKyjhvNi@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).