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/52111] [OOP] procedure pointer with polymorphic passed dummy argument


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52111

--- Comment #4 from alexander tismer <nagl46 at web dot de> 2012-02-04 11:02:55 UTC ---
I think you are right. Thanks again for your helpful annotations.

But I'm not sure if I understand everything correctly.

>> Thus, the compiler is not required to diagnose it - and, seemingly, 
>> the Cray compiler doesn't.

I think I understand this statement. And if I change my code like this:

>>  type(solver_t), target :: solverTarget
>>  integer :: val
>>  class(solverAbstract_t), pointer :: solver
>>
>>  solver => solverTarget
>>
>>  call solver%setPrec('l')
>>  call solver%solve(val)

Then I think program should fail because solveLeft_sub is called with
class(solverAbstract_t) as passed dummy argument. This is not conform with the
subroutine. 
In any case gfortran is right, but compiling my new program with Cray there is
no error. And as you mentionend this is ok, because argument checking is not
necessary. But is it correct that program execution is not stopped by an error?
In my opinion at runtime there is the above mentioned problem.


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