This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44348] ICE in build_function_decl
- 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, 09 Nov 2015 19:59:08 +0000
- Subject: [Bug fortran/44348] ICE in build_function_decl
- Auto-submitted: auto-generated
- References: <bug-44348-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44348
--- Comment #11 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
As a side note, with a slightly modified example b from comment 3 and
$ gfortran --version
GNU Fortran (SUSE Linux) 5.2.1 20151008 [gcc-5-branch revision 228597]
$ cat pr44348_c3b_modified.f90
FUNCTION f2() RESULT(g)
real :: g
contains
real FUNCTION g()
END FUNCTION
END FUNCTION
$ gfortran -g -O0 -Wall -fcheck=all pr44348_c3b_modified.f90
pr44348_c3b_modified.f90:4.17:
real FUNCTION g()
1
pr44348_c3b_modified.f90:1.23:
FUNCTION f2() RESULT(g)
2
Error: Procedure 'g' at (1) has an explicit interface and must not have
attributes declared at (2)
f951: internal compiler error: Segmentation fault
---
With gfortran 4.9.0 :
$ gfortran-4.9 -g -O0 -Wall -fcheck=all pr44348_c3b_modified.f90
pr44348_c3b_modified.f90:4.17:
real FUNCTION g()
1
pr44348_c3b_modified.f90:1.23:
FUNCTION f2() RESULT(g)
2
Error: Procedure 'g' at (1) has an explicit interface and must not have
attributes declared at (2)
pr44348_c3b_modified.f90:4.19:
real FUNCTION g()
1
Error: Symbol 'g' at (1) already has basic type of REAL
pr44348_c3b_modified.f90:6.3:
END FUNCTION
1
Error: Expecting END PROGRAM statement at (1)