This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/1670: HPUX: call through pointer to static function mangles argument values
- To: nobody at gcc dot gnu dot org
- Subject: Re: c/1670: HPUX: call through pointer to static function mangles argument values
- From: Jeffrey A Law <law at redhat dot com>
- Date: 16 Jan 2001 22:26:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Jeffrey A Law <law at redhat dot com>
The following reply was made to PR c/1670; it has been noted by GNATS.
From: Jeffrey A Law <law@redhat.com>
To: broeker@physik.rwth-aachen.de
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/1670: HPUX: call through pointer to static function mangles
argument values
Date: Tue, 16 Jan 2001 15:18:23 -0700
In message <20010116192410.11119.qmail@sourceware.cygnus.com>you write:
>
> >Number: 1670
> >Category: c
> >Synopsis: HPUX: call through pointer to static function mangles argu
> ment values
> >Confidential: no
> >Severity: serious
> >Priority: low
> >Responsible: unassigned
> >State: open
> >Class: wrong-code
> >Submitter-Id: net
> >Arrival-Date: Tue Jan 16 11:26:01 PST 2001
> >Closed-Date:
> >Last-Modified:
> >Originator: Hans-Bernhard Broeker
> >Release: gcc-2.95.2 (release)
> >Organization:
> >Environment:
> HP-UX 10.20 and higher machines
> >Description:
> GCC miscompiles 'gnuplot' on HP-UX since version 10.20 of
> the OS (and associated hardware).
>
> The bug manifests as incorrect passing of (at least) one
> argument of type 'double' of a function that is called
> through a function pointer. The
> actual parameter is non-zero, in the calling function, but
> the called function receives zero.
Is your compiler using the HP assembler? If so, that is the bug. The
HP assembler provides no way to allow GCC to generate proper code for
calling a static function through a function pointer with a floating
point parameter.
This works with the compiler from HP simply because it does not use the
assembler at all. It emits object files directly and thus can set the
magic bits to make it work.
Basically stop using the HP assembler. You'll be happier in the long run.
jeff