From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83619 invoked by alias); 27 Jun 2015 18:28:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 83543 invoked by uid 48); 27 Jun 2015 18:28:21 -0000 From: "xricht17 at stud dot fit.vutbr.cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug pch/14940] PCH largefile test fails on various platforms Date: Sat, 27 Jun 2015 18:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: pch X-Bugzilla-Version: 4.0.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: xricht17 at stud dot fit.vutbr.cz X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg03237.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14940 Martin Richter changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xricht17 at stud dot fit.vutbr.cz --- Comment #47 from Martin Richter --- Patch for i386-mingw32: diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c index aa17378..7ee6d0b 100644 --- a/gcc/config/i386/host-mingw32.c +++ b/gcc/config/i386/host-mingw32.c @@ -42,9 +42,6 @@ static size_t mingw32_gt_pch_alloc_granularity (void); static inline void w32_error(const char*, const char*, int, const char*); -/* FIXME: Is this big enough? */ -static const size_t pch_VA_max_size = 128 * 1024 * 1024; - /* Granularity for reserving address space. */ static size_t va_granularity = 0x10000; @@ -86,9 +83,6 @@ static void * mingw32_gt_pch_get_address (size_t size, int) { void* res; - size = (size + va_granularity - 1) & ~(va_granularity - 1); - if (size > pch_VA_max_size) - return NULL; /* FIXME: We let system determine base by setting first arg to NULL. Allocating at top of available address space avoids unnecessary @@ -148,7 +142,7 @@ mingw32_gt_pch_use_address (void *addr, size_t size, int fd, /* Offset must be also be a multiple of allocation granularity for this to work. We can't change the offset. */ - if ((offset & (va_granularity - 1)) != 0 || size > pch_VA_max_size) + if ((offset & (va_granularity - 1)) != 0) return -1;