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

--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Oct 18, 2023 at 03:56:32PM +0000, aluaces at udc dot es wrote:
> --- Comment #4 from Alberto Luaces <aluaces at udc dot es> ---
> I got the same error in almost the same circumstances (crash in 
> error.cc:1078).
> 
> I have a large codebase and I could not prepare a minimal testcase, but I have
> built gfortran 13 from source with the aim to debug the crash.
> 
> Hoewever, even I set "set follow-fork-mode children", f951 crashes and I 
> cannot
> navigate through the backtrace nor see the arguments of the functions.
> 
> Is there any reference for debugging gcc in order to send some useful
> information to this bug?
> 

If you've built 13 and still have the source files and build 
directory, then locate the installed l f951.  For me, I have 

${HOME}/work/x/libexec/gcc/x86_64-unknown-freebsd14.0/14.0.0/f951

In following, I'm going to use ${PATH} for the above path.

Go to the directory where your project dies.  Suppose it is 
compiling foo.f90 when it crashes.  Do the following.

gdb ${PATH}/f951

(gdb) b error.cc:1078
(gdb) run foo.f90

Line 1078 is 

        gcc_assert (loc->nextc - loc->lb->line >= 0);

so the source file information looks corrupt.  You may need to 
continue the process a few to generate the crash, i.e.,

(gdb) c

<when it crashes>

(gdb) bt

This will generate a backtrace.  Post that.

Reply via email to