From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109057 invoked by alias); 3 Dec 2015 06:02:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 109038 invoked by uid 89); 3 Dec 2015 06:02:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 03 Dec 2015 06:02:37 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id tB362ZVD062051 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Dec 2015 22:02:35 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id tB362X4B062050; Wed, 2 Dec 2015 22:02:33 -0800 (PST) (envelope-from sgk) Date: Thu, 03 Dec 2015 06:02:00 -0000 From: Steve Kargl To: Paul Richard Thomas Cc: "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [Patch, fortran] PR68534 - No error on mismatch in number of arguments between submodule and module interface Message-ID: <20151203060233.GA62024@troutmask.apl.washington.edu> References: <20151128161940.GA97246@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2015-12/txt/msg00391.txt.bz2 Paul, I'm stumped. Something is broken on i386-*-freebsd. :-( Running /mnt/kargl/gcc/gcc/testsuite/gfortran.dg/dg.exp ... FAIL: gfortran.dg/submodule_10.f08 -O (internal compiler error) FAIL: gfortran.dg/submodule_10.f08 -O (test for excess errors) FAIL: gfortran.dg/submodule_11.f08 -O0 (internal compiler error) FAIL: gfortran.dg/submodule_11.f08 -O0 (test for excess errors) FAIL: gfortran.dg/submodule_11.f08 -O1 (internal compiler error) FAIL: gfortran.dg/submodule_11.f08 -O1 (test for excess errors) FAIL: gfortran.dg/submodule_11.f08 -O2 (internal compiler error) FAIL: gfortran.dg/submodule_11.f08 -O2 (test for excess errors) FAIL: gfortran.dg/submodule_11.f08 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error) FAIL: gfortran.dg/submodule_11.f08 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess errors) FAIL: gfortran.dg/submodule_11.f08 -O3 -g (internal compiler error) FAIL: gfortran.dg/submodule_11.f08 -O3 -g (test for excess errors) FAIL: gfortran.dg/submodule_11.f08 -Os (internal compiler error) FAIL: gfortran.dg/submodule_11.f08 -Os (test for excess errors) FAIL: gfortran.dg/submodule_13.f08 -O (internal compiler error) FAIL: gfortran.dg/submodule_13.f08 -O (test for errors, line 29) FAIL: gfortran.dg/submodule_13.f08 -O (test for excess errors) Using valgrind on 'f951 submodule_10.f08' yields laptop-kargl:kargl[324] valgrind ~/work/libexec/gcc/i386-unknown-freebsd11.0/6.0.0/f951 submodule_10.f08 ==74201== Memcheck, a memory error detector ==74201== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==74201== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==74201== Command: /home/kargl/work/libexec/gcc/i386-unknown-freebsd11.0/6.0.0/f951 submodule_10.f08 ==74201== ==74201== Use of uninitialised value of size 4 ==74201== at 0x81DC20C: gfc_match_formal_arglist(gfc_symbol*, int, int) (decl.c:4829) ==74201== by 0x81DE6F7: gfc_match_subroutine() (decl.c:6016) ==74201== by 0x8248FC0: decode_statement() (parse.c:378) ==74201== by 0x8247844: next_free (parse.c:1076) ==74201== by 0x8247844: next_statement() (parse.c:1310) ==74201== by 0x8258ACC: parse_contained(int) (parse.c:5038) ==74201== by 0x824870F: parse_module() (parse.c:5431) ==74201== by 0x82467D4: gfc_parse_file() (parse.c:5729) ==74201== by 0x82972E7: gfc_be_parse_file() (f95-lang.c:201) ==74201== by 0x87E4787: compile_file() (toplev.c:464) ==74201== by 0x87E43E4: do_compile (toplev.c:1951) ==74201== by 0x87E43E4: toplev::main(int, char**) (toplev.c:2058) ==74201== by 0x8FCC00D: main (main.c:39) ==74201== ==74201== Invalid read of size 1 ==74201== at 0x81DC20C: gfc_match_formal_arglist(gfc_symbol*, int, int) (decl.==74201== at 0x81DC20C: gfc_match_formal_arglist(gfc_symbol*, int, int) (decl.c:4829) ==74201== by 0x81DE6F7: gfc_match_subroutine() (decl.c:6016) ==74201== by 0x8248FC0: decode_statement() (parse.c:378) ==74201== by 0x8247844: next_free (parse.c:1076) ==74201== by 0x8247844: next_statement() (parse.c:1310) ==74201== by 0x8258ACC: parse_contained(int) (parse.c:5038) ==74201== by 0x824870F: parse_module() (parse.c:5431) ==74201== by 0x82467D4: gfc_parse_file() (parse.c:5729) ==74201== by 0x82972E7: gfc_be_parse_file() (f95-lang.c:201) ==74201== by 0x87E4787: compile_file() (toplev.c:464) ==74201== by 0x87E43E4: do_compile (toplev.c:1951) ==74201== by 0x87E43E4: toplev::main(int, char**) (toplev.c:2058) ==74201== by 0x8FCC00D: main (main.c:39) ==74201== Address 0x8094 is not stack'd, malloc'd or (recently) free'd ==74201== I suspect that we have a sym=NULL dereferenc someplace. -- steve On Mon, Nov 30, 2015 at 02:35:35PM +0100, Paul Richard Thomas wrote: > Committed as revision 231072. > > Thanks for the review > > Paul > > On 28 November 2015 at 17:19, Steve Kargl > wrote: > > On Sat, Nov 28, 2015 at 11:35:54AM +0100, Paul Richard Thomas wrote: > >> + > >> + /* Abreviated module procedure declaration is not meant to have any > > > > s/Abreviated/Abbreviated > > > >> + formal arguments! */ > >> + if (!sym->abr_modproc_decl && formal && !head) > >> + arg_count_mismatch = true; > >> + > > > > OK to commit. > > > > -- > > Steve > > > > -- > Outside of a dog, a book is a man's best friend. Inside of a dog it's > too dark to read. > > Groucho Marx -- Steve