From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3711 invoked by alias); 7 May 2014 18:01:49 -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 3631 invoked by uid 89); 7 May 2014 18:01:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f170.google.com Received: from mail-wi0-f170.google.com (HELO mail-wi0-f170.google.com) (209.85.212.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 07 May 2014 18:01:46 +0000 Received: by mail-wi0-f170.google.com with SMTP id bs8so6357594wib.3 for ; Wed, 07 May 2014 11:01:43 -0700 (PDT) X-Received: by 10.180.106.194 with SMTP id gw2mr8647462wib.47.1399485703473; Wed, 07 May 2014 11:01:43 -0700 (PDT) Received: from sandifor-thinkpad.stglab.manchester.uk.ibm.com ([2.26.169.52]) by mx.google.com with ESMTPSA id vm8sm5414895wjc.27.2014.05.07.11.01.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 May 2014 11:01:42 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: [committed] PR 61095: tsan fallout from wide-int merge Date: Wed, 07 May 2014 18:01:00 -0000 Message-ID: <87iophqxhc.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-05/txt/msg00424.txt.bz2 This PR was due to code in which -(int) foo was suposed to be sign-extended, but was being ORed with an unsigned int and so ended up being zero-extended. Fixed by using the proper-width type. Tested on x86_64-linux-gnu and applied as obvious. Sorry for the breakage. Thanks, Richard gcc/ PR tree-optimization/61095 * tree-ssanames.c (get_nonzero_bits): Fix type extension in wi::shwi. Index: gcc/tree-ssanames.c =================================================================== --- gcc/tree-ssanames.c 2014-05-07 16:50:15.136064484 +0100 +++ gcc/tree-ssanames.c 2014-05-07 16:50:15.422063737 +0100 @@ -271,7 +271,8 @@ get_nonzero_bits (const_tree name) { struct ptr_info_def *pi = SSA_NAME_PTR_INFO (name); if (pi && pi->align) - return wi::shwi (-(int) pi->align | pi->misalign, precision); + return wi::shwi (-(HOST_WIDE_INT) pi->align + | (HOST_WIDE_INT) pi->misalign, precision); return wi::shwi (-1, precision); }