Re: 8.0.0 make check fails on Solaris 9 (sparc) - Mailing list pgsql-bugs

From Tamas Vincze
Subject Re: 8.0.0 make check fails on Solaris 9 (sparc)
Date
Msg-id 41FFE7F9.6010900@neb.com
Whole thread Raw
In response to Re: 8.0.0 make check fails on Solaris 9 (sparc)  (Michael Fuhr <mike@fuhr.org>)
List pgsql-bugs
Michael, Fuhr wrote:

> The errors were the following:
>
>   template1=# SELECT 'NaN'::float4;
>   ERROR:  22003: type "real" value out of range: overflow
>   LOCATION:  CheckFloat4Val, float.c:219
>
> The code around float.c:219 looks like this:
>
>   if (fabs(val) > FLOAT4_MAX)
>           ereport(ERROR,
>                           (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
>                            errmsg("type \"real\" value out of range: overflow")));
>
> I wonder what a debugging printf() would show for val, fabs(val),
> and FLOAT4_MAX here.

Here it is:
val: NaN
fabs(val): NaN
FLOAT4_MAX: 340282346638528859811704183484516925440.000000

It must be a compiler bug in gcc 2.96 because I had an older
one (2.95.3) from the SFWgcc package installed under /opt/sfw
and using that all test results were OK.
I installed the new gcc 3.4.2 and that worked too.

Tamas

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bad planner decision in Postgres
Next
From: Kris Jurka
Date:
Subject: timezone offsets and documentation