optimization/8530: toplev.c: Close of _DFI lreg dump file guarded with different condition than open
jeffry@mail.utexas.edu
jeffry@mail.utexas.edu
Mon Nov 11 13:36:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list