Forwarding downstream bug: Emacs 23.3 compiled with -O2 on x86_64-pc-linux-gnu immediately fails with a segmentation fault at runtime. This is with GCC 4.5.2 (but it also fails when compiled with GCC 4.4.5 or 4.3.5). $ emacs -Q Fatal error (11)Segmentation fault The problem disappears when -fno-strict-aliasing is added to CFLAGS. I've narrowed it down further: - compile src/xterm.c with -O1, compile the rest of the sources with -O2 => Success - compile src/xterm.c with -O2, compile the rest of the sources with -O1 => Failure - compile src/xterm.c with -O2 -fno-strict-aliasing, compile the rest of the sources with -O2 => Success - compile src/xterm.c with -O1 -fgcse -fstrict-aliasing, compile the rest of the sources with -O1 => Failure GDB full backtrace is attached. In GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, X toolkit) of 2011-03-10 on juno Windowing system distributor `The X.Org Foundation', version 11.0.10904000 configured using `configure '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../lib64' '--with-gameuser=games' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' '--with-sound' '--with-x' '--without-ns' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=athena' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CC=gcc' 'CFLAGS=-march=core2 -ggdb -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t