From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1991 invoked by alias); 10 Apr 2008 21:10:45 -0000 Received: (qmail 1764 invoked by uid 48); 10 Apr 2008 21:09:59 -0000 Date: Thu, 10 Apr 2008 21:10:00 -0000 Message-ID: <20080410210959.1763.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: "jaydub66 at gmail dot com" 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/msg00801.txt.bz2 ------- Comment #4 from jaydub66 at gmail dot com 2008-04-10 21:09 ------- To me it's also not completely clear what the standard says on this, but the way to fix it would probably be to insert some additional check into operator_correspondence (interface.c), where currently only the type and rank of the arguments is checked. To require full equality of all array borders (as suggested in my comment #2), one could simply add if (!gfc_compare_array_spec (f1->sym->as, f2->sym->as)) return 1; into the above mentioned routine. This would result in gfortran behaving the same way as ifort in this case, may it be standard-conforming or not. 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) return 1; to require only the array types to be equal, or something similar to at least prevent assumed-shape arrays from being passed instead of eplicit-shape arrays. My feeling is that at least the array size should match for explicit-shape arrays, but this is just a feeling and I couldn't find anything in the standard to confirm this. I'm not sure if the changes I'm suggesting would interfere with any other case where 'operator_correspondence' is called, but at least they don't seem to trigger any regressions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35831