This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
optimization/8530: toplev.c: Close of _DFI lreg dump file guarded with different condition than open
- From: jeffry at mail dot utexas dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 11 Nov 2002 21:35:37 -0000
- Subject: optimization/8530: toplev.c: Close of _DFI lreg dump file guarded with different condition than open
- Reply-to: jeffry at mail dot utexas dot edu
>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: