From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by sourceware.org (Postfix) with ESMTPS id 06D353858C52; Fri, 3 Feb 2023 20:20:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06D353858C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=troutmask.apl.washington.edu Authentication-Results: sourceware.org; spf=none smtp.mailfrom=troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.16.1/8.16.1) with ESMTPS id 313KKkon059471 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 3 Feb 2023 12:20:47 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.16.1/8.16.1/Submit) id 313KKkwM059470; Fri, 3 Feb 2023 12:20:46 -0800 (PST) (envelope-from sgk) Date: Fri, 3 Feb 2023 12:20:46 -0800 From: Steve Kargl To: Jakub Jelinek via Fortran Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] fortran: Fix up hash table usage in gfc_trans_use_stmts [PR108451] Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Feb 03, 2023 at 08:03:36PM +0100, Jakub Jelinek via Fortran wrote: > Hi! > > The first testcase in the PR (which I haven't included in the patch because > it is unclear to me if it is supposed to be valid or not) ICEs since extra > hash table checking has been added recently. The problem is that > gfc_trans_use_stmts does > tree *slot = entry->decls->find_slot_with_hash (rent->use_name, hash, > INSERT); > if (*slot == NULL) > and later on doesn't store anything into *slot and continues. Another spot > a few lines later correctly clears the slot if it decides not to use the > slot, so the following patch does the same. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > Yes. See my comment in the PR about the testcases being invalid Fortran. -- Steve