public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "terpstra at ito dot tu-darmstadt dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/17934] New: gcc produces bad (misaligned?) sse2 code Date: Mon, 11 Oct 2004 16:11:00 -0000 [thread overview] Message-ID: <20041011161106.17934.terpstra@ito.tu-darmstadt.de> (raw) For whatever reason, the attached program, when compiled with the options gcc-3.4 -msse2 -O0 test.c -o test will crash. This is not the case if -O2 is specified or -march=i686. However, I have a larger testcase (the program this came from) which will fail regardless of optimization flags or -march. It seems that this problem only happens when gcc is given complicated enough code. A quick look at it with gdb shows: Program received signal SIGSEGV, Segmentation fault. 0x080483b0 in _mm_srli_epi32 (__A={51539607552, 51539607564}, __B=31) at emmintrin.h:1261 1261 { (gdb) up #1 0x080483e3 in bar (x={4294967297, 4294967297}, y={4294967297, 4294967297}) at test.c:8 8 return _mm_sub_epi32(x, _mm_srli_epi32(y, 31)); (gdb) print &x $1 = (__v2di *) 0xbffffa00 (gdb) down #0 0x080483b0 in _mm_srli_epi32 (__A={51539607552, 51539607564}, __B=31) at emmintrin.h:1261 1261 { (gdb) print &__A $2 = (__v2di *) 0xbffff9cc This looks to me like the alignment has somehow gotten messed up. -- Summary: gcc produces bad (misaligned?) sse2 code Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: terpstra at ito dot tu-darmstadt dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i386-linux-gnu GCC host triplet: i386-linux-gnu GCC target triplet: i386-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17934
next reply other threads:[~2004-10-11 16:11 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-10-11 16:11 terpstra at ito dot tu-darmstadt dot de [this message] 2004-10-11 16:13 ` [Bug c/17934] " terpstra at ito dot tu-darmstadt dot de 2004-10-11 16:17 ` terpstra at ito dot tu-darmstadt dot de 2004-10-11 17:09 ` pinskia at gcc dot gnu dot org 2004-10-11 17:22 ` terpstra at ito dot tu-darmstadt dot de 2004-10-11 17:26 ` pinskia at gcc dot gnu dot 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=20041011161106.17934.terpstra@ito.tu-darmstadt.de \ --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).