From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29324 invoked by alias); 4 Feb 2012 11:03:14 -0000 Received: (qmail 29315 invoked by uid 22791); 4 Feb 2012 11:03:12 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 04 Feb 2012 11:02:59 +0000 From: "nagl46 at web dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/52111] [OOP] procedure pointer with polymorphic passed dummy argument Date: Sat, 04 Feb 2012 11:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nagl46 at web dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg00465.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52111 --- Comment #4 from alexander tismer 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.