This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66244] ICE on assigning a value to a pointer variable
- From: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Jun 2015 17:22:35 +0000
- Subject: [Bug fortran/66244] ICE on assigning a value to a pointer variable
- Auto-submitted: auto-generated
- References: <bug-66244-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66244
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Perhaps it's better to make the target array a bit larger.
And to provide a not so minimalistic version :
program p
integer, target :: a(4)
integer, pointer :: z => a(3)
call s
contains
subroutine s
a = 123
z = 0
print *, a
print *, z
end
end
yields :
f951: internal compiler error: in lhd_set_decl_assembler_name, at
langhooks.c:179
---
Whereas this modification compiles and works as expected :
$ cat z92.f90
program p
integer, target :: a(4)
integer, pointer :: z
z => a(3)
call s
contains
subroutine s
a = 123
z = 0
print *, a
print *, z
end
end
$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z92.f90
$ a.out
123 123 0 123
0