From patchwork Thu May 8 08:59:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rozenshteyn X-Patchwork-Id: 346949 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 897DF140079 for ; Thu, 8 May 2014 18:59:31 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; q=dns; s=default; b=GC9zgHFIoIt+sNzYIacnQILrpSnwS ZeXC+DRu93eMvaPdscrXoI/I5UMOC5D82zVugTDA0qZNhtMS7zY0XGUBrZOFQyGK dLqM0ErdjDW86xhTNldj+UVp0zmCBOY40LlsnDq4qm8A8vErnjeADo2x5IEMXUS/ wx89GED9GLvWcU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; s=default; bh=cJpRBqlTQJpZIvH47WHVGTr+980=; b=Loi eTsyvwuNeLqbC6wA0Bi6tvJZPJ8pErlvgcagQY0mD51PMHlw5Sgdko7PuH/yrCON C6tVpRzvsU8Ma90bYjSUeLSHOW4M3hEX+acJdbJnfTimseaLtksN19ioKCTB+ZlY GaNMYoALKHPq8spev+2UArYNowS2Rxw1Eov8564M= Received: (qmail 5433 invoked by alias); 8 May 2014 08:59:23 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Received: (qmail 5420 invoked by uid 89); 8 May 2014 08:59:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f178.google.com Received: from mail-wi0-f178.google.com (HELO mail-wi0-f178.google.com) (209.85.212.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 08 May 2014 08:59:20 +0000 Received: by mail-wi0-f178.google.com with SMTP id hm4so2700484wib.17 for ; Thu, 08 May 2014 01:59:17 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.75.45 with SMTP id z13mr2424468wiv.41.1399539557893; Thu, 08 May 2014 01:59:17 -0700 (PDT) Received: by 10.216.227.72 with HTTP; Thu, 8 May 2014 01:59:17 -0700 (PDT) Date: Thu, 8 May 2014 11:59:17 +0300 Message-ID: Subject: crosstool-NG 1.19 fails to build gcc 4.6.2 on host gcc version 4.7.3 From: Dmitry Rozenshteyn To: crossgcc@sourceware.org X-IsSubscribed: yes Hi, when building ARM toolchain, gcc 4.6.2 build fails on pass-1 core C compiler. Host: Linux 3.8.0-35-generic i686, gcc 4.7.3 Target: cortex-a5 Issue is well-known: see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51969 To fix need to add an extra patch file into patches/gcc/4.6.2/ Proposed patches/gcc/4.6.2/001-gcc-bug-51969.patch content: --------------- Author: jakub Date: Tue Feb 14 23:31:42 2012 New Revision: 184239 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184239 Log: PR bootstrap/51969 Backported from mainline 2011-11-08 Michael Matz * gengtype.c (write_field_root): Avoid out-of-scope access of newv. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/gengtype.c --- ----------------------------------------------------------- Thanks, Dmitry -- For unsubscribe information see http://sourceware.org/lists.html#faq --- gcc-4_6-branch/gcc/gengtype.c 2012/02/14 23:26:47 184238 +++ gcc-4_6-branch/gcc/gengtype.c 2012/02/14 23:31:42 184239 @@ -3594,14 +3594,13 @@ int has_length, struct fileloc *line, const char *if_marked, bool emit_pch, type_p field_type, const char *field_name) { + struct pair newv; /* If the field reference is relative to V, rather than to some subcomponent of V, we can mark any subarrays with a single stride. We're effectively treating the field as a global variable in its own right. */ if (v && type == v->type) { - struct pair newv; - newv = *v; newv.type = field_type; newv.name = ACONCAT ((v->name, ".", field_name, NULL));