[Bug 1842164] Re: internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1157
Bug Watch Updater
1842164 at bugs.launchpad.net
Wed Sep 4 09:40:44 UTC 2019
Launchpad has imported 3 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88552.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2018-12-19T16:11:10+00:00 Gscfq wrote:
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
|
internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1120
0x78e59d gfc_typenode_for_spec(gfc_typespec*, int)
../../gcc/fortran/trans-types.c:1120
0x78c1f6 gfc_sym_type(gfc_symbol*)
../../gcc/fortran/trans-types.c:2243
0x71af9e gfc_get_symbol_decl(gfc_symbol*)
../../gcc/fortran/trans-decl.c:1696
0x71ea47 generate_local_decl
../../gcc/fortran/trans-decl.c:5600
0x6d3d12 do_traverse_symtree
../../gcc/fortran/symbol.c:4151
0x71ff9c generate_local_vars
../../gcc/fortran/trans-decl.c:5800
0x71ff9c gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6444
0x69d7c6 translate_all_program_units
../../gcc/fortran/parse.c:6128
0x69d7c6 gfc_parse_file()
../../gcc/fortran/parse.c:6331
0x6e6fcf gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204
---
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
|
internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1120
#...
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-8/+bug/1842164/comments/0
------------------------------------------------------------------------
On 2018-12-19T16:11:57+00:00 Gscfq wrote:
Detected :
$ cat z2.f90
program p
integer(len((c)) :: n
end
$ cat z5.f90
implicit none
integer(len((c)) :: n
end
$ gfortran-9-20181216 -c z2.f90 -fimplicit-none
z2.f90:2:14:
2 | integer(len((c)) :: n
| 1
Error: Symbol 'c' at (1) has no IMPLICIT type
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-8/+bug/1842164/comments/1
------------------------------------------------------------------------
On 2018-12-19T16:38:48+00:00 Dominiq wrote:
Confirmed from at least 4.8 up to trunk (9.0).
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-8/+bug/1842164/comments/2
** Changed in: gcc
Status: Unknown => Confirmed
** Changed in: gcc
Importance: Unknown => Medium
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-8 in Ubuntu.
https://bugs.launchpad.net/bugs/1842164
Title:
internal compiler error: in gfc_typenode_for_spec, at fortran/trans-
types.c:1157
Status in gcc:
Confirmed
Status in gcc-8 package in Ubuntu:
Confirmed
Status in gcc-9 package in Ubuntu:
Confirmed
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,dimension(:),allocatable :: x,fvec,wa
procedure(),nopass,pointer :: fcn => null()
end type
contains
subroutine run_hybrd(self)
class(hybrdtype),intent(inout) :: self
call hybrd1(self%fcn,self%n,self%x,self%fvec,self%tol,self%info,self%wa,self%lwa)
end subroutine
end module
$ gfortran -c module.f90
module.f90:13:0:
call hybrd1(self%fcn,self%n,self%x,self%fvec,self%tol,self%info,self%wa,self%lwa)
internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1157
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-8/README.Bugs> for instructions.
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.3.0-6ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
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://jp.archive.ubuntu.com/ubuntu disco/main amd64 Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1842164/+subscriptions
More information about the foundations-bugs
mailing list