This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

optimization/8530: toplev.c: Close of _DFI lreg dump file guarded with different condition than open


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]