public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: stefan@space.twc.de To: gcc-gnats@gcc.gnu.org Subject: c++/3145: virtual inheritance still creates wrong code Date: Tue, 12 Jun 2001 14:46:00 -0000 [thread overview] Message-ID: <20010612213841.3332.qmail@sourceware.cygnus.com> (raw) >Number: 3145 >Category: c++ >Synopsis: virtual inheritance still creates wrong code >Confidential: no >Severity: serious >Priority: high >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Tue Jun 12 14:46:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: stefan@space.twc.de >Release: gcc version 3.0 20010612 (prerelease) >Organization: >Environment: >Description: aRts still doesn't work with gcc3 (segfault on start). So I thought instead of generating testcases one by one all the time, which always opens the possibility that some cases work but others break, I wrote a testcase generator for the set of testcases that is just a complex (partially virtual) inheritance graph and segfaults on execution. I found that with the current gcc3 a good share of the generated testcases segfaults when compiled and executed, whereas with gcc-2.95.2, none of these sefaults. >How-To-Repeat: make tcgen for i in $(seq 1 1000) do tcgen $i > t.cc ; g++ 2>/dev/null -O2 t.cc ; a.out || echo $i failed done >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/x-c++src; name="tcgen.cc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="tcgen.cc" LyoKICogR2VuZXJhdGVzIHJhbmRvbWl6ZWQgdmlydHVhbCBpbmhlcml0YW5jZSB0ZXN0IGNhc2Vz IGZvciBnY2MsIHJ1biB3aXRoCiAqIHNvbWV0aGluZyBzaGVsbCBzY3JpcHQgbGlrZQogKgogKiBm b3IgaSBpbiAkKHNlcSAxIDEwMDApCiAqIGRvCiAqICAgdGNnZW4gJGkgPiB0LmNjIDsgZysrIDI+ L2Rldi9udWxsIC1PMiB0LmNjIDsgYS5vdXQgfHwgZWNobyAkaSBmYWlsZWQKICogZG9uZQogKgog KiB0byBmaW5kIHRlc3RjYXNlcyB0aGF0IHNlZ2ZhdWx0LCB1c2UgdGNnZW4gNSB0byByZWNyZWF0 ZSB0aGUgY29kZSBmb3IgdGhlCiAqIDV0aCB0ZXN0Y2FzZS4KICovCgojaW5jbHVkZSA8dGltZS5o PgojaW5jbHVkZSA8c3RkbGliLmg+CiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8bWFwPgoK Y29uc3QgaW50IE1BWF9DTEFTU0VTID0gMTA7CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqKmFy Z3YpCnsKCWludCBpOwoJc3JhbmQoKGFyZ2M9PTIpP2F0b2koYXJndlsxXSk6MCk7Cglmb3IoaSA9 IDA7IGkgPCBNQVhfQ0xBU1NFUzsgaSsrKQoJewoJCXByaW50ZigiY2xhc3MgQyVkXG4iLCBpKTsK CgkJc3RkOjptYXA8aW50LCBib29sPiB1c2VkOwoJCWlmKGkgPiAwKQoJCXsKCQkJZm9yKGludCBq ID0gMDtqPDEwO2orKykKCQkJewoJCQkJaW50IHIgPSByYW5kKCkgJSBpOwoKCQkJCWlmKCF1c2Vk W3JdKQoJCQkJewoJCQkJCWlmKGopIHByaW50ZigiICwgIik7IGVsc2UgcHJpbnRmKCIgOiAiKTsK CQkJCQlpZihyYW5kKCklMikKCQkJCQkJcHJpbnRmKCIgdmlydHVhbCBwdWJsaWMgQyVkXG4iLHIp OwoJCQkJCWVsc2UKCQkJCQkJcHJpbnRmKCIgcHVibGljIEMlZFxuIixyKTsKCQkJCQl1c2VkW3Jd ID0gdHJ1ZTsKCQkJCX0KCQkJfQoJCX0KCQlwcmludGYoInt9O1xuIik7Cgl9CgoJcHJpbnRmKCJt YWluKCkge1xuIik7Cglmb3IoaSA9IDA7IGkgPCBNQVhfQ0xBU1NFUzsgaSsrKQoJewoJCXByaW50 ZigiICBDJWQgYyVkO1xuIixpLGkpOwoJfQoJcHJpbnRmKCJ9XG4iKTsKfQo=
next reply other threads:[~2001-06-12 14:46 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-06-12 14:46 stefan [this message] 2001-06-13 1:47 nathan 2001-06-14 3:59 nathan 2001-07-17 7:35 nathan 2001-11-20 17:46 nathan 2001-11-20 17:53 nathan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20010612213841.3332.qmail@sourceware.cygnus.com \ --to=stefan@space.twc.de \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).