From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24099 invoked by alias); 7 Feb 2015 01:55:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 24081 invoked by uid 89); 7 Feb 2015 01:55:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f169.google.com Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 07 Feb 2015 01:55:27 +0000 Received: by mail-ob0-f169.google.com with SMTP id wp4so16779251obc.0 for ; Fri, 06 Feb 2015 17:55:25 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.202.191.194 with SMTP id p185mr4276464oif.128.1423274125122; Fri, 06 Feb 2015 17:55:25 -0800 (PST) Received: by 10.76.134.102 with HTTP; Fri, 6 Feb 2015 17:55:25 -0800 (PST) In-Reply-To: References: <20150206162314.GA12597@intel.com> Date: Sat, 07 Feb 2015 01:55:00 -0000 Message-ID: Subject: Re: [PATCH] PR rtl-optimization/32219: optimizer causes wrong code in pic/hidden/weak symbol checking From: "H.J. Lu" To: Jack Howarth Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00448.txt.bz2 On Fri, Feb 6, 2015 at 5:51 PM, Jack Howarth wrote: > H.J., > This patch also seems to be causing a huge number of regressions > in the g++ test suite due to linkage warnings on darwin of the form... > > ld: warning: direct access in Model::~Model() to global weak symbol > vtable for Model means the weak symbol cannot be overridden at > runtime. This was likely caused by different translation units being > compiled with different visibility settings. Can you try my new patch? > Can this change wait until stage1? > Jack > > On Fri, Feb 6, 2015 at 4:41 PM, H.J. Lu wrote: >> On Fri, Feb 6, 2015 at 1:31 PM, Jack Howarth wrote: >>> H.J., >>> On x86_64-apple-darwin14, your patch applied to r220481 results in... >>> >>> FAIL: gcc.dg/visibility-22.c (test for excess errors) >>> FAIL: gcc.dg/visibility-23.c scan-hidden private_extern[ \t_]*_?foo >>> >>> with... >>> >>> Executing on host: >>> /sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/xgcc >>> -B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/ >>> /sw/src/fink.build/gcc50-5.0.0-1000/gcc-5-20150206/gcc/testsuite/gcc.dg/visibility-22.c >>> -fno-diagnostics-show-caret -fdiagnostics-color=never -fPIC -lm >>> -m32 -o ./visibility-22.exe (timeout = 300) >>> spawn -ignore SIGHUP >>> /sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/xgcc >>> -B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/ >>> /sw/src/fink.build/gcc50-5.0.0-1000/gcc-5-20150206/gcc/testsuite/gcc.dg/visibility-22.c >>> -fno-diagnostics-show-caret -fdiagnostics-color=never -fPIC -lm -m32 >>> -o ./visibility-22.exe^M >>> Undefined symbols for architecture i386:^M >>> "_foo", referenced from:^M >>> _main in ccMD1qjz.o^M >>> _main in ccMD1qjz.o^M >>> ld: symbol(s) not found for architecture i386^M >>> collect2: error: ld returned 1 exit status^M >>> compiler exited with status 1 >>> output is: >>> Undefined symbols for architecture i386:^M >>> "_foo", referenced from:^M >>> _main in ccMD1qjz.o^M >>> _main in ccMD1qjz.o^M >>> ld: symbol(s) not found for architecture i386^M >>> collect2: error: ld returned 1 exit status^M >>> >>> FAIL: gcc.dg/visibility-22.c (test for excess errors) >>> >>> Executing on host: >>> /sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/xgcc >>> -B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/ >>> /sw/src/fink.build/gcc50-5.0.0-1000/gcc-5-20150206/gcc/testsuite/gcc.dg/visibility-23.c >>> -fno-diagnostics-show-caret -fdiagnostics-color=never -fPIC -S >>> -m32 -o visibility-23.s (timeout = 300) >>> spawn -ignore SIGHUP >>> /sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/xgcc >>> -B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/ >>> /sw/src/fink.build/gcc50-5.0.0-1000/gcc-5-20150206/gcc/testsuite/gcc.dg/visibility-23.c >>> -fno-diagnostics-show-caret -fdiagnostics-color=never -fPIC -S -m32 -o >>> visibility-23.s^M >>> PASS: gcc.dg/visibility-23.c (test for excess errors) >>> FAIL: gcc.dg/visibility-23.c scan-hidden private_extern[ \t_]*_?foo >>> >> >> Does Darwin support undefined hidden weak symbol? >> Can you compile and gcc/testsuite/gcc.dg/visibility-22.c >> with clang on Darwin? >> >> -- >> H.J. -- H.J.