This is the mail archive of the gcc-prs@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/6165: [i686] stack frame freed too early



>Number:         6165
>Category:       optimization
>Synopsis:       [i686] stack frame freed too early
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 03 17:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julian Seward
>Release:        3.0.4
>Organization:
>Environment:
i686-linux
>Description:
_ZNSt13basic_filebufIcSt11char_traitsIcEEC1Ev:
        ...
        movl    %ebp, %esp      <--- %esp == %ebp after here
        movl    $0, -16(%ebp)   <--- WRONG; EA = -16(%esp)
        movl    $0, -12(%ebp)   <--- WRONG
        movl    $0, -24(%ebp)   <--- WRONG
        movl    $0, -20(%ebp)   <--- WRONG
>How-To-Repeat:
Compile with -O2 -mcpu=i686:

#include <fstream>
int main(void) {
        std::basic_filebuf<char> foop;
        return 0;
}
>Fix:

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