From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32115 invoked by alias); 11 Apr 2008 07:46:10 -0000 Received: (qmail 27418 invoked by uid 48); 11 Apr 2008 07:45:20 -0000 Date: Fri, 11 Apr 2008 07:46:00 -0000 Message-ID: <20080411074520.27417.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35831] Type-mismatch check missing for dummy procedure argument In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" 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: 2008-04/txt/msg00816.txt.bz2 ------- Comment #5 from burnus at gcc dot gnu dot org 2008-04-11 07:45 ------- > If on the other hand Tobias is right in the assumption he made in comment #3, > then one could something along the lines of > if (f1->sym->as->type != f2->sym->as->type) I would not be surprised if foo(*) and foo(4) are allowed and then your test rejects too much. > My feeling is that at least the array size should match for explicit-shape > arrays, I'm not sure about that part; one can create "valid" (i.e. working) programs which violate this (e.g.: array(5), array(10), but only accessing 1 to 5). We should check what the standard says about this. I think it is formally invalid to do so; if we decide to allow it, at least a warning should be printed. (At the end one needs to carefully read the standard, unfortunately, I do not have much time the next two, three weeks. One could also ask at comp.lang.fortran.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35831