NetBSD Problem Report #49434

From martin@duskware.de  Sun Nov 30 09:51:10 2014
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 45F76A650D
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 30 Nov 2014 09:51:10 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: gcc can not compile libasan with -O2 on vax
X-Send-Pr-Version: 3.95

>Number:         49434
>Category:       toolchain
>Synopsis:       gcc can not compile libasan with -O2 on vax
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 30 09:55:00 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.2
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD dead-to-the-world.duskware.de 7.99.2 NetBSD 7.99.2 (DEAD) #63: Sun Nov 30 08:17:33 CET 2014 martin@night-owl.duskware.de:/usr/src/sys/arch/vax/compile/DEAD vax
Architecture: vax
Machine: vax
>Description:

When trying to compile the VAX world with -O2 (note: current in-tree default
is -O1), the build fails in gcc's libasan.

The following files do compile fine with -O1 but cause internal compiler
errors with -O2:

asan_allocator2.cc
sanitizer_mac.cc
sanitizer_netbsd.cc
sanitizer_printf.cc
sanitizer_stackdepot.cc

An example for the internal error is:

#   compile  libasan/asan_allocator2.o
/usr/tools/bin/vax--netbsdelf-c++ -frandom-seed=5fba94ba -O2 -pipe -Werror  --sysroot=/hosts/vax -I/usr/src/external/gpl3/gcc/dist/libsanitizer/include -I/usr/src/external/gpl3/gcc/dist/libsanitizer  -c    /usr/src/external/gpl3/gcc/dist/libsanitizer/asan/asan_allocator2.cc -o asan_allocator2.o
In file included from /usr/src/external/gpl3/gcc/dist/libsanitizer/asan/asan_thread_registry.h:19:0,
                 from /usr/src/external/gpl3/gcc/dist/libsanitizer/asan/asan_allocator2.cc:22:
/usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h: In member function 'void __sanitizer::StaticSpinMutex::LockSlow()':
/usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:54:3: error: unable to generate reloads for:
   }
   ^
(jump_insn 30 28 54 7 (parallel [
            (set (pc)
                (if_then_else (ne (zero_extract:SI (mem/v:QI (reg/f:SI 7 %r7 [orig:26 this ] [26]) [-1  S1 A8])
                            (const_int 1 [0x1])
                            (const_int 0 [0]))
                        (const_int 0 [0]))
                    (label_ref:SI 39)
                    (pc)))
            (set (zero_extract:SI (mem/v:QI (reg/f:SI 8 %r8 [orig:23 D.9476 ] [23]) [-1  S1 A8])
                    (const_int 1 [0x1])
                    (const_int 0 [0]))
                (const_int 1 [0x1]))
        ]) /usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h:92 158 {jbbssiqi}
     (expr_list:REG_BR_PROB (const_int 5000 [0x1388])
        (nil))
 -> 39)
/usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:54:3: internal compiler error: in find_reloads, at reload.c:3891
Please submit a full bug report,
with preprocessed source if appropriate.


>How-To-Repeat:
cd /usr/src/external/gpl3/gcc/lib/libasan
nbmake-vax DBG=-O2

>Fix:
n/a

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.