From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | NISHIYAMA Tomoaki <tomoakin(at)staff(dot)kanazawa-u(dot)ac(dot)jp> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net> |
Subject: | Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64 |
Date: | 2011-12-08 17:46:19 |
Message-ID: | 4EE0F7EB.8050309@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/05/2011 06:27 PM, Andrew Dunstan wrote:
>
>
> $ cat regression.diffs
> ***
>
> C:/MinGW/msys/1.0/home/pgrunner/bf/root32/HEAD/pgsql/src/test/regress/expected/float8-exp-three-digits-win32.out
> Fri Nov 25 14:24:49 2011
> ---
>
> C:/MinGW/msys/1.0/home/pgrunner/bf/root32/HEAD/pgsql/src/test/regress/results/float8.out
> Mon Dec 5 18:17:36 2011
> ***************
> *** 382,388 ****
> SET f1 = FLOAT8_TBL.f1 * '-1'
> WHERE FLOAT8_TBL.f1 > '0.0';
> SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
> ! ERROR: value out of range: overflow
> SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
> ERROR: value out of range: overflow
> SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5;
> --- 382,396 ----
> SET f1 = FLOAT8_TBL.f1 * '-1'
> WHERE FLOAT8_TBL.f1 > '0.0';
> SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
> ! bad | ?column?
> ! -----+------------------
> ! | 0
> ! | -3.484e+201
> ! | -1.0043e+203
> ! | -Infinity
> ! | -1.2345678901234
> ! (5 rows)
> !
> SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
> ERROR: value out of range: overflow
> SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5;
>
> ======================================================================
>
>
>
This is apparently an optimization bug in the compiler. If I turn
optimization off (CFLAGS=-O0) it goes away. Ick.
So at the moment I'm a bit blocked. I can't really file a bug because
the compiler can't currently be used to build postgres, I don't have
time to construct a self-contained test case, and I don't want to commit
changes to enable the compiler until the issue is solved.
FYI I've been testing with the attached patch. We'll need to construct a
configure test for HAVE_CRTDEFS_H.
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
mingw-w64-32.patch | text/x-patch | 6.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | panam | 2011-12-08 19:05:46 | Re: fix for pg_upgrade |
Previous Message | Andrew Dunstan | 2011-12-08 16:36:09 | Re: pg_dump --exclude-table-data |