internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1157
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Fix Released
|
Medium
|
|||
gcc-13 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
gcc-8 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
gcc-9 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I think internal compiler error should not appear for compilation of module.f90.
The information about source and compiler and so on are as follows.
$ cat module.f90
module minpack
implicit none
type :: hybrdtype
integer :: info=-1
integer :: n,lwa
double precision :: tol=1d-10
double precision,
procedure(
end type
contains
subroutine run_hybrd(self)
class(
call hybrd1(
end subroutine
end module
$ gfortran -c module.f90
module.f90:13:0:
call hybrd1(
internal compiler error: in gfc_typenode_
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:/
$ gfortran -v
Using built-in specs.
COLLECT_
COLLECT_
OFFLOAD_
OFFLOAD_
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-
Thread model: posix
gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1)
$ lsb_release -rd
Description: Ubuntu 19.04
Release: 19.04
$ apt-cache policy gfortran
gfortran:
Installed: 4:8.3.0-1ubuntu3
Candidate: 4:8.3.0-1ubuntu3
Version table:
*** 4:8.3.0-1ubuntu3 500
500 http://
100 /var/lib/
CVE References
summary: |
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in gcc-8 (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in gcc-9 (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in gcc: | |
status: | Confirmed → In Progress |
Changed in gcc: | |
status: | In Progress → Fix Released |
Without a program statement :
$ cat z1.f90
integer(len((c)) :: n
end
$ gfortran-9-20181216 -c z1.f90
$ gfortran-9-20181216 -c z1.f90 -fimplicit-none
z1.f90:1:0:
1 | integer(len((c)) :: n for_spec, at fortran/ trans-types. c:1120 for_spec( gfc_typespec* , int)
../../ gcc/fortran/ trans-types. c:1120 type(gfc_ symbol* )
../../ gcc/fortran/ trans-types. c:2243 symbol_ decl(gfc_ symbol* )
../../ gcc/fortran/ trans-decl. c:1696
../../ gcc/fortran/ trans-decl. c:5600
../../ gcc/fortran/ symbol. c:4151
../../ gcc/fortran/ trans-decl. c:5800 function_ code(gfc_ namespace* )
../../ gcc/fortran/ trans-decl. c:6444 all_program_ units
../../ gcc/fortran/ parse.c: 6128
../../ gcc/fortran/ parse.c: 6331
../../ gcc/fortran/ f95-lang. c:204
|
internal compiler error: in gfc_typenode_
0x78e59d gfc_typenode_
0x78c1f6 gfc_sym_
0x71af9e gfc_get_
0x71ea47 generate_local_decl
0x6d3d12 do_traverse_symtree
0x71ff9c generate_local_vars
0x71ff9c gfc_generate_
0x69d7c6 translate_
0x69d7c6 gfc_parse_file()
0x6e6fcf gfc_be_parse_file
---
Invalid syntax also silently accepted :
$ cat z3.f90
integer(m::n
end
$ gfortran-9-20181216 -c z3.f90
$ gfortran-9-20181216 -c z3.f90 -fimplicit-none
z3.f90:1:0:
1 | integer(m::n for_spec, at fortran/ trans-types. c:1120
|
internal compiler error: in gfc_typenode_
#...