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]

c++/6764: Throwing exception causes crash with '-O2 -fomit-frame-pointer'



>Number:         6764
>Category:       c++
>Synopsis:       Throwing exception causes crash with '-O2 -fomit-frame-pointer'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 22 02:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Andris Pavenis
>Release:        gcc-3.1 release
>Organization:
>Environment:
targets i686-pc-linux-gnu and i586-pc-msdosdjgpp
>Description:
Throwing exception in attached test example causes 
SIGABRT if example is compiled with options '-O2 -fomit-frame-pointer'. There is no crash if example is compiled
without option -fomit-frame-pointer.

It's not a regression as gcc-2.95.3 have the same problem
>How-To-Repeat:
Compile attached example and run it:
  g++ -O2 -fomit-frame-pointer except.cc -o except
  ./except 
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="except.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="except.cc"

LyogIAogICAgZ2NjLTMuMTogdGhyb3dpbmcgZXhlcHRpb24gY2F1c2VzIGNyYXNoIHdoZW4gY29t
cGlsZWQgdXNpbmcgCiAgICBjb21tYW5kIGxpbmUgb3B0aW9ucyAtZm9taXQtZnJhbWUtcG9pbnRl
ciAtTzIKCQoJY29tcGlsZSBjb21tYW5kOgoJICAgIGdjYyAtTzIgLWZvbWl0LWZyYW1lLXBvaW50
ZXIgZXhjZXB0LmNjIC1sc3RkYysrIC1vIGV4Y2VwdAoJICAgIAoJcmVzdWx0IGNyYXNoZXMgd2hl
biByZXRocm93aW5nIGV4Y2VwdGlvbiBpbiB4MWEoKSB3aGVuIG9wdGltYXphdGlvbgoJYW5kIC1m
b21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AodzMpOw0KICAgICB4MSAoKTsNCiAgfQ0KDQppbnQgbWFpbiAodm9pZCkNCnsN
CiAgIHRyeSB7IHgxYSgpOyB9IGNhdGNoICh4eCAmIHcpIHsgY291dCA8PCAiY2F0Y2hlZCBmcm9t
IHgxYSgpXG4iOyB9DQogICByZXR1cm4gMDsNCn0NCg0Kdm9pZCB4MSAodm9pZCkgdGhyb3cgKHh4
KQ0KICB7DQogICAgIHRlc3QgdzEgKCJ2b2lkIHgxICh2b2lkKSB0aHJvdyAoeHgpIik7DQogICAg
IHRvdWNoICh3MSk7DQogICAgIHh4IGE7DQogICAgIHRocm93KGEpOw0KICB9DQoKdm9pZCAgdG91
Y2ggKCB0ZXN0ICYgKQ0Kew0KfQ0K


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