This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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: unassigned@gcc.gnu.org
        ReportedBy: eddyg_61-bugzilla@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]