Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64 - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Date
Msg-id 4EE0F7EB.8050309@dunslane.net
Whole thread Raw
In response to Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (NISHIYAMA Tomoaki <tomoakin@staff.kanazawa-u.ac.jp>)
Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (Robert Haas <robertmhaas@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pg_dump --exclude-table-data
Next
From: panam
Date:
Subject: Re: fix for pg_upgrade