Any application that uses libgcrypt 1.4.0 (including the parts of "make check" in libgcrypt) segfaults if libgcrypt was built with gcc 4.3 (svn 131213) and the CFLAGS setting includes "-O1 [or higher] -mtune=i686 -fomit-frame-pointer"
gdb shows the crash occurs in detect_ia32_gnuc() (defined in src/hwfeatures.c). Adding a fprintf(stderr, "anything\n"); line anywhere in that function (regardless where; done as part of locating the issue) makes the segfault go away. The segfault also doesn't occur if you just copy the code for detect_ia32_gnuc() to a separate file and add a main() function calling it. -- Summary: [4.3 regression] gcc 4.3-rev 131213 miscompiles libgcrypt 1.4.0 at -O2 -mtune=i686 -fomit-frame-pointer Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bero at arklinux dot org GCC build triplet: i586-pc-linux-gnu GCC host triplet: i586-pc-linux-gnu GCC target triplet: i586-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34725