public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "stijnv at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/56097] New: Segmentation fault with -01 -ftree-vrp -ftree-loop-distribute-patterns -funswitch-loops Date: Thu, 24 Jan 2013 13:27:00 -0000 [thread overview] Message-ID: <bug-56097-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56097 Bug #: 56097 Summary: Segmentation fault with -01 -ftree-vrp -ftree-loop-distribute-patterns -funswitch-loops Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: stijnv@gmail.com Possible duplicate of bug 55964. The following test case fails with -01 -ftree-vrp -ftree-loop-distribute-patterns -funswitch-loops. The same test case worked fine with gcc 4.5: $ cat test3.c struct test_struct { int a, b[10], c[10], d[10]; }; extern struct test_struct* new_struct; void testfunc(struct test_struct* old_struct) { int i; for (i = 0; i < 10; ++i) { new_struct->b[i] = old_struct ? old_struct->b[i] : -1; new_struct->c[i] = old_struct ? old_struct->c[i] : 0; new_struct->d[i] = old_struct ? old_struct->d[i] : 0; } /* commenting out the following line eliminates the crash */ if (old_struct) old_struct->a++; } $ gcc -c -O1 -ftree-vrp -ftree-loop-distribution -funswitch-loops -o test3.o test3.c test3.c: In function ‘testfunc’: test3.c:7:6: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. $ gcc -v gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
next reply other threads:[~2013-01-24 13:27 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-24 13:27 stijnv at gmail dot com [this message] 2013-01-25 14:46 ` [Bug tree-optimization/56097] [4.7 Regression] Segmentation fault with -01 -ftree-vrp -ftree-loop-distribution -funswitch-loops rguenth at gcc dot gnu.org 2013-04-03 9:50 ` rguenth at gcc dot gnu.org
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=bug-56097-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).