http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51913
Bug #: 51913
Summary: bug when submitting a class pointer to a subroutine
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 26390
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26390
buggy program
When I declare a pointer in main routine:
>> CLASS(sparseMatrix_t), pointer :: sparseMatrix
Then I pass this pointer to a subroutine
>> call test(sparseMatrix)
I get a compiler error message:
>> Error: Actual argument to 'matrix' at (1) must have the same declared type
Please find attached a small program that does not work and fails compiling
with this error. I find this fault in gfortran-4.6.1 and gfortran-4.7.0
20111210.
I compiled with 'gfortran main.f90'.