Bug 14610 - [3.4 Only] __float80 constants incorrectly emitted
Summary: [3.4 Only] __float80 constants incorrectly emitted
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.4.1
Assignee: Zack Weinberg
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2004-03-16 18:39 UTC by Zack Weinberg
Modified: 2005-02-09 02:18 UTC (History)
1 user (show)

See Also:
Host: ia64-hp-hpux11.23
Target: ia64-hp-hpux11.23
Build: ia64-hp-hpux11.23
Known to work: 4.0.0
Known to fail: 3.4.0
Last reconfirmed: 2004-03-16 18:40:33


Attachments
test case 1 (125 bytes, text/plain)
2004-03-16 18:40 UTC, Zack Weinberg
Details
test case 2 (156 bytes, text/plain)
2004-03-16 18:40 UTC, Zack Weinberg
Details
candidate patch (2.17 KB, patch)
2004-06-15 05:17 UTC, Zack Weinberg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zack Weinberg 2004-03-16 18:39:21 UTC
I will attach two test cases to this bug.  Both are believed to exhibit the same
underlying problem, namely that __float80 constants are incorrectly emitted to
the assembly file.  float80-1.c demonstrates the problem at all optimization
levels; float80-2.c requires -minline-int-divide-max-throughput.  They are
formatted for the GCC testsuite - abort on failure, exit 0 on success, no output.
Comment 1 Zack Weinberg 2004-03-16 18:40:03 UTC
Created attachment 5932 [details]
test case 1
Comment 2 Zack Weinberg 2004-03-16 18:40:21 UTC
Created attachment 5933 [details]
test case 2
Comment 3 Zack Weinberg 2004-06-15 05:17:41 UTC
Created attachment 6529 [details]
candidate patch

Here's a candidate patch for the bug.  Basically, encode_ieee_extended was
incorrectly assuming that big-endian meant Motorola format.
Comment 4 CVS Commits 2004-06-17 17:05:54 UTC
Subject: Bug 14610

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	zack@gcc.gnu.org	2004-06-17 17:05:49

Modified files:
	gcc            : ChangeLog Makefile.in real.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: ia64-float80-1.c ia64-float80-2.c 

Log message:
	Bug 14610
	* Makefile.in (min-insn-modes.o): Correct dependencies.
	* real.c (encode_ieee_extended, decode_ieee_extended): Always
	produce/consume 12-byte little-endian Intel format.
	(encode_ieee_extended_128, decode_ieee_extended_128): Delete.
	(encode_ieee_extended_motorola, decode_ieee_extended_motorola)
	(encode_ieee_extended_intel_96, decode_ieee_extended_intel_96)
	(encode_ieee_extended_intel_128, decode_ieee_extended_intel_128):
	New functions which convert between 12-byte little-endian Intel
	format and the desired format.
	(ieee_extended_motorola_format, ieee_extended_intel_96_round_53_format)
	(ieee_extended_intel_96_format, ieee_extended_intel_128_format):
	Update.
	testsuite:
	* gcc.dg/ia64-float80-1.c, gcc.dg/ia64-float80-2.c: New testcases.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4014&r2=2.4015
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.1298&r2=1.1299
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/real.c.diff?cvsroot=gcc&r1=1.144&r2=1.145
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3867&r2=1.3868
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/ia64-float80-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/ia64-float80-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 5 Zack Weinberg 2004-06-17 17:08:40 UTC
Now fixed on mainline.  May be 3.4.1 candidate - leaving open for the moment.
Comment 6 Zack Weinberg 2004-06-17 17:43:10 UTC
adjust milestone - Mark has requested this for 3.4.1 and it will be checked in
as soon as a bootstrap completes.
Comment 7 CVS Commits 2004-06-17 21:57:05 UTC
Subject: Bug 14610

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	zack@gcc.gnu.org	2004-06-17 21:57:01

Modified files:
	gcc            : ChangeLog Makefile.in real.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: ia64-float80-1.c ia64-float80-2.c 

Log message:
	Bug 14610
	* Makefile.in (min-insn-modes.o): Correct dependencies.
	* real.c (encode_ieee_extended, decode_ieee_extended): Always
	produce/consume 12-byte little-endian Intel format.
	(encode_ieee_extended_128, decode_ieee_extended_128): Delete.
	(encode_ieee_extended_motorola, decode_ieee_extended_motorola)
	(encode_ieee_extended_intel_96, decode_ieee_extended_intel_96)
	(encode_ieee_extended_intel_128, decode_ieee_extended_intel_128):
	New functions which convert between 12-byte little-endian Intel
	format and the desired format.
	(ieee_extended_motorola_format, ieee_extended_intel_96_round_53_format)
	(ieee_extended_intel_96_format, ieee_extended_intel_128_format):
	Update.
	testsuite:
	* gcc.dg/ia64-float80-1.c, gcc.dg/ia64-float80-2.c: New testcases.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.511&r2=2.2326.2.512
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1223.2.16&r2=1.1223.2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/real.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.135.4.5&r2=1.135.4.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.209&r2=1.3389.2.210
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/ia64-float80-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/ia64-float80-2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1

Comment 8 Zack Weinberg 2004-06-17 21:59:36 UTC
done.