This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR20880 - Failure to detect procedures encompassing own interface


Hi,

François-Xavier Coudert wrote:
>>    gfortran -O0 func_derived_3.f90
> Try adding -pedantic?
I think I found the reason. It does not occure always:
   gfortran -std=f95 gfortran.dg/func_derived_3.f90
Running 8 times produced 6 ICEs.
gfortran.dg/func_derived_3.f90:73: internal compiler error: Segmentation
fault
Without -std=f95 it didn't ICE (or ICEs much more rarely).

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000459fea in gfc_add_explicit_interface (sym=0xdf78a0,
source=IFSRC_DECL, formal=0xdee3c0, where=0xcf6970)
    at /home/tob/projects/gcc/gcc/fortran/symbol.c:1207
1207      if (current_interface.ns
(gdb) bt
#0  0x0000000000459fea in gfc_add_explicit_interface (sym=0xdf78a0,
source=IFSRC_DECL, formal=0xdee3c0, where=0xcf6970)
    at /home/tob/projects/gcc/gcc/fortran/symbol.c:1207
#1  0x0000000000413b2f in gfc_match_formal_arglist (progname=0xdf78a0,
st_flag=1, null_flag=14607296)
    at /home/tob/projects/gcc/gcc/fortran/decl.c:2693
#2  0x0000000000435c06 in gfc_match_st_function () at
/home/tob/projects/gcc/gcc/fortran/match.c:2937
#3  0x0000000000441083 in match_word (str=0xdf78d8 "", subr=0x435b90
<gfc_match_st_function>, old_locus=0x7fff4b554a60)
    at /home/tob/projects/gcc/gcc/fortran/parse.c:65
#4  0x0000000000441606 in decode_statement () at
/home/tob/projects/gcc/gcc/fortran/parse.c:132
#5  0x000000000044207b in next_statement () at
/home/tob/projects/gcc/gcc/fortran/parse.c:499
#6  0x0000000000443e8c in parse_spec (st=ST_IMPLICIT_NONE) at
/home/tob/projects/gcc/gcc/fortran/parse.c:1887
#7  0x0000000000444356 in parse_progunit (st=14645464) at
/home/tob/projects/gcc/gcc/fortran/parse.c:2895
#8  0x00000000004448a0 in gfc_parse_file () at
/home/tob/projects/gcc/gcc/fortran/parse.c:3231

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]