From patchwork Thu Aug 16 11:55:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 177965 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]) by ozlabs.org (Postfix) with SMTP id 32A792C0086 for ; Thu, 16 Aug 2012 21:56:17 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1345722978; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:Date:From:To:Subject: Message-ID:MIME-Version:Content-Type:Content-Disposition: User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=AyDqooQ bFu5AtOqOX5dWkOV6yDI=; b=xDOW9JfS01wqd2NxLwPNiprVWsQZOoaaVX5WGcj GeuOWOFoUgwbBSGandtdLc+zNI76QLFT4tK60dw9LmpYZWSxO+zWHc1rshdoBOos Gn43RtLA6LxYx++zKgGVa/WWw4GfZi3K8N+2fcwlCweMWxSF3WTWEWui1+vALgl1 BgA8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:Received:Received:Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PHZU/LaZPZPLEvs2Xnfil+a4obym1No2eMOI97Bf/ly23MNulcf5hC2yBvfWmH pOZfd6oihGtAGuKShaeKMznAUBCL97S3aVuSUIY6daozcsApdK95HOYhspvQxwAV JxytgaX8Fu+KJRPMdRNp5ARpXpUzSVfj7RoVCcYVGeYVg=; Received: (qmail 4299 invoked by alias); 16 Aug 2012 11:56:11 -0000 Received: (qmail 4281 invoked by uid 22791); 16 Aug 2012 11:56:09 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-fa0-f73.google.com (HELO mail-fa0-f73.google.com) (209.85.161.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Aug 2012 11:55:54 +0000 Received: by fapp1 with SMTP id p1so124502fap.2 for ; Thu, 16 Aug 2012 04:55:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:organization:user-agent:x-gm-message-state; bh=OSE0WFrvZlGLAAzbM2PPGQGS+dSOoJygndHzNTxFdb4=; b=SIs459NqFwdh3bhXyQXS+ofUENTJxsICKiOn83/OE8vPdmTOTmmTwtiIe7YUoFvTvN 9mecCvRmE7lz0xxcopJbhIn8Gs5lqdJTpOLylStU5HPMP8+EkbGl32QGg5lH+VGaEMEt 1kPKA/ZctoF4MYtIL86o618xDR4IopyFDNmx/W1K9LuvlpklUcBzk4cZ7eHSOE1ieCQb /yEOKflcdK9/ySaffMIPPV5FHeocgullpYI6JRhbWi22pyoCuzNziEXMFJNM3JKgnwfm AYc096LppoItVrIVSvuWX2W3U95tAFXZFDtDh7YH3eCrw/3+r1F1cY51RQOW8ycB9ztI RyHw== Received: by 10.14.194.132 with SMTP id m4mr783817een.0.1345118152677; Thu, 16 Aug 2012 04:55:52 -0700 (PDT) Received: by 10.14.194.132 with SMTP id m4mr783811een.0.1345118152606; Thu, 16 Aug 2012 04:55:52 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id 46si5774930eed.1.2012.08.16.04.55.52 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 16 Aug 2012 04:55:52 -0700 (PDT) Received: from torture.tor.corp.google.com (torture.tor.corp.google.com [172.29.41.4]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id 6B12A5C0050; Thu, 16 Aug 2012 04:55:52 -0700 (PDT) Received: by torture.tor.corp.google.com (Postfix, from userid 54752) id A3A05C03E2; Thu, 16 Aug 2012 07:55:51 -0400 (EDT) Date: Thu, 16 Aug 2012 07:55:51 -0400 From: Diego Novillo To: gcc-patches@gcc.gnu.org, Richard Guenther Subject: [bootstrap] Tentative fix for PR 54281 Message-ID: <20120816115551.GA13453@google.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQk8r+9sdShmJhhy/ASx8hKtXGKzcCiv0QljGVDSpAl8/kR29jxhda/H5T5nUotCQIhccsdICwgtp3dzG83simap4oqpRypEXsTVujJOoh0oH0XEUeTMAnUf2LH9HLozPCo5sX3YCQRWdsuUkf8W1TY5B232mgk8DRIok4WVEADmDK4ICKyX1Kd2p115LeThVdom7et6tMjeXT2jbbksvKWdGi60X6RHG6RtJI8+0NhgXdi8L1w= X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Richi, this implements your idea for fixing PR 54281. I don't have an old enough compiler. Could you please test it in your system? I debated whether to remove the GENERATOR_FILE predicate from the inclusion (some files include gmp.h unconditionally). I think it could be removed, but only a minority of files build with GENERATOR_FILE set, so it didn't seem harmful. OK if tests pass? Diego. 2012-08-16 Diego Novillo Richard Guenther PR bootstrap/54281 * double-int.h: Move including of gmp.h ... * system.h: ... here. * realmpfr.h: Do not include gmp.h. * tree-ssa-loop-niter.c: Do not include gmp.h. fortran/ChangeLog * gfortran.h: Do not include gmp.h. diff --git a/gcc/double-int.h b/gcc/double-int.h index 3d9aa2c..7ea0528 100644 --- a/gcc/double-int.h +++ b/gcc/double-int.h @@ -20,10 +20,6 @@ along with GCC; see the file COPYING3. If not see #ifndef DOUBLE_INT_H #define DOUBLE_INT_H -#ifndef GENERATOR_FILE -#include -#endif - /* A large integer is currently represented as a pair of HOST_WIDE_INTs. It therefore represents a number with precision of 2 * HOST_BITS_PER_WIDE_INT bits (it is however possible that the diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 7c4c0a4..611d16d 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -1681,7 +1681,6 @@ gfc_intrinsic_sym; EXPR_COMPCALL Function (or subroutine) call of a procedure pointer component or type-bound procedure. */ -#include #include #include #define GFC_RND_MODE GMP_RNDN diff --git a/gcc/realmpfr.h b/gcc/realmpfr.h index ab234e9..ada876e 100644 --- a/gcc/realmpfr.h +++ b/gcc/realmpfr.h @@ -22,7 +22,10 @@ #ifndef GCC_REALGMP_H #define GCC_REALGMP_H -#include +/* Note that we do not include gmp.h. It is included in system.h + because it wrecks intl.h when compiling in C++ mode. + See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281 for details. */ + #include #include #include "real.h" diff --git a/gcc/system.h b/gcc/system.h index 9e7d503..0ccd991 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -1037,4 +1037,8 @@ helper_const_non_const_cast (const char *p) #define DEBUG_VARIABLE #endif +#ifndef GENERATOR_FILE +#include +#endif + #endif /* ! GCC_SYSTEM_H */ diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index c719a74..4c67c26 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see #include "flags.h" #include "diagnostic-core.h" #include "tree-inline.h" -#include "gmp.h" #define SWAP(X, Y) do { affine_iv *tmp = (X); (X) = (Y); (Y) = tmp; } while (0)