From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85418 invoked by alias); 21 Apr 2015 10:32:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 85351 invoked by uid 48); 21 Apr 2015 10:32:46 -0000 From: "steven at uplinklabs dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/65828] [LTO] ICE in streamer_get_builtin_tree, at tree-streamer-in.c:1127 Date: Tue, 21 Apr 2015 10:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at uplinklabs dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg01709.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65828 --- Comment #2 from Steven Noonan --- I just noticed that libtool appears to be stripping some of the arguments in LDFLAGS when invoking GCC: /bin/sh ../libtool --tag=CC --mode=link gcc -flto -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -O2 -fsanitize=undefined -Wl,-Bsymbolic-functions -version-info 4400:0:4400 -export-dynamic -O2 -fsanitize=undefined -o libglib-2.0.la -rpath /usr/local/lib [[.lo files]] libcharset/libcharset.la pcre/libpcre.la -lpthread libtool: link: gcc -flto -shared -fPIC -DPIC [[.o files]] -Wl,--whole-archive libcharset/.libs/libcharset.a pcre/.libs/libpcre.a -Wl,--no-whole-archive -lpthread -flto -O2 -Wl,-Bsymbolic-functions -O2 -Wl,-soname -Wl,libglib-2.0.so.0 -o .libs/libglib-2.0.so.0.4400.0 In particular it dropped the -fsanitize=undefined flag. If I invoke the libtool-generated GCC command line with '-fsanitize=undefined' added then there's no ICE. $ gcc -flto -shared -fPIC -DPIC [[.o files]] -Wl,--whole-archive libcharset/.libs/libcharset.a pcre/.libs/libpcre.a -Wl,--no-whole-archive -lpthread -flto -O2 -Wl,-Bsymbolic-functions -O2 -Wl,-soname -Wl,libglib-2.0.so.0 -o .libs/libglib-2.0.so.0.4400.0 -fsanitize=undefined $ ls -cahl .libs/libglib-2.0.so.0.4400.0 -rwxr-xr-x 1 snoonan snoonan 4.3M Apr 21 03:31 .libs/libglib-2.0.so.0.4400.0 Hmm.