Bug 19696 - gcc.c-torture/execute/ieee/copysign1.c: Unsatisfied symbols: copysignl
Summary: gcc.c-torture/execute/ieee/copysign1.c: Unsatisfied symbols: copysignl
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Richard Henderson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-29 17:48 UTC by John David Anglin
Modified: 2005-02-02 06:47 UTC (History)
4 users (show)

See Also:
Host:
Target: hppa2.0w-hp-hpux11.11, powerpc-darwin, solaris2.[56]
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-01-30 22:35:20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2005-01-29 17:48:24 UTC
PASS: gcc.c-torture/execute/ieee/compare-fp-4.c execution,  -Os
Executing on host: /mnt/gnu/gcc-3.3/objdir/gcc/xgcc -B/mnt/gnu/gcc-3.3/objdir/gc
c/ /mnt/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.c-torture/execute/ieee/copysign1.c  -w
  -O0   -lm   -o /mnt/gnu/gcc-3.3/objdir/gcc/testsuite/copysign1.x0    (timeout
= 300)
/usr/ccs/bin/ld: Unsatisfied symbols:
   copysignl (first referenced in /var/tmp//ccmMQ8Qt.o) (code)
collect2: ld returned 1 exit status
Comment 1 Andrew Pinski 2005-01-29 17:51:00 UTC
Confirmed on powerpc-darwin7.7.0 which also does not have fully the C99 math functions (well have 
all of them except for the long double form.
Comment 2 Richard Henderson 2005-01-30 09:28:59 UTC
For hpux, is this simply because we don't link against libm?
Comment 3 Eric Botcazou 2005-01-30 14:17:49 UTC
> For hpux, is this simply because we don't link against libm?

No, we do link against libm.  Same problem on Solaris 2.5.1 and 2.6: copysign is
in libm, but not copysignl.
Comment 4 dave 2005-01-30 15:22:12 UTC
Subject: Re:  gcc.c-torture/execute/ieee/copysign1.c: Unsatis

> For hpux, is this simply because we don't link against libm?

No, only copysign and copysignf are available under hpux up to
hpux 11.11.

Dave
Comment 5 Richard Henderson 2005-01-30 22:35:19 UTC
Bother.  Well, if I wanna use this for complex division, I'll have to come up
with some solution.
Comment 6 Andrew Pinski 2005-01-30 22:37:33 UTC
(In reply to comment #5)
> Bother.  Well, if I wanna use this for complex division, I'll have to come up
> with some solution.
powerpc-darwin is complex as it uses IBM's 128bit format which does not have a simple sign bit any 
more.
Comment 7 Richard Henderson 2005-01-31 00:30:53 UTC
Well, yes and no.  The msb *is* set iff the value is negative.  So copysign
can be done by 

  xor. tmp, mswx, mswx
  blt 0, 1f
  fneg hi, hi
  fneg lo, lo
1:

plus some additional data movement instructions.

Step 1, however, is getting IEEE quad precision stuff working...
Comment 8 GCC Commits 2005-01-31 04:01:09 UTC
Subject: Bug 19696

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-01-31 04:00:57

Modified files:
	gcc            : ChangeLog optabs.c 

Log message:
	PR 19696
	* optabs.c (expand_absneg_bit): Split out from expand_unop and
	expand_abs_nojump and generalize.  Use operand_subword and
	emit_no_conflict_block.  Support large modes.
	(expand_abs_nojump): Use it.  Use HONOR_SIGNED_ZEROS to fall
	back to maximum.
	(expand_unop): Likewise.  Use HONOR_SIGNED_ZEROS to fall back
	negation to subtraction.
	(expand_copysign): Check that the format has signed zeros.
	Use operand_subword and emit_no_conflict_block.  Support large modes.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7334&r2=2.7335
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/optabs.c.diff?cvsroot=gcc&r1=1.255&r2=1.256

Comment 9 GCC Commits 2005-01-31 09:02:44 UTC
Subject: Bug 19696

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-01-31 09:02:35

Modified files:
	gcc            : ChangeLog optabs.c 

Log message:
	PR 19696
	* optabs.c (expand_copysign_absneg): New.
	(expand_copysign_bit): Split out from ...
	(expand_copysign): ... here.  Use expand_copysign_absneg.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7337&r2=2.7338
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/optabs.c.diff?cvsroot=gcc&r1=1.256&r2=1.257

Comment 10 John David Anglin 2005-02-01 01:32:12 UTC
Fixed om PA.  Thanks.
Comment 11 GCC Commits 2005-02-01 20:57:58 UTC
Subject: Bug 19696

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-02-01 20:57:23

Modified files:
	gcc            : ChangeLog optabs.c optabs.h 
	gcc/config/rs6000: rs6000.md 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gcc.c-torture/execute/ieee: copysign1.c 
	                                          copysign2.c 

Log message:
	PR 19696
	* optabs.c (expand_copysign_absneg): Export.
	* optabs.h (expand_copysign_absneg): Declare.
	* config/rs6000/rs6000.md (copysigntf3): New.
	
	* gcc.c-torture/execute/ieee/copysign1.c: Special case sizeof
	long double for ibm double-double format.
	* gcc.c-torture/execute/ieee/copysign2.c: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7366&r2=2.7367
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/optabs.c.diff?cvsroot=gcc&r1=1.257&r2=1.258
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/optabs.h.diff?cvsroot=gcc&r1=1.46&r2=1.47
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.345&r2=1.346
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4974&r2=1.4975
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/ieee/copysign1.c.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/ieee/copysign2.c.diff?cvsroot=gcc&r1=1.2&r2=1.3

Comment 12 Richard Henderson 2005-02-01 21:01:39 UTC
Fixed.