This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47789] New: derived type with no components
- From: "eddyg_61-bugzilla at yahoo dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Feb 2011 19:01:01 +0000
- Subject: [Bug fortran/47789] New: derived type with no components
- Auto-submitted: auto-generated
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