From: Hans-Peter Nilsson Date: Tue, 2 Sep 2014 17:00:28 +0000 (+0000) Subject: badalloc1.C (arena_size): Scale according to target pointer size. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb42f96863d48ea9a091e993c10c10f902035c9d;p=gcc.git badalloc1.C (arena_size): Scale according to target pointer size. * g++.old-deja/g++.eh/badalloc1.C [!STACK_SIZE && !__FreeBSD__] [!__sun__ && !__hpux__] (arena_size): Scale according to target pointer size. From-SVN: r214828 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fa8fb470d66..0be30a7bf52 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-09-02 Hans-Peter Nilsson + + * g++.old-deja/g++.eh/badalloc1.C [!STACK_SIZE && !__FreeBSD__] + [!__sun__ && !__hpux__] (arena_size): Scale according to + target pointer size. + 2014-09-02 Marek Polacek PR fortran/62270 diff --git a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C index c0341019845..5cde10ee272 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C @@ -3,7 +3,7 @@ // itself call malloc(), and will fail if there is no more // memory available. // { dg-do run { xfail { { xstormy16-*-* *-*-darwin[3-7]* } || vxworks_rtp } } } -// Copyright (C) 2000, 2002, 2003, 2010, 2012 Free Software Foundation, Inc. +// Copyright (C) 2000, 2002, 2003, 2010, 2012, 2014 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 6 June 2000 // Check we can throw a bad_alloc exception when malloc dies. @@ -23,7 +23,10 @@ const int arena_size = 256; // FreeBSD 5 now requires over 131072 bytes. const int arena_size = 262144; #else -const int arena_size = 32768; +// Because pointers make up the bulk of our exception-initialization +// allocations, we scale by the pointer size from the original +// 32-bit-systems-based estimate. +const int arena_size = 32768 * ((sizeof (void *) + 3)/4); #endif #endif