From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2743 invoked by alias); 11 Nov 2002 21:36:07 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 2675 invoked by uid 71); 11 Nov 2002 21:36:05 -0000 Resent-Date: 11 Nov 2002 21:36:05 -0000 Resent-Message-ID: <20021111213605.2674.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, jeffry@mail.utexas.edu Received: (qmail 2422 invoked by uid 61); 11 Nov 2002 21:35:37 -0000 Message-Id: <20021111213537.2421.qmail@sources.redhat.com> Date: Tue, 19 Nov 2002 12:16:00 -0000 From: jeffry@mail.utexas.edu Reply-To: jeffry@mail.utexas.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: optimization/8530: toplev.c: Close of _DFI lreg dump file guarded with different condition than open X-SW-Source: 2002-11/txt/msg00543.txt.bz2 List-Id: >Number: 8530 >Category: optimization >Synopsis: toplev.c: Close of _DFI lreg dump file guarded with different condition than open >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Nov 11 13:36:05 PST 2002 >Closed-Date: >Last-Modified: >Originator: Jeff Russell >Release: 3.1 >Organization: >Environment: i686-pc-cygwin >Description: In toplev.c. the close_dump_file() call for DFI_lreg is guarded with an "if" statement, while the corresponding "open" is not. Thus, program flow can by-pass the clost_dump_file() call. While logic in the called routines makes everything "work", it would clean up the source code and eliminate future "stupid" mistakes by moving the "close" outside the guarding "if" statement. >How-To-Repeat: Discovered with source code analysis. >Fix: Move call to close_dump_file() outside and following the "if" statement. >Release-Note: >Audit-Trail: >Unformatted: