The following program should print "8" and not "4".
Related to PR 34431.
module m
implicit none
integer, parameter :: it = 8
end module m
program main
implicit none
integer, parameter :: it = 4
integer :: i
i = test()
contains
integer(it) function test()
use m
print *, kind(test)
test = kind(test)
end function test
end program main
--
Summary: Wrong precedence of kinds in typespecs.
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34471