Re: 8.0.0 make check fails on Solaris 9 (sparc)

From: Tamas Vincze <vincze(at)neb(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: 8.0.0 make check fails on Solaris 9 (sparc)
Date: 2005-02-01 20:35:05
Message-ID: 41FFE7F9.6010900@neb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Toms Zandon 2005-02-02 00:27:53 BUG #1458: to_char is crazy
Previous Message Matthew Wakeling 2005-02-01 17:58:37 Re: Bad planner decision in Postgres