On Thu, Jun 10, 2010 at 4:10 PM, Chris Saunders <[email protected]> wrote:
> The error was:
>
> n = 97327602995864283868534915224192610...(cut this because it was very
> long)
>
> n was destroyed, but perfpow_p still believes n is a perfect power
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> FAIL: t-perfpow.exe
>
> I had intended to include that in the message but forgot.  Sorry.
>
> Regards
> Chris Saunders
>

That's what I figured.  Note we are a long long ABI.  Soooooo

from http://gmplib.org/
<quote>
There are spurious test failures with mpz/t-perfpow.c when using an
ABI where GMP uses "long long" for internal computations. Examples of
such ABIs are MIPS n32, HPUX 2.0n, and PowerPC mode32.
</quote>

(Note that this is fixed on the mercurial 5.0 branch since February)

Patch:

# HG changeset patch
# User Torbjorn Granlund <[email protected]>
# Date 1267122532 -3600
# Node ID 794410151f5f966bcb5c3489b6441614990efe7c
# Parent  948660e2e56d9cfaae035082b8fd473985505fb6
Fix a test case to work for long long limbs.

diff -r 948660e2e56d -r 794410151f5f ChangeLog
--- a/ChangeLog Thu Feb 25 16:08:21 2010 +0100
+++ b/ChangeLog Thu Feb 25 19:28:52 2010 +0100
@@ -1,5 +1,8 @@
 2010-02-25  Torbjorn Granlund  <[email protected]>

+       * tests/mpz/t-perfpow.c (check_random): Use mp_limb_t type for limb
+       variables.
+
        * tests/mpn/t-div.c: Cast a switch index to placate HP's cc.
        * tests/mpn/t-bdiv.c: Likewise.

diff -r 948660e2e56d -r 794410151f5f tests/mpz/t-perfpow.c
--- a/tests/mpz/t-perfpow.c     Thu Feb 25 16:08:21 2010 +0100
+++ b/tests/mpz/t-perfpow.c     Thu Feb 25 19:28:52 2010 +0100
@@ -2,7 +2,7 @@

    Contributed to the GNU project by Torbjorn Granlund and Martin Boij.

-Copyright 2008, 2009 Free Software Foundation, Inc.
+Copyright 2008, 2009, 2010 Free Software Foundation, Inc.

 This file is part of the GNU MP Library.

@@ -109,7 +109,8 @@
 {
   mpz_t n, np, temp, primes[NRP];
   int i, j, k, unique, destroy, res;
-  unsigned long int nrprimes, primebits, g, exp[NRP], e;
+  unsigned long int nrprimes, primebits;
+  mp_limb_t g, exp[NRP], e;
   gmp_randstate_ptr rands;

   rands = RANDS;

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to