[Bug fortran/47789] New: derived type with no components
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47789 Summary: derived type with no components Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: eddyg_61-bugzi...@yahoo.it The following program gives error in compilation module modone type:: one !integer :: b contains procedure :: f end type type, extends(one) :: two real :: a endtype contains subroutine f(this) class(one) :: this print *,'F' end subroutine end module program mmain use modone !type(two) :: wo = two(2,6.7) type(two) :: wo = two(6.7) call wo%f() end program --- type(two) :: wo = two(6.7) 1 Error: Invalid character in name at (1) While after uncommenting integer :: b and exchanging the comments in the two declaration type(two) :: wo = two(2,6.7) !type(two) :: wo = two(6.7) make the program compile and run
[Bug fortran/65347] New: Final subroutine are not called
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65347 Bug ID: 65347 Summary: Final subroutine are not called Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: eddyg_61-bugzilla at yahoo dot it In the following program the final subroutine are not called module testfin_mod implicit none type tfin integer :: t = -1 contains final :: del_tfin final :: del_tfinv end type contains function Ctfin(s) result(this) integer,intent(in) :: s type(tfin) :: this this % t = s end function subroutine del_tfin(this) type(tfin), intent(inout) :: this print *,"Finalized", this % t end subroutine subroutine del_tfinv(this) type(tfin), intent(inout) :: this(:) print *,"Finalized vector", this % t end subroutine subroutine printsomev(a) type(tfin) :: a(:) print *,'PRV:', a end subroutine subroutine printsomes(a) type(tfin) :: a print *,'PRS:', a%t end subroutine subroutine pluto type(tfin),save :: a(3) call printsomev([a(2), a(1), a(3)]) call printsomev([a(2), Ctfin(10), a(3)]) call printsomes(Ctfin(11)) end subroutine end module program test1 use testfin_mod implicit none call pluto end program The standard (as far as I know) requires the temporary variables corresponding to Ctfin(10) and Ctfin(11) to be finalized after the end of the subroutines printsomev and printsomev. But no finalization take places. The compiler ifort 13.0.1 correctly calls the final procedures.
[Bug fortran/113928] New: Aliasing of pointer in expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113928 Bug ID: 113928 Summary: Aliasing of pointer in expression Product: gcc Version: 11.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: eddyg_61-bugzilla at yahoo dot it Target Milestone: --- I think that this program gives an erroneous result: program wzerror implicit none integer, parameter :: N = 20 complex, target :: wz(N) real, pointer :: wr(:) integer :: i wr => wz%re wz = 0 wr = [(i,i=1,N)] wr = wr + wz(N:1:-1)%re print *, wr end program It doesn't recognize the aliasing in the expression that should be allowed when pointers are involved. I'm expecting a list of '21'. But this is not the case. I couldn't test on a more recent compiler.