From owner-svn-src-vendor@FreeBSD.ORG Tue Mar 8 21:06:17 2011 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B17F0106564A; Tue, 8 Mar 2011 21:06:17 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CE5A8FC17; Tue, 8 Mar 2011 21:06:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p28L6HuO086761; Tue, 8 Mar 2011 21:06:17 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p28L6Hjw086756; Tue, 8 Mar 2011 21:06:17 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201103082106.p28L6Hjw086756@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 8 Mar 2011 21:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219409 - vendor/tzdata/dist X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 21:06:17 -0000 Author: edwin Date: Tue Mar 8 21:06:17 2011 New Revision: 219409 URL: http://svn.freebsd.org/changeset/base/219409 Log: Vendor import of tzdata2011c - No leapsecond in June 2011 - Add and update timezones for America/Juneau, America/Sitka, America/Metlakatla - Change of Summer time to Winter time in Chili happens in April 2011, not in March 2011. Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/leapseconds vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/leapseconds ============================================================================== --- vendor/tzdata/dist/leapseconds Tue Mar 8 20:13:29 2011 (r219408) +++ vendor/tzdata/dist/leapseconds Tue Mar 8 21:06:17 2011 (r219409) @@ -1,5 +1,5 @@ #
-# @(#)leapseconds	8.10
+# @(#)leapseconds	8.11
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -56,13 +56,13 @@ Leap	2008	Dec	31	23:59:60	+	S
 # SERVICE DE LA ROTATION TERRESTRE
 # OBSERVATOIRE DE PARIS
 # 61, Av. de l'Observatoire 75014 PARIS (France)
-# Tel.      : 33 (0) 1 40 51 22 26
+# Tel.      : 33 (0) 1 40 51 22 29
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 14 July 2010
+# Paris, 2 February 2011
 #
-# Bulletin C 40
+# Bulletin C 41
 #
 # To authorities responsible
 # for the measurement and
@@ -70,9 +70,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2010.
+# NO positive leap second will be introduced at the end of June 2011.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :
+# International Atomic Time TAI is :		
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -82,6 +82,6 @@ Leap	2008	Dec	31	23:59:60	+	S
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director
-# Earth Orientation Center of IERS
+# Head			
+# Earth Orientation Center of the IERS
 # Observatoire de Paris, France

Modified: vendor/tzdata/dist/northamerica
==============================================================================
--- vendor/tzdata/dist/northamerica	Tue Mar  8 20:13:29 2011	(r219408)
+++ vendor/tzdata/dist/northamerica	Tue Mar  8 21:06:17 2011	(r219409)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.40
+# @(#)northamerica	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -426,15 +426,74 @@ Zone America/Los_Angeles -7:52:58 -	LMT	
 # were nearby inhabitants in some cases and for our purposes perhaps
 # it's best to simply use the official transition.
 #
+
+# From Steve Ferguson (2011-01-31):
+# The author lives in Alaska and many of the references listed are only
+# available to Alaskan residents.
+#
+# 
+# http://www.alaskahistoricalsociety.org/index.cfm?section=discover%20alaska&page=Glimpses%20of%20the%20Past&viewpost=2&ContentId=98
+# 
+
+# From Arthur David Olson (2011-02-01):
+# Here's database-relevant material from the 2001 "Alaska History" article:
+#
+# On September 20 [1979]...DOT...officials decreed that on April 27,
+# 1980, Juneau and other nearby communities would move to Yukon Time.
+# Sitka, Petersburg, Wrangell, and Ketchikan, however, would remain on
+# Pacific Time.
+#
+# ...on September 22, 1980, DOT Secretary Neil E. Goldschmidt rescinded the
+# Department's September 1979 decision. Juneau and other communities in
+# northern Southeast reverted to Pacific Time on October 26.
+#
+# On October 28 [1983]...the Metlakatla Indian Community Council voted
+# unanimously to keep the reservation on Pacific Time.
+#
+# According to DOT official Joanne Petrie, Indian reservations are not
+# bound to follow time zones imposed by neighboring jurisdictions.
+#
+# (The last is consistent with how the database now handles the Navajo
+# Nation.)
+
+# From Arthur David Olson (2011-02-09):
+# I just spoke by phone with a staff member at the Metlakatla Indian
+# Community office (using contact information available at
+# 
+# http://www.commerce.state.ak.us/dca/commdb/CIS.cfm?Comm_Boro_name=Metlakatla
+# ).
+# It's shortly after 1:00 here on the east coast of the United States;
+# the staffer said it was shortly after 10:00 there. When I asked whether
+# that meant they were on Pacific time, they said no--they were on their
+# own time. I asked about daylight saving; they said it wasn't used. I
+# did not inquire about practices in the past.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
+			 -8:00	US	P%sT	1980 Apr 27 2:00
+			 -9:00	US	Y%sT	1980 Oct 26 2:00	
+			 -8:00	US	P%sT	1983 Oct 30 2:00
+			 -9:00	US	Y%sT	1983 Nov 30
+			 -9:00	US	AK%sT
+Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+			 -9:01:13 -	LMT	1900 Aug 20 12:00
+			 -8:00	-	PST	1942
+			 -8:00	US	P%sT	1946
+			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
+Zone America/Metlakatla	 15:13:42 -	LMT	1867 Oct 18
+			 -8:46:18 -	LMT	1900 Aug 20 12:00
+			 -8:00	-	PST	1942
+			 -8:00	US	P%sT	1946
+			 -8:00	-	PST	1969
+			 -8:00	US	P%sT	1983 Oct 30 2:00
+			 -8:00	US	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942

Modified: vendor/tzdata/dist/southamerica
==============================================================================
--- vendor/tzdata/dist/southamerica	Tue Mar  8 20:13:29 2011	(r219408)
+++ vendor/tzdata/dist/southamerica	Tue Mar  8 21:06:17 2011	(r219409)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.44
+# @(#)southamerica	8.45
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1154,6 +1154,23 @@ Zone America/Rio_Branco	-4:31:12 -	LMT	1
 # From Arthur Daivd Olson (2010-03-06):
 # Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch.
 
+# From Glenn Eychaner (2011-03-02): [geychaner@mac.com]
+# It appears that the Chilean government has decided to postpone the
+# change from summer time to winter time again, by three weeks to April
+# 2nd:
+# 
+# http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651
+# 
+#
+# This is not yet reflected in the offical "cambio de hora" site, but
+# probably will be soon:
+# 
+# http://www.horaoficial.cl/cambio.htm
+# 
+
+# From Arthur David Olson (2011-03-02):
+# The emol.com article mentions a water shortage as the cause of the
+# postponement, which may mean that it's not a permanent change.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Chile	1927	1932	-	Sep	 1	0:00	1:00	S
 Rule	Chile	1928	1932	-	Apr	 1	0:00	0	-
@@ -1189,8 +1206,8 @@ Rule	Chile	2000	2007	-	Mar	Sun>=9	3:00u	
 # which is used below in specifying the transition.
 Rule	Chile	2008	only	-	Mar	30	3:00u	0	-
 Rule	Chile	2009	only	-	Mar	Sun>=9	3:00u	0	-
-Rule	Chile	2010	only	-	Apr	 4	3:00u	0	-
-Rule	Chile	2011	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2010	2011	-	Apr	Sun>=1	3:00u	0	-
+Rule	Chile	2012	max	-	Mar	Sun>=9	3:00u	0	-
 # IATA SSIM anomalies: (1992-02) says 1992-03-14;
 # (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Tue Mar  8 20:13:29 2011	(r219408)
+++ vendor/tzdata/dist/zone.tab	Tue Mar  8 21:06:17 2011	(r219409)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.40
+# @(#)zone.tab	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -412,9 +412,11 @@ US	+332654-1120424	America/Phoenix	Mount
 US	+340308-1181434	America/Los_Angeles	Pacific Time
 US	+611305-1495401	America/Anchorage	Alaska Time
 US	+581807-1342511	America/Juneau	Alaska Time - Alaska panhandle
+US	+571035-1351807	America/Sitka	Alaska Time - southeast Alaska panhandle
 US	+593249-1394338	America/Yakutat	Alaska Time - Alaska panhandle neck
 US	+643004-1652423	America/Nome	Alaska Time - west Alaska
 US	+515248-1763929	America/Adak	Aleutian Islands
+US	+550737-1313435	America/Metlakatla	Metlakatla Time - Annette Island
 US	+211825-1575130	Pacific/Honolulu	Hawaii
 UY	-3453-05611	America/Montevideo
 UZ	+3940+06648	Asia/Samarkand	west Uzbekistan

From owner-svn-src-vendor@FreeBSD.ORG  Tue Mar  8 21:07:54 2011
Return-Path: 
Delivered-To: svn-src-vendor@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 01903106566C;
	Tue,  8 Mar 2011 21:07:54 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C95AE8FC1F;
	Tue,  8 Mar 2011 21:07:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p28L7r3K086840;
	Tue, 8 Mar 2011 21:07:53 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p28L7rFC086839;
	Tue, 8 Mar 2011 21:07:53 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201103082107.p28L7rFC086839@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 8 Mar 2011 21:07:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219410 - vendor/tzdata/tzdata2011c
X-BeenThere: svn-src-vendor@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the vendor work area tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 08 Mar 2011 21:07:54 -0000

Author: edwin
Date: Tue Mar  8 21:07:53 2011
New Revision: 219410
URL: http://svn.freebsd.org/changeset/base/219410

Log:
  Tag of tzdata2011c

Added:
  vendor/tzdata/tzdata2011c/
     - copied from r219409, vendor/tzdata/dist/

From owner-svn-src-vendor@FreeBSD.ORG  Wed Mar  9 06:14:33 2011
Return-Path: 
Delivered-To: svn-src-vendor@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 58E791065672;
	Wed,  9 Mar 2011 06:14:33 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 463598FC0C;
	Wed,  9 Mar 2011 06:14:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p296EXmT098932;
	Wed, 9 Mar 2011 06:14:33 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p296EXno098927;
	Wed, 9 Mar 2011 06:14:33 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201103090614.p296EXno098927@svn.freebsd.org>
From: David Schultz 
Date: Wed, 9 Mar 2011 06:14:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219422 - in vendor/gdtoa/dist: . test
X-BeenThere: svn-src-vendor@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the vendor work area tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 09 Mar 2011 06:14:33 -0000

Author: das
Date: Wed Mar  9 06:14:33 2011
New Revision: 219422
URL: http://svn.freebsd.org/changeset/base/219422

Log:
  Import gdtoa sources dated 2011-03-04.  This version includes a number
  of bugfixes, although I believe we already have local patches for the
  ones people are likely to notice.
  
  Per a request from arundel@, I also added the vendor's change log,
  which is available separately from ftp://ftp.netlib.org/fp/.

Added:
  vendor/gdtoa/dist/changes
  vendor/gdtoa/dist/printf.c   (contents, props changed)
  vendor/gdtoa/dist/printf.c0
  vendor/gdtoa/dist/stdio1.h   (contents, props changed)
  vendor/gdtoa/dist/test/pfLqtestnos
  vendor/gdtoa/dist/test/pftest.c   (contents, props changed)
  vendor/gdtoa/dist/test/pftestLq.out
  vendor/gdtoa/dist/test/pftestQ.out
  vendor/gdtoa/dist/test/pftestnos
  vendor/gdtoa/dist/test/pftestx.out
Modified:
  vendor/gdtoa/dist/README
  vendor/gdtoa/dist/dtoa.c
  vendor/gdtoa/dist/g__fmt.c
  vendor/gdtoa/dist/g_ddfmt.c
  vendor/gdtoa/dist/g_dfmt.c
  vendor/gdtoa/dist/gdtoa.c
  vendor/gdtoa/dist/gdtoa.h
  vendor/gdtoa/dist/gdtoaimp.h
  vendor/gdtoa/dist/gethex.c
  vendor/gdtoa/dist/hexnan.c
  vendor/gdtoa/dist/makefile
  vendor/gdtoa/dist/misc.c
  vendor/gdtoa/dist/smisc.c
  vendor/gdtoa/dist/strtoIg.c
  vendor/gdtoa/dist/strtod.c
  vendor/gdtoa/dist/strtodI.c
  vendor/gdtoa/dist/strtodg.c
  vendor/gdtoa/dist/strtof.c
  vendor/gdtoa/dist/strtopdd.c
  vendor/gdtoa/dist/strtopf.c
  vendor/gdtoa/dist/strtopx.c
  vendor/gdtoa/dist/strtopxL.c
  vendor/gdtoa/dist/strtordd.c
  vendor/gdtoa/dist/strtorf.c
  vendor/gdtoa/dist/strtorx.c
  vendor/gdtoa/dist/strtorxL.c
  vendor/gdtoa/dist/test/Qtest.c
  vendor/gdtoa/dist/test/README
  vendor/gdtoa/dist/test/ddtest.c
  vendor/gdtoa/dist/test/dt.c
  vendor/gdtoa/dist/test/dtest.c
  vendor/gdtoa/dist/test/ftest.c
  vendor/gdtoa/dist/test/getround.c
  vendor/gdtoa/dist/test/makefile
  vendor/gdtoa/dist/test/strtodt.c
  vendor/gdtoa/dist/test/testnos3
  vendor/gdtoa/dist/test/xLtest.c
  vendor/gdtoa/dist/test/xQtest.c
  vendor/gdtoa/dist/test/xsum0.out
  vendor/gdtoa/dist/test/xtest.c
  vendor/gdtoa/dist/ulp.c
  vendor/gdtoa/dist/xsum0.out

Modified: vendor/gdtoa/dist/README
==============================================================================
--- vendor/gdtoa/dist/README	Wed Mar  9 05:59:33 2011	(r219421)
+++ vendor/gdtoa/dist/README	Wed Mar  9 06:14:33 2011	(r219422)
@@ -353,5 +353,12 @@ you also compile with -DNO_LOCALE_CACHE,
 current "decimal point" character string are cached and assumed not
 to change during the program's execution.
 
+On machines with a 64-bit long double and perhaps a 113-bit "quad"
+type, you can invoke "make Printf" to add Printf (and variants, such
+as Fprintf) to gdtoa.a.  These are analogs, declared in stdio1.h, of
+printf and fprintf, etc. in which %La, %Le, %Lf, and %Lg are for long
+double and (if appropriate) %Lqa, %Lqe, %Lqf, and %Lqg are for quad
+precision printing.
+
 Please send comments to	David M. Gay (dmg at acm dot org, with " at "
 changed at "@" and " dot " changed to ".").

Added: vendor/gdtoa/dist/changes
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/gdtoa/dist/changes	Wed Mar  9 06:14:33 2011	(r219422)
@@ -0,0 +1,672 @@
+Sun Jun 30 13:48:26 EDT 1991:
+  dtoa.c: adjust dtoa to allow negative ndigits for modes 3,5,7,9
+(fixed-point mode); fix rounding bug in these modes when the input
+d (to be converted) satisfies 10^-(ndigits+1) <= |d| < 10^-ndigits ,
+i.e., when the result, before rounding, would be empty but might
+round to one digit.  Adjust the decpt returned in these modes when
+the result is empty (i.e., when |d| <= 5 * 10^-ndigits).
+
+Tue Jul  2 21:44:00 EDT 1991
+  Correct an inefficiency introduced 2 days ago in dtoa's handling of
+integers in modes 0, 1.
+
+Mon Sep  9 23:29:38 EDT 1991
+  dtoa.c: remove superfluous declaration of size_t.
+
+Sun Oct  6 15:34:15 EDT 1991
+  dtoa.c: fix another bug in modes 3,5,7,9 when the result, before
+rounding, would be empty, but rounds to one digit: *decpt was low by
+one.
+
+Sat Jan 18 12:30:04 EST 1992
+  dtoa.c: add some #ifdef KR_headers lines relevant only if IBM is
+defined; for input decimal strings representing numbers too large, have
+strtod return HUGE_VAL only if __STDC__ is defined; otherwise have it
+return +-Infinity for IEEE arithmetic, +- the largest machine number
+for IBM and VAX arithmetic.  (If __STDC__ is not defined, HUGE_VAL may
+not be defined either, or it may be wrong.)
+
+Mon Apr 27 23:13:43 EDT 1992
+  dtoa.c: tweak strtod (one-line addition) so the end-pointer = start
+pointer when the input has, e.g., only white space.
+
+Thu May  7 18:04:46 EDT 1992
+  dtoa.c: adjust treatment of exponent field (in strtod) to behave
+reasonably with huge numbers and 16-bit ints.
+
+Fri Jun 19 08:29:02 EDT 1992
+  dtoa.c: fix a botch in placement of #ifdef __cplusplus (which only
+matters if you're using a C++ compiler).
+
+Wed Oct 21 11:23:07 EDT 1992
+  dtoa.c: add #ifdef Bad_float_h lines for systems with missing or
+inferior float.h .
+
+Thu Apr 22 07:54:48 EDT 1993
+  dtoa.c: change < to <= in line 2059:
+<	for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j < i;
+---
+>	for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j <= i;
+With 32-bit ints, the former could give too small a block for the return
+value when, e.g., mode = 2 or 4 and ndigits = 24 (16 for 16-bit ints).
+
+Mon Jun 21 12:56:42 EDT 1993
+  dtoa.c: tweak to work with 32-bit ints and 64-bit longs
+when compiled with -DLong=int .
+
+Wed Jan 26 11:09:16 EST 1994
+  dtoa.c: fix bug in strtod's handling of numbers with very
+negative exponents (e.g. 1.8826e-512), which should underflow to 0;
+fix storage leak in strtod with underflows and overflows near
+the underflow and overflow thresholds.
+
+Mon Feb 28 11:37:30 EST 1994
+  dtoa.c:
+85a86,89
+>  * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n)
+>  *	if memory is available and otherwise does something you deem
+>  *	appropriate.  If MALLOC is undefined, malloc will be invoked
+>  *	directly -- and assumed always to succeed.
+87a92,95
+> #ifndef MALLOC
+> #define MALLOC malloc
+> #endif
+>
+352c360
+< 		rv = (Bigint *)malloc(sizeof(Bigint) + (x-1)*sizeof(Long));
+---
+> 		rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(Long));
+
+Thu Mar  3 16:56:39 EST 1994
+  dtoa.c: if MALLOC is #defined, declare it.
+
+Wed Jan  4 15:45:34 EST 1995
+  dtoa.c: add CONST qualification to tens, bigtens, tinytens (for use
+on embedded systems with little spare RAM).
+
+Fri Mar  1 08:55:39 EST 1996
+  g_fmt.c: honor the sign of 0 and return the first argument (buf).
+
+Sat Jul  6 07:59:28 EDT 1996
+  dtoa.c: cosmetic changes: "ULong" rather than "unsigned Long";
+update comments to reflect AT&T breakup.
+
+Mon Aug  5 23:31:24 EDT 1996
+  dtoa.c: add comment about invoking _control87(PC_53, MCW_PC)
+(or the equivalent) on 80x87 machines before calling strtod or dtoa.
+
+Tue Dec 17 15:01:56 EST 1996
+  dtoa.c: new #define possibilities: #define INFNAN_CHECK to have
+strtod check (case insensitively) for "Infinity" and "NaN" on machines
+with IEEE arithmetic; #define MULTIPLE_THREADS if the system offers
+preemptively scheduled multiple threads, in which case you must supply
+routines ACQUIRE_DTOA_LOCK(n) and FREE_DTOA_LOCK(n) (n = 0 or 1).
+New void freedtoa(char*) for freeing values returned by dtoa; use of
+freedtoa() is required if MULTIPLE_THREADS is #defined, and is merely
+recommended otherwise.
+  g_fmt.c: adjusted to invoke freedtoa().
+
+Wed Feb 12 00:40:01 EST 1997
+  dtoa.c: strtod: on IEEE systems, scale to avoid intermediate
+underflows when the result does not underflow; compiling with
+-DNO_IEEE_Scale restores the old logic.  Fix a bug, revealed by
+input string 2.2250738585072012e-308, in treating input just less
+than the smallest normalized number.  (The bug introduced an extra
+ULP of error in this special case.)
+
+Tue May 12 11:13:04 EDT 1998
+  dtoa.c: strtod: fix a glitch introduced with the scaling of 19970212
+that caused one-bit rounding errors in certain denormal numbers, such
+as 8.44291197326099e-309, which was read as 8.442911973260987e-309.
+Remove #ifdef Unsigned_Shifts logic in favor of unsigned arithmetic.
+Unless compiled with -DNO_LONG_LONG, use 64-bit arithmetic where
+possible.
+
+Fri May 15 07:49:07 EDT 1998
+  dtoa.c: strtod: fix another glitch with scaling to avoid underflow
+with IEEE arithmetic, again revealed by the input string
+2.2250738585072012e-308, which was rounded to the largest denormal
+rather than the smallest normal double precision number.
+
+Wed Aug  5 23:27:26 EDT 1998
+  gdtoa.tar.gz: tweaks in response to comments from Shawn C. Sheridan
+(with no effect on the resulting .o files except when strtod.c is
+compiled with -DNO_ERRNO); bigtens --> bigtens_D2A (a symbol meant
+to be private to gdtoa.a).
+
+Sat Sep 12 17:05:15 EDT 1998
+  gdtoa.tar.gz: more changes in response to comments from Shawn C.
+Sheridan (including repair of a glitch in g_ffmt.c).  For consistency
+and possible convenience, there are some new functions and some name
+changes to existing ones:
+	Old	New
+	---	g_xLfmt
+	strtoQ	strtopQ
+	---	strtopd
+	strtodd	strtopdd
+	---	strtopf
+	strtox	strtopx
+	---	strtopxL
+	---	strtorxL
+	---	strtoIxL
+Functions strtopd and strtopf are variations of strtod and strtof,
+respectively, which write their results to their final (pointer)
+arguments.  Functions strtorf and strtord are now analogous to the
+other strtor* functions in that they now have a final pointer
+argument to which they write their results, and they return the
+int value they get from strtodg.
+  The xL family (g_xLfmt, strto[Irp]xL) is a variation of the old x
+family (for 80-bit IEEE double-extended precision) that assumes the
+storage layout of the Motorola 68881's double-extended format:  80
+interesting bits stored in 3 unsigned 32-bit ints (with a "hole", 16
+zero bits, in the word that holds the sign and exponent).  The x
+family now deals with 80-bit (5 unsigned 16-bit ints) rather than
+96-bit arrays (3 unsigned 32-bit ints) that hold its 80-bit
+double-extended values.  (This relaxes the alignment requirements of
+the x family and results in strto[Ipr]x writing 80 rather than 96 bits
+to their final arguments.)
+  Each g_*fmt routine now returns a pointer to the null character
+that terminates the strings it writes, rather than a pointer to
+the beginning of that string (the first argument).  These routines
+still return 0 (NULL) if the first argument is too short.
+  The second argument to g_dfmt is now pointer (to a double) rather
+than a double value.
+
+Thu Oct 29 21:54:00 EST 1998
+  dtoa.c: Fix bug in strtod under -DSudden_Underflow and (the default)
+-DAvoid_Underflow: some numbers that should have suffered sudden
+underflow were scaled inappropriately (giving nonzero return values).
+Example: "1e-320" gave -3.6304123742133376e+280 rather than 0.
+
+Mon Nov  2 15:41:16 EST 1998
+  dtoa.c: tweak to remove LL suffixes from numeric constants (for
+compilers that offer a 64-bit long long type but do not recognize the
+LL constants prescribed by C9x, the proposed update to the ANSI/ISO C
+standard).  Thanks to Earl Chew for pointing out the existence of such
+compilers.
+  gdtoa.tar.gz: renamed gdtoa.tgz and updated to incorporate the above
+changes (of 29 Oct. and 2 Nov. 1998) to dtoa.c.
+
+Thu Mar 25 17:56:44 EST 1999
+  dtoa.c, gdtoa.tgz: fix a bug in strtod's reading of 4.9e-324:
+it returned 0 rather than the smallest denormal.
+
+Mon Apr 12 10:39:25 EDT 1999
+  gdtoa.tgz: test/ftest.c: change %.7g to %.8g throughout.
+
+Fri Aug 20 19:17:52 EDT 1999
+  gdtoa.tgz: gdtoa.c: fix two bugs reported by David Chase (thanks!):
+1. An adjustment for denormalized numbers around 503 was off by one.
+2. A check for "The special case" around line 551 omitted the condition
+that we not be at the bottom of the exponent range.
+
+Mon Sep 13 10:53:34 EDT 1999
+  dtoa.c: computationally invisible tweak for the benefit of people
+who actually read the code:
+
+2671c2671
+< 		 && word0(d) & Exp_mask
+---
+> 		 && word0(d) & (Exp_mask & Exp_mask << 1)
+
+I.e., in dtoa(), the "special case" does not arise for the smallest
+normalized IEEE double.  Thanks to Waldemar Horwat for pointing this
+out and suggesting the modified test above.  Also, some tweaks for
+compilation with -DKR_headers.
+  gdtoa.tgz: gdtoa.c: analogous change:
+
+552c552
+< 		if (bbits == 1 && be0 > fpi->emin) {
+---
+> 		if (bbits == 1 && be0 > fpi->emin + 1) {
+
+This has no effect on the g*fmt.c routines, but might affect the
+computation of the shortest decimal string that rounds to the
+smallest normalized floating-point number of other precisions.
+  gdota.tgz: test/d.out test/dI.out test/dd.out: updated to reflect
+previous changes (of 19990820); test/*.c: most test programs modified
+to permit #hex input.  See the comments.
+
+Fri Sep 17 01:39:25 EDT 1999
+  Try again to update dtoa.c: somehow dtoa.c got put back to a version
+from 3 years ago after this "changes" file was updated on 13 Sept. 1999.
+One more tweak to omit a warning on some systems:
+2671c2671
+<		 && word0(d) & (Exp_mask & Exp_mask << 1)
+---
+>		 && word0(d) & (Exp_mask & ~Exp_msk1)
+Plus changes to avoid trouble with aggressively optimizing compilers
+(e.g., gcc 2.95.1 under -O2).  On some systems, these changes do not
+affect the resulting machine code; on others, the old way of viewing
+a double as a pair of ULongs is available with -DYES_ALIAS.
+
+Tue Sep 21 09:21:25 EDT 1999
+  gdtoa.tgz: changes analogous to those of 17 Sept. 1999 to dtoa.c to
+avoid trouble with aggressively optimizing compilers.
+
+Wed Dec 15 13:14:38 EST 1999
+  dtoa.c: tweak to bypass a bug with HUGE_VAL on HP systems.
+
+Mon Jan 17 18:32:52 EST 2000
+  dtoa.c and gdtoa.tgz: strtod: set errno = ERANGE on all inputs that
+underflow to zero (not just those sufficiently less than the smallest
+positive denormalized number).
+  gdtoa.tgz: README: point out that compiling with -DNO_ERRNO inhibits
+errno assignments (by strtod and the core converter, strtodg).
+
+Tue Jan 18 16:35:31 EST 2000
+  dtoa.c and gdtoa.tgz: strtod: modify the test inserted yesterday so
+it may work correctly with buggy 80x87 compilers.  (The change matters,
+e.g., to Microsoft Visual C++ 4.2 and 6.0.)
+
+Thu Nov  2 21:00:45 EST 2000
+  dtoa.c and gdtoa.tgz:
+1. Fix bug in test for exact half-way cases of denormalized numbers
+   (without -DNO_IEEE_Scale).
+2. Compilation with -DNO_ERRNO prevents strtod from assigning
+   errno = ERANGE when the result overflows or underflows to 0.
+3. With IEEE arithmetic and no -DNO_IEEE_Scale, adjust scaling so
+   ulp(d) never returns a denormalized number.  This and other tweaks
+   permit strtod and dtoa to work correctly on machines that flush
+   underflows to zero but otherwise use IEEE arithmetic without
+   Sudden_Underflow being #defined (and with strtod simply returning 0
+   instead of denormalized numbers).
+4. Compilations with -DUSE_LOCALE causes strtod to use the current
+   locale's decimal_point value.
+5. Under compilations with -DINFNAN_CHECK, strtod and strtodg (case
+   insensitively) treat "inf" the same as "infinity" and, unless
+   compiled with -DNo_Hex_NaN, accept "nan(x)", where x is a string of
+   hexadecimal digits and spaces, as a NaN whose value is constructed
+   from x (as explained in comments near the top of dtoa.c and in
+   gdtoaimp.h).
+6. The default PRIVATE_MEM is increased slightly (to 2304), and comments
+   near the top of dtoa.c provide more discussion of PRIVATE_MEM.
+7. Meanings of dtoa modes 4,5,8,9 changed.  See comments in dtoa.c and
+   gdtoa.c; modes 4 and 5 may now provide shorter strings that round
+   (in round-nearest mode) to the given double value.  (Paxson's
+   testbase program is unhappy with this new rounding, as it can
+   introduce an error of more than one base-10 ulp when 17 or more
+   decimal digits are requested.)
+8. With IEEE arithmetic, compilation with -DHonor_FLT_ROUNDS causes
+   strtod and dtoa to round according to FLT_ROUNDS:
+	0 ==> towards 0,
+	1 ==> nearest,
+	2 ==> towards +Infinity,
+	3 ==> towards -Infinity.
+9. With IEEE arithmetic, compilation with -DSET_INEXACT causes extra
+   computation (and sometimes slower conversions in dtoa and strtod,
+   particularly for dtoa in cases where otherwise some simple floating-
+   point computations would suffice) to set the IEEE inexact flag
+   correctly.  As comments in dtoa.c explain in more detail, this
+   requires compilation in an environment (such as #include "dtoa.c"
+   in suitable source) that provides
+		int get_inexact(void);
+		void clear_inexact(void);
+10. On input "-x", return 0 rather than -0.
+
+gdtoa.tgz: gethex.c: adjust logic for reading hex constants to accord
+with current wording of the C99 standard.  Previously, I thought hex
+constants read by strtod and friends had to have either a decimal point
+or an exponent field; p. 307 of the C99 standard states that both are
+optional.  Because of the complexity of this reading, it is available
+only in the variant of strtod that appears in gdtoa.tgz.
+
+strtodg (gdtoa.tgz): New return value STRTOG_NaNbits (with
+STRTOG_NoNumber renumbered).  Allow STRTOG_Neg bit in strtodg returns
+for STRTOG_NaN and STRTOG_NaNbits.
+
+gdtoa.tgz: Fix uninitialized variable bug in g_Qfmt.c's handling of NaNs.
+
+Mon Nov 13 14:00:05 EST 2000
+  gdtoa.tgz: strtodg:  fix a storage leak and an apparently rare infinite
+loop with a boundary case of directed rounding.  Example input to
+gdtoa/test/Qtest where the loop bug bit:
+	r 3
+	35184372088831.999999999999999999999999999999999999
+This was revealed by testbase for quad precision Solaris arithmetic;
+it did not show up in several other testbase configurations.
+
+Wed Feb  7 12:56:11 EST 2001
+  dtoa.c:  fix bug (possible infinite loop, e.g., with
+2.47032822920623272e-324) introduced 20001113 in handling the special
+case of a power of 2 to be rounded down one ulp.  Add test (required
+by changes of 20001113) for the extra special case of 2^-1075 (half
+the smallest denormal).
+  gdtoa.tgz: corresponding adjustments to strtod.c and strtodg.c.
+
+Tue Mar 13 00:46:09 EST 2001
+  gdtoa.tgz: gdtoa/strtodg.c: fix bug in handling values exactly half
+an ulp less than the smallest normal floating-point number;
+gdtoa/*test.c: fix glitch in handling "n ..." lines (intended to
+change "ndig").
+
+Wed Mar  6 10:13:52 EST 2002
+  gdtoa.tgz:  add gdtoa/test/strtodt.c and gdtoa/test/testnos3 to test
+strtod on hard cases posted by Fred Tydeman to comp.arch.arithmetic on
+26 Feb. 1996.  Add comment to gdtoa/README about strtod requiring true
+IEEE arithmetic (with 53-bit rounding precision on 80x87 chips).
+In gdtoa/test, automate selection of expected output files [xQ]*.out.
+
+Wed Mar  5 10:35:41 EST 2003
+  gdtoa.tgz:  fix a bug in strtod's handling of 0-valued 0x... "decimal"
+strings.  A fault was possible.  Thanks to David Shultz for reporting
+this bug.
+
+Tue Mar 18 09:38:28 EST 2003
+  gdtoa.tgz:  fix a glitch in strtodg.c with -DUSE_LOCALE; add #ifdef
+USE_LOCALE lines to g__fmt.c (to affect binary --> decimal conversions
+via the g*fmt routines), and add comments about -DUSE_LOCALE to README.
+In short, compiling strtod.c, strtodg.c, and g__fmt.c with -DUSE_LOCALE
+causes them to determine the decimal-point character from the current
+locale.  (Otherwise it is '.'.)
+
+Fri Mar 21 16:36:27 EST 2003
+  gdtoa.tgz:  gethex.c: add #ifdef USE_LOCAL logic; strtod.c: fix a
+glitch in handling 0x... input (the return from gethex was ignored).
+
+Wed Mar 26 15:35:10 EST 2003
+  gdtoa.tgz:  gethex.c:  pedantic (and normally invisible) change:
+use unsigned char for decimalpoint variable (under -DUSE_LOCALE).
+
+Sat Jan 17 23:58:52 MST 2004
+  gdtoa.tgz:  gethex.c:  supply missing parens in test for whether a
+denormal result should be zero, correct logic for rounding up when the
+result is denormal, and when returning zero or Infinity, set *bp = 0;
+strtod.c:  switch on gethex(...)  & STRTOG_Retmask rather than just on
+gethex(), and only copybits(..., bb) when bb is nonzero.  This
+mattered for underflows and overflows in 0x notation.
+
+Thu Mar 25 22:34:56 MST 2004
+ dtoa.c and gdtoa.c/misc.c:  change "(!x & 1)" to "(!x)" to avoid
+confusion by human readers -- the object code is unaffected (with
+reasonable compilers).
+
+Mon Apr 12 00:44:22 MDT 2004
+ dtoa.c and gdtoa.tar.gz:  update contact info. for dmg and correct
+page numbers in comment on Steele & White (1990).
+ gdtoa.tgz:  add strtodnrp.c for a variant of strtod that is slower
+but does not require 53-bit rounding precision on Intel IA32 systems.
+
+Tue Apr 13 00:28:14 MDT 2004
+ gdtoa.tgz: strtod.c: fix glitch when both INFNAN_CHECK and No_Hex_NaN
+are #defined.  Thanks to David Mendenhall for pointing this bug out.
+
+Wed Jan  5 22:39:17 MST 2005
+  gdtoa.tgz:
+    gethex.c:  fix the bug reported by Stefan Farfeleder of ignoring a
+binary-exponent-part if the converted number is zero.
+    strto[pr]x.c: fix bug reported by Stefan Farfeleder in setting the
+exponent of denormals (which should be 0, not 1).
+    g_xfmt.c: fix a corresponding bug with denormals.
+    strtodg.c: fix a bug under IBM (base 16) arithemtic reported
+by Greg Alexander:  a correction to the binary exponent for changes to
+the exponent of a native double value for avoiding overflow had to be
+multiplied by 4 ("e2 <<= 2;").
+    Various files: minor tweaks for portability.
+
+Sat Jan 15 15:36:03 MST 2005
+  gdtoa.tgz: gethex.c:  fix a glitch introduced last week (and reported
+by Stefan Farfelder) with 0x forms with no nonzero digits before the "."
+character, e.g., 0x.1 (which was rendered as 0 rather than .0625).
+  gdtoa.tgz: many files: add automatic computation of gd_qnan.h for
+giving the system-dependent format of a quiet NaN (the one generated
+for Infinity - Infinity).  Tweak test/makefile so differences in the
+spelling of Infinity ("INF" or "Inf" on some systems) do not matter.
+Fix bug in strtod.c and strtodg.c under which, e.g., -.nan was read
+as NaN rather than unacceptable input (causing return 0).  Adjust
+comments in README about nan(...).  Fix glitch in test/dt.c.
+
+Sun Jan 16 18:22:13 MST 2005
+  gdtoa.tgz: strtodg.c: fix long-standing bug in handling input
+that rounds up to 2^nbits, e.g., strtof("16777215.5").  Thanks to
+Edward Moy for reporting this problem.
+  gdtoa.tgz: Fix some bugs with -DJust_16.
+
+Thu Sep 22 22:40:16 MDT 2005
+gdtoa.tgz:
+  strtod.c: unless prevented by -DNO_FENV_H, include C99's fenv.h
+and with hex input, get the current rounding mode from fegetround().
+With decimal input, strtod honors the rounding mode automatically.
+Thanks to David Schultz (das at FreeBSD dot ORG) for pointing
+  strtodg.c: fix a bug with handling numbers very near the largest
+possible one, which were sometimes incorrectly converted to Infinity.
+Thanks to Edward Moy (emoy at apple dot com) for pointing this out.
+  g_Qfmt.c: change strcpy to strcp.  Thanks to J. T. Conklin
+(jtc at acorntoolworks dot com) for pointing this out.
+  test/xtest.c:  fix some subscript bugs.
+  test/x.ou0, test/x.ou1, test/xL.: update in response to the above fix to
+test/xtest.c.
+  test/makefile:  add -lm to some link lines (needed for fegetround).
+
+Sun Jan 21 20:26:44 MST 2007
+gdtoa.tgz:
+  strtodg.c:  fix a botch in the test of whether to increase rvbits
+before terminating the big for(;;) loop with dsign true:  change
+	if (hi0bits(rvb->x[(rvb->wds - 1) >> kshift])
+			!= j)
+		rvbits++;
+to
+	if (hi0bits(rvb->x[rvb->wds - 1]) != j)
+		rvbits++;
+Example of input where this bug bit:  1.9e27.  Thanks to Edward Moy
+ for providing this example.  Also, simplify the
+preceding computation of j.
+  test/README:  add comment that strtodt needs to operate with 53-bit
+rounding precision on Intel x86 systems, and add a pointer to Paxson's
+paper.
+
+Sat Mar 15 11:44:31 MDT 2008
+  dtoa.c and gdtoa.tgz:  with -DINFNAN_CHECK and without
+-DGDOTA_NON_PEDANTIC_NANCHECK, conform to the ill-advised prescription
+in the C99 standard of consuming (...)  in "nan(...)"  even when ...
+is not of the expected form.  Allow an optional 0x or 0X to precede
+the string of hex digits in the expected form of ... .
+  gdtoa.tgz: gethex.c: have, e.g., strtod("0xyz",&se) set se to "xyz".
+Previously it was incorrectly set to "0xyz".
+
+Thu Aug 28 22:37:35 MDT 2008
+  dtoa.c and gdtoa.tgz:  Fix a bug in strtod when compiled with
+-DHonor_FLT_ROUNDS:  in rounding modes other than "to nearest",
+strtod looped on input larger than and within a factor of 2 of
+the largest finite floating-point number.  Since FLT_ROUNDS is buggy
+on some (Linux) systems in that it does not reflect calls on
+fesetround(), when Honor_FLT_ROUNDS is #defined, get the curren
+rounding mode from fegetround() rather than FLT_ROUNDS, unless
+Trust_FLT_ROUNDS is also #defined.
+  gdtoa/test/getround.c in gdtoa.tgz: simply report the current
+rounding mode when the input line is "r" by itself.  (Previously it
+did so, but also complained of invalid input.)
+  gdtoa/gethex.c: fix an off-by-one bug in a rounding test; detect and
+deal with huge exponents (positive or negative).  This affected the
+reading of hexadecimal floating-point values (0x...).  Also set errno
+to ERANGE on out-of-range values (unless compiled with -DNO_ERRNO).
+  gdtoa/strtod.c: adjust scaling of tinytens[4] (as in dtoa.c) to
+avoid double rounding when dealing with numbers near the bottom of
+the exponent range.
+
+Sat Aug 30 23:37:07 MDT 2008
+  gdtoa/gethex.c: ensure *bp is set to something (NULL if nothing else).
+  Bring gdtoa/xsum0.out and gdtoa/test/xsum0.out up to date.
+
+Tue Sep  9 22:08:30 MDT 2008
+  gdtoa/strto*.c and gdtoa/*fmt.c:  if compiled with -DUSE_LOCALE, use
+the current locale's decimal point character string.
+  gdtoa/gdtoa.c: trim trailing zeros in a missed case (e.g., ndigits = 6
+on 1020302).
+  dtoa.c and gdtoa/strtod.c: on systems with IEEE arithmetic (and without
+NO_ERRNO being defined) set ERANGE for denormal values as well as real
+underflows.
+  gdtoa/strtodg.c:  fix an off-by-one bug in rounding to the largest
+representable magnitude when nbits is a multiple of 32.
+  gdtoa/*fmt.c and gdtoa/gdtoa.h:  bufsize changed from unsigned to size_t.
+  gdtoaimp.h, *fmt.c:  change in calling sequence to internal g__fmt(),
+which now explicitly checks bufsize.
+  Relevant routines (see README) honor the current rounding mode if
+compiled with -DHonor_FLT_ROUNDS on IEEE-arithmetic systems that provide
+the C99 fegetround() function.
+  gdtoa/test/getround.c can optionally be compiled with
+-DHonor_FLT_ROUNDS and/or -DUSE_MY_LOCALE for manual testing of gdtoa.a
+compiled with -DHonor_FLT_ROUNDS or -DUSE_LOCALE.
+
+Fri Oct 10 20:07:15 MDT 2008
+  gdtoa/gethex.c:  fix a bug reading hexadecimal floating-point values
+starting with "0xd" for a nonzero digit d (such as "0x1.0002p3").  The
+bug caused the values to be read as zero with endptr set incorrectly.
+
+Tue Oct 28 00:14:08 MDT 2008
+  gdtoa/strtod.c: fix a comment glitch (with commented {}).
+
+Tue Nov 11 23:05:25 MST 2008
+  gdtoa:  fix a glitch in the strto* routines when compiled with
+-DUSE_LOCALE and the locale's decimal-point string is two or more
+characters long.  Wrong conversions were then possible.
+
+Fri Dec  5 18:20:36 MST 2008
+  gdtoa.tgz: fix bugs with reading C99-style hexadecimal floating-point
+values when compiled with -DPack_16; on IEEE-arithmetic systems, make
+INFNAN_CHECK the default unless NO_INFNAN_CHECK is #defined.  (This is
+consistent with dtoa.c, which has worked this way for a while.)
+  dtoa.c:  add recognition of C99-style hexadecimal floating-point
+values (unless compiled with NO_HEX_FP is #defined).
+
+Thu Dec 11 23:10:23 MST 2008
+  dtoa.c: omit an unused variable.
+
+Fri Jan  2 22:45:33 MST 2009
+  dtoa.c: tweak to banish some compiler warnings.
+
+Sun Mar  1 20:57:22 MST 2009
+  dtoa.c, gdtoa/{g__fmt.c, gethex.c, strtod.c, strtodg.c}: change malloc
+to MALLOC.
+  dtoa.c and gdtoa/gdtoaimp.h and gdtoa/misc.c:  reduce Kmax, and use
+MALLOC and FREE or free for huge blocks, which are possible only in
+pathological cases, such as dtoa calls in mode 3 with thousands of
+digits requested, or strtod() calls with thousand of digits.  For the
+latter case, I have an alternate approach that runs much faster
+and uses less memory, but finding time to get it ready for distribution
+may take a while.
+
+Mon Mar 16 00:32:43 MDT 2009
+  dtoa.c:  Fix a bug under -DUSE_LOCALE in handling "decimal point"
+strings more than one character long.
+  dtoa.c and gdtoa/misc.c:  Remove a buggy test activated with
+-DDEBUG.
+  dtoa.c and gdtoa/gdtoa.c: simplify logic for "4 leading 0 bits".
+  dtoa.c:  Add logic (that can be disabled with -DNO_STRTOD_BIGCOMP
+and that) to strtod for more efficiently handling a very long input
+string.  It proceeds by initially truncating the input string, then if
+necessary comparing the whole string with a decimal expansion to
+decide close cases.  This logic is only used for input more than
+STRTOD_DIGLIM digits long (default 40), and for now only applies to
+IEEE arithmetic (for want of other kinds of platforms on which to run
+tests).  This only appears worthwhile for absurdly long input strings,
+so a corresponding update to gdtoa does not seem warranted.
+  dtoa.c, gdtoa.tgz:  tweaks (mostly adding unnecessary parens) to
+silence "gcc -Wall" warnings.  Aside from a couple of minor changes
+to banish erroneous warnings about uninitialized variables, the tweaks
+do not affect the generated object code.
+
+Sat Apr 11 23:25:58 MDT 2009
+  dtoa.c: fix glitch in compiling with -DNo_Hex_NaN and the bug of
+accepting (e.g.) ".nan" or ".inf" as NaN or Infinity.
+  gdtoa.tgz: tweaks to silence warnings from "gcc -Wstrict-aliasing=2";
+update xsum0.out files.
+
+Sun Apr 19 23:40:24 MDT 2009
+  dtoa.c, gdtoa/misc.c:  do not attempt to allocate large memory blocks
+from the private memory pool (which was an unlikely event, but a bug).
+  gdtoa/strtopx.c, gdtoa/strtopxL.c, gdtoa/strtorx.c, gdtoa/strtorxL.c:
+supply explicit bit for Infinity.  Note that the Q routines (which do
+not supply this bit) are appropriate for Sparc quad precision (probably
+known as long double with most current compilers).
+
+Wed Dec  9 08:14:52 MST 2009
+  gdtoa.tgz:  add gdtoa/printf.c* and modify makefile so "make Printf"
+adds a printf to gdtoa.a (to be accessed with #include "stdio1.h" to
+get gdtoa/stdio1.h, which you might install in some standard place).
+On Intel/AMD i386, x86_64, and Sparc systems, this adds formats %La,
+%Le, %Lf and %Lg to handle long double.  On x86_64 systems, it also
+adds %Lqa, %Lqe, %Lqf and %Lqg to handle 128-bit bit types (called
+__float128 by gcc and _Quad by the Intel compiler).  In gdtoa/test,
+"make pf_test" tests this printf (provided the system is an i386,
+x86_64, or Sparc system).  On x86_64 systems, "make pf_testLq" tests
+the %Lq...  formats (briefly).
+
+Mon Jan 11 22:25:17 MST 2010
+  dtoa.c: fix a minor performance bug and, under compilation with -DDEBUG,
+an erroneous error message "oversize b in quorem" in strtod's processing
+of some input that underflows to zero.  Also fix a bug in bigcomp()'s
+handling of numbers that will scale to denormal values.  The increments
+that bigcomp applied were ignoring the effects of denormalization.
+
+Sat Jan 23 00:25:54 MST 2010
+  dtoa.c:  Fix some glitches in recently introduced changes meant to
+speed up returns in pedantic cases.  In quorem, adjust #ifdef DEBUG
+stuff so it does not complain when bigcomp() calls quorem on input
+near the smallest representable number and rounding up by a bit causes
+a quorem return > 9 (which in this case is not a bug).  Fix a memory
+leak in the unlikely case of overflow only being detected after some
+high-precision integer computations.  Fix an off-by-one bug in
+handling a large number of digits with a few nonzero digits, followed
+by many zeros, and then some nonzero digits.  (This does not happen
+with sensible input.)  Fix an off-by-one bug in a recently introduced
+quick test for underflow (i.e., zero result) on input at the bottom of
+the exponent range.  Thanks to Mark Dickinson for pointing these bugs
+out.
+
+  dtoa.c and gdtoa/strtod.c:  Fix an obscure bug in strtod's handling
+of some inputs of many digits at the bottom of the exponent range:
+results were sometimes off by a bit when gdtoa/strtod.c or dtoa.c was
+compiled without -DNO_IEEE_SCALE and, for dtoa.c, when compiled with
+-DNO_STRTOD_BIGCOMP.
+
+  gdtoa/test/testnos3: add some examples that went wrong before
+the present changes.
+
+Sat Jan 23 23:29:02 MST 2010
+  dtoa.c: more tweaks relevant only to absurd input.
+
+Tue Feb  2 23:05:34 MST 2010
+  dtoa.c: add test for setting errno = ERANGE when input of many digits
+is rounded to Infinity or underflows to zero.  Fix a memory leak in
+such instances.
+  gdtoa/strtod.c: make some corresponding changes.
+
+Wed Jul  7 09:25:46 MDT 2010
+  dtoa.c:  adjust to use bigcomp when necessary when compiled with
+-DHonor_FLT_ROUNDS (and without -DNO_STRTOD_BIGCOMP), and the rounding
+mode is torwards +Infinity.  An input (supplied by Rick Regan
+) where this matters is
+1.100000000000000088817841970012523233890533447265626
+  gdtoa/strtod.c:  fix errors (introduced 20090411) when compiled
+with -DHonor_FLT_ROUNDS.
+
+Wed Sep 15 09:00:26 MDT 2010
+  dtoa.c, gdtoa/dtoa.c, gdtoa/gdtoa.c:  fix bugs with -DROUND_BIASED
+pointed out by Jay Foad.
+
+Mon Sep 27 13:43:30 MDT 2010
+  gdtoa/gdtoa.c: fix a glitch (not revealed by compilation) in the
+changes of 15 Sept. 2010.
+
+Fri Nov  5 13:02:41 MDT 2010
+  dtoa.c:  fix a bug related to bigcomp:  decimal strings with all
+zeros before the decimal point more than 40 significant digits that
+required use of bigcomp might be converted very incorrectly.
+Example: .010000000000000000057612911342378542997169 .
+Thanks to Rick Regan  for reporting the
+symptoms and providing an example.
+
+20110403:
+  dtoa.c, gdtoa/gdtoaimp.h, gdtoa/strtod.c:  if
+ROUND_BIASED_without_Round_Up is #defined, assume ROUND_BIASED and
+omit the quick computation that would use ordinary arithmetic to
+compute the correctly rounded result with one rounding error.  If you
+want biased rounding with IEEE-style format "double" and will operate
+with rounding toward +Infinity, it suffices to #define ROUND_BIASED
+(and thus retain the quick computation when it is appropriate).
+  gdtoa/gdtoa.h: change default Long from long to int (with the goal
+of portability when compiling without -DLong=... specified).  On some
+64-bit systems, long is a 64-bit type; we need a 32-bit type here.
+  dtoa.c, gdtoa/gdtoa.c: fix a glith with ndigits with mode = 4 at
+the bottom of the exponent range, e.g., 1e-323.

Modified: vendor/gdtoa/dist/dtoa.c
==============================================================================
--- vendor/gdtoa/dist/dtoa.c	Wed Mar  9 05:59:33 2011	(r219421)
+++ vendor/gdtoa/dist/dtoa.c	Wed Mar  9 06:14:33 2011	(r219422)
@@ -75,10 +75,10 @@ THIS SOFTWARE.
  char *
 dtoa
 #ifdef KR_headers
-	(d, mode, ndigits, decpt, sign, rve)
-	double d; int mode, ndigits, *decpt, *sign; char **rve;
+	(d0, mode, ndigits, decpt, sign, rve)
+	double d0; int mode, ndigits, *decpt, *sign; char **rve;
 #else
-	(double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
+	(double d0, int mode, int ndigits, int *decpt, int *sign, char **rve)
 #endif
 {
  /*	Arguments ndigits, decpt, sign are similar to those
@@ -124,7 +124,8 @@ dtoa
 	ULong x;
 #endif
 	Bigint *b, *b1, *delta, *mlo, *mhi, *S;
-	double d2, ds, eps;
+	U d, d2, eps;
+	double ds;
 	char *s, *s0;
 #ifdef SET_INEXACT
 	int inexact, oldinexact;
@@ -149,35 +150,35 @@ dtoa
 		dtoa_result = 0;
 		}
 #endif
-
-	if (word0(d) & Sign_bit) {
+	d.d = d0;
+	if (word0(&d) & Sign_bit) {
 		/* set sign for everything, including 0's and NaNs */
 		*sign = 1;
-		word0(d) &= ~Sign_bit;	/* clear sign bit */
+		word0(&d) &= ~Sign_bit;	/* clear sign bit */
 		}
 	else
 		*sign = 0;
 
 #if defined(IEEE_Arith) + defined(VAX)
 #ifdef IEEE_Arith
-	if ((word0(d) & Exp_mask) == Exp_mask)
+	if ((word0(&d) & Exp_mask) == Exp_mask)
 #else
-	if (word0(d)  == 0x8000)
+	if (word0(&d)  == 0x8000)
 #endif
 		{
 		/* Infinity or NaN */
 		*decpt = 9999;
 #ifdef IEEE_Arith
-		if (!word1(d) && !(word0(d) & 0xfffff))
+		if (!word1(&d) && !(word0(&d) & 0xfffff))
 			return nrv_alloc("Infinity", rve, 8);
 #endif
 		return nrv_alloc("NaN", rve, 3);
 		}
 #endif
 #ifdef IBM
-	dval(d) += 0; /* normalize */
+	dval(&d) += 0; /* normalize */
 #endif
-	if (!dval(d)) {
+	if (!dval(&d)) {
 		*decpt = 1;
 		return nrv_alloc("0", rve, 1);
 		}
@@ -196,26 +197,26 @@ dtoa
 		}
 #endif
 
-	b = d2b(dval(d), &be, &bbits);
+	b = d2b(dval(&d), &be, &bbits);
 #ifdef Sudden_Underflow
-	i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
+	i = (int)(word0(&d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
 #else
-	if (( i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)) )!=0) {
+	if (( i = (int)(word0(&d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)) )!=0) {
 #endif
-		dval(d2) = dval(d);
-		word0(d2) &= Frac_mask1;
-		word0(d2) |= Exp_11;
+		dval(&d2) = dval(&d);
+		word0(&d2) &= Frac_mask1;
+		word0(&d2) |= Exp_11;
 #ifdef IBM
-		if (( j = 11 - hi0bits(word0(d2) & Frac_mask) )!=0)
-			dval(d2) /= 1 << j;
+		if (( j = 11 - hi0bits(word0(&d2) & Frac_mask) )!=0)
+			dval(&d2) /= 1 << j;
 #endif
 
 		/* log(x)	~=~ log(1.5) + (x-1.5)/1.5
 		 * log10(x)	 =  log(x) / log(10)
 		 *		~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
-		 * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2)
+		 * log10(&d) = (i-Bias)*log(2)/log(10) + log10(&d2)
 		 *
-		 * This suggests computing an approximation k to log10(d) by
+		 * This suggests computing an approximation k to log10(&d) by
 		 *
 		 * k = (i - Bias)*0.301029995663981
 		 *	+ ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
@@ -244,21 +245,21 @@ dtoa
 		/* d is denormalized */
 
 		i = bbits + be + (Bias + (P-1) - 1);
-		x = i > 32  ? word0(d) << 64 - i | word1(d) >> i - 32
-			    : word1(d) << 32 - i;
-		dval(d2) = x;
-		word0(d2) -= 31*Exp_msk1; /* adjust exponent */
+		x = i > 32  ? word0(&d) << (64 - i) | word1(&d) >> (i - 32)
+			    : word1(&d) << (32 - i);
+		dval(&d2) = x;
+		word0(&d2) -= 31*Exp_msk1; /* adjust exponent */
 		i -= (Bias + (P-1) - 1) + 1;
 		denorm = 1;
 		}
 #endif
-	ds = (dval(d2)-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
+	ds = (dval(&d2)-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
 	k = (int)ds;
 	if (ds < 0. && ds != k)
 		k--;	/* want k = floor(ds) */
 	k_check = 1;
 	if (k >= 0 && k <= Ten_pmax) {
-		if (dval(d) < tens[k])
+		if (dval(&d) < tens[k])
 			k--;
 		k_check = 0;
 		}
@@ -297,10 +298,11 @@ dtoa
 		try_quick = 0;
 		}
 	leftright = 1;
+	ilim = ilim1 = -1;	/* Values for cases 0 and 1; done here to */
+				/* silence erroneous "gcc -Wall" warning. */
 	switch(mode) {
 		case 0:
 		case 1:
-			ilim = ilim1 = -1;
 			i = 18;
 			ndigits = 0;
 			break;
@@ -334,7 +336,7 @@ dtoa
 		/* Try to get by with floating-point arithmetic. */
 
 		i = 0;
-		dval(d2) = dval(d);
+		dval(&d2) = dval(&d);
 		k0 = k;
 		ilim0 = ilim;
 		ieps = 2; /* conservative */
@@ -344,7 +346,7 @@ dtoa
 			if (j & Bletch) {
 				/* prevent overflows */
 				j &= Bletch - 1;
-				dval(d) /= bigtens[n_bigtens-1];
+				dval(&d) /= bigtens[n_bigtens-1];
 				ieps++;
 				}
 			for(; j; j >>= 1, i++)
@@ -352,32 +354,32 @@ dtoa
 					ieps++;
 					ds *= bigtens[i];
 					}
-			dval(d) /= ds;
+			dval(&d) /= ds;
 			}
 		else if (( j1 = -k )!=0) {
-			dval(d) *= tens[j1 & 0xf];
+			dval(&d) *= tens[j1 & 0xf];
 			for(j = j1 >> 4; j; j >>= 1, i++)
 				if (j & 1) {
 					ieps++;
-					dval(d) *= bigtens[i];
+					dval(&d) *= bigtens[i];
 					}
 			}
-		if (k_check && dval(d) < 1. && ilim > 0) {
+		if (k_check && dval(&d) < 1. && ilim > 0) {
 			if (ilim1 <= 0)
 				goto fast_failed;
 			ilim = ilim1;
 			k--;
-			dval(d) *= 10.;
+			dval(&d) *= 10.;
 			ieps++;
 			}
-		dval(eps) = ieps*dval(d) + 7.;
-		word0(eps) -= (P-1)*Exp_msk1;
+		dval(&eps) = ieps*dval(&d) + 7.;
+		word0(&eps) -= (P-1)*Exp_msk1;
 		if (ilim == 0) {
 			S = mhi = 0;
-			dval(d) -= 5.;
-			if (dval(d) > dval(eps))
+			dval(&d) -= 5.;
+			if (dval(&d) > dval(&eps))
 				goto one_digit;
-			if (dval(d) < -dval(eps))
+			if (dval(&d) < -dval(&eps))
 				goto no_digits;
 			goto fast_failed;
 			}
@@ -386,34 +388,34 @@ dtoa
 			/* Use Steele & White method of only
 			 * generating digits needed.
 			 */
-			dval(eps) = 0.5/tens[ilim-1] - dval(eps);
+			dval(&eps) = 0.5/tens[ilim-1] - dval(&eps);
 			for(i = 0;;) {
-				L = dval(d);
-				dval(d) -= L;
+				L = dval(&d);
+				dval(&d) -= L;
 				*s++ = '0' + (int)L;
-				if (dval(d) < dval(eps))
+				if (dval(&d) < dval(&eps))
 					goto ret1;
-				if (1. - dval(d) < dval(eps))
+				if (1. - dval(&d) < dval(&eps))
 					goto bump_up;
 				if (++i >= ilim)
 					break;
-				dval(eps) *= 10.;
-				dval(d) *= 10.;
+				dval(&eps) *= 10.;
+				dval(&d) *= 10.;
 				}
 			}
 		else {
 #endif
 			/* Generate ilim digits, then fix them up. */
-			dval(eps) *= tens[ilim-1];
-			for(i = 1;; i++, dval(d) *= 10.) {
-				L = (Long)(dval(d));
-				if (!(dval(d) -= L))
+			dval(&eps) *= tens[ilim-1];
+			for(i = 1;; i++, dval(&d) *= 10.) {
+				L = (Long)(dval(&d));
+				if (!(dval(&d) -= L))
 					ilim = i;
 				*s++ = '0' + (int)L;
 				if (i == ilim) {
-					if (dval(d) > 0.5 + dval(eps))
+					if (dval(&d) > 0.5 + dval(&eps))
 						goto bump_up;
-					else if (dval(d) < 0.5 - dval(eps)) {
+					else if (dval(&d) < 0.5 - dval(&eps)) {
 						while(*--s == '0');
 						s++;
 						goto ret1;
@@ -426,7 +428,7 @@ dtoa
 #endif
  fast_failed:
 		s = s0;
-		dval(d) = dval(d2);
+		dval(&d) = dval(&d2);
 		k = k0;
 		ilim = ilim0;
 		}
@@ -438,22 +440,22 @@ dtoa
 		ds = tens[k];
 		if (ndigits < 0 && ilim <= 0) {
 			S = mhi = 0;
-			if (ilim < 0 || dval(d) <= 5*ds)
+			if (ilim < 0 || dval(&d) <= 5*ds)
 				goto no_digits;
 			goto one_digit;
 			}
-		for(i = 1;; i++, dval(d) *= 10.) {
-			L = (Long)(dval(d) / ds);
-			dval(d) -= L*ds;
+		for(i = 1;; i++, dval(&d) *= 10.) {
+			L = (Long)(dval(&d) / ds);
+			dval(&d) -= L*ds;
 #ifdef Check_FLT_ROUNDS
 			/* If FLT_ROUNDS == 2, L will usually be high by 1 */
-			if (dval(d) < 0) {
+			if (dval(&d) < 0) {
 				L--;
-				dval(d) += ds;
+				dval(&d) += ds;
 				}
 #endif
 			*s++ = '0' + (int)L;
-			if (!dval(d)) {
+			if (!dval(&d)) {
 #ifdef SET_INEXACT
 				inexact = 0;
 #endif
@@ -467,8 +469,13 @@ dtoa
 				  case 2: goto bump_up;
 				  }
 #endif
-				dval(d) += dval(d);
-				if (dval(d) > ds || dval(d) == ds && L & 1) {
+				dval(&d) += dval(&d);
+#ifdef ROUND_BIASED
+				if (dval(&d) >= ds)
+#else
+				if (dval(&d) > ds || (dval(&d) == ds && L & 1))
+#endif
+					{
  bump_up:

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-vendor@FreeBSD.ORG  Wed Mar  9 06:14:58 2011
Return-Path: 
Delivered-To: svn-src-vendor@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 414A1106564A;
	Wed,  9 Mar 2011 06:14:58 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1793D8FC0A;
	Wed,  9 Mar 2011 06:14:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p296Ev4o098976;
	Wed, 9 Mar 2011 06:14:57 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p296Evbs098975;
	Wed, 9 Mar 2011 06:14:57 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201103090614.p296Evbs098975@svn.freebsd.org>
From: David Schultz 
Date: Wed, 9 Mar 2011 06:14:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219423 - vendor/gdtoa/20110304
X-BeenThere: svn-src-vendor@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the vendor work area tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 09 Mar 2011 06:14:58 -0000

Author: das
Date: Wed Mar  9 06:14:57 2011
New Revision: 219423
URL: http://svn.freebsd.org/changeset/base/219423

Log:
  Tag gdtoa-20110304.

Added:
  vendor/gdtoa/20110304/
     - copied from r219422, vendor/gdtoa/dist/

From owner-svn-src-vendor@FreeBSD.ORG  Thu Mar 10 13:59:19 2011
Return-Path: 
Delivered-To: svn-src-vendor@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0A9F8106566C;
	Thu, 10 Mar 2011 13:59:19 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E92358FC13;
	Thu, 10 Mar 2011 13:59:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2ADxI8k045890;
	Thu, 10 Mar 2011 13:59:18 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2ADxHTW045856;
	Thu, 10 Mar 2011 13:59:17 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201103101359.p2ADxHTW045856@svn.freebsd.org>
From: Martin Matuska 
Date: Thu, 10 Mar 2011 13:59:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219451 - in vendor/gcc/dist: gcc gcc/config/mips
	gcc/config/rs6000 gcc/config/s390 gcc/cp gcc/doc libstdc++
	libstdc++/include/std libstdc++/include/tr1
X-BeenThere: svn-src-vendor@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the vendor work area tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Mar 2011 13:59:19 -0000

Author: mm
Date: Thu Mar 10 13:59:17 2011
New Revision: 219451
URL: http://svn.freebsd.org/changeset/base/219451

Log:
  Vendor upgrade of gcc 4.2 to last GPLv2 revision.
  
  PR:		gnu/153298
  Obtained from:	gcc (gcc-4_2-branch, rev. 127959)

Modified:
  vendor/gcc/dist/gcc/BASE-VER
  vendor/gcc/dist/gcc/ChangeLog
  vendor/gcc/dist/gcc/DATESTAMP
  vendor/gcc/dist/gcc/DEV-PHASE
  vendor/gcc/dist/gcc/config/mips/predicates.md
  vendor/gcc/dist/gcc/config/rs6000/rs6000.c
  vendor/gcc/dist/gcc/config/s390/s390.md
  vendor/gcc/dist/gcc/cp/ChangeLog
  vendor/gcc/dist/gcc/cp/call.c
  vendor/gcc/dist/gcc/cp/cp-tree.h
  vendor/gcc/dist/gcc/cp/cxx-pretty-print.c
  vendor/gcc/dist/gcc/cp/decl.c
  vendor/gcc/dist/gcc/cp/decl2.c
  vendor/gcc/dist/gcc/cp/error.c
  vendor/gcc/dist/gcc/cp/lex.c
  vendor/gcc/dist/gcc/cp/name-lookup.c
  vendor/gcc/dist/gcc/cp/pt.c
  vendor/gcc/dist/gcc/cp/semantics.c
  vendor/gcc/dist/gcc/cp/typeck.c
  vendor/gcc/dist/gcc/doc/contrib.texi
  vendor/gcc/dist/gcc/dwarf2out.c
  vendor/gcc/dist/gcc/expr.c
  vendor/gcc/dist/gcc/fold-const.c
  vendor/gcc/dist/gcc/gimplify.c
  vendor/gcc/dist/gcc/reload1.c
  vendor/gcc/dist/gcc/simplify-rtx.c
  vendor/gcc/dist/gcc/target-def.h
  vendor/gcc/dist/gcc/target.h
  vendor/gcc/dist/gcc/targhooks.c
  vendor/gcc/dist/gcc/targhooks.h
  vendor/gcc/dist/gcc/tree-if-conv.c
  vendor/gcc/dist/gcc/tree-ssa-structalias.c
  vendor/gcc/dist/gcc/tree-vect-analyze.c
  vendor/gcc/dist/gcc/tree-vect-patterns.c
  vendor/gcc/dist/gcc/tree.c
  vendor/gcc/dist/gcc/tree.h
  vendor/gcc/dist/libstdc++/ChangeLog
  vendor/gcc/dist/libstdc++/include/std/std_valarray.h
  vendor/gcc/dist/libstdc++/include/tr1/random

Modified: vendor/gcc/dist/gcc/BASE-VER
==============================================================================
--- vendor/gcc/dist/gcc/BASE-VER	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/BASE-VER	Thu Mar 10 13:59:17 2011	(r219451)
@@ -1 +1 @@
-4.2.1
+4.2.2

Modified: vendor/gcc/dist/gcc/ChangeLog
==============================================================================
--- vendor/gcc/dist/gcc/ChangeLog	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/ChangeLog	Thu Mar 10 13:59:17 2011	(r219451)
@@ -1,3 +1,121 @@
+2007-08-31  Jakub Jelinek  
+
+	PR rtl-optimization/33148
+	* simplify-rtx.c (simplify_unary_operation_1): Only optimize
+	(neg (lt X 0)) if X has scalar int mode.
+
+	PR debug/32914
+	* dwarf2out.c (rtl_for_decl_init): If vector decl has CONSTRUCTOR
+	initializer, use build_vector_from_ctor if possible to create
+	VECTOR_CST out of it.  If vector initializer is not VECTOR_CST
+	even after this, return NULL.
+
+2007-08-27  Jason Merrill  
+
+	PR c++/31337
+	* gimplify.c (gimplify_modify_expr): Discard the assignment of 
+	zero-sized types after calling gimplify_modify_expr_rhs.
+
+2007-08-24  Jakub Jelinek  
+
+	PR debug/32610
+	* dwarf2out.c (gen_decl_die): Don't call
+	gen_tagged_type_instantiation_die if decl doesn't have tagged type.
+
+2007-08-24  Richard Guenther  
+
+	* expr.c (get_inner_reference): Remove unused variable.
+
+2007-08-24  Richard Guenther  
+
+	* expr.c (get_inner_reference): Do computation of bitoffset
+	from offset in a way we can detect overflow reliably.
+
+2007-08-22  Richard Guenther  
+
+	PR middle-end/32563
+	* tree.c (host_integerp): Treat sizetype as signed as it is
+	sign-extended.
+
+2007-08-20  Adam Nemet  
+
+	* config/mips/predicates.md (const_call_insn_operand): Invoke
+	SYMBOL_REF_LONG_CALL_P only on SYMBOL_REFs.
+
+2007-08-17  Chen liqin  
+
+        * config/score/score.md : Update pattern tablejump.
+        * config/score/score.c : Update score_initialize_trampoline 
+        function.
+        * config/score/score.h (TRAMPOLINE_TEMPLATE): Added macro.
+        (TRAMPOLINE_INSNS, TRAMPOLINE_SIZE) Update macro.
+        * doc/contrib.texi: Add my entry.
+
+2007-08-02  Andreas Krebbel  
+
+	* config/s390/s390.md ("*xordi3_cconly"): Change xr to xg.
+
+2007-08-01  Andreas Krebbel  
+
+	* config/s390/s390.md (TF in GPR splitter): Change operand_subword
+	parameter to TFmode.
+
+2007-07-30  Mark Mitchell  
+
+	* BASE-VER: Bump.
+	* DEV-PHASE: Mark as prerelease.
+
+2007-07-25  Steve Ellcey  
+
+	PR target/32218
+	* tree-vect-patterns.c (vect_pattern_recog_1): Check for valid type.
+
+2007-07-25  Dorit Nuzman  
+	    Devang Patel  
+
+	PR tree-optimization/25413
+	* targhooks.c (default_builtin_vector_alignment_reachable): New.
+	* targhooks.h (default_builtin_vector_alignment_reachable): New.
+	* tree.h (contains_packed_reference): New.
+	* expr.c (contains_packed_reference): New.
+	* tree-vect-analyze.c (vector_alignment_reachable_p): New.
+	(vect_enhance_data_refs_alignment): Call
+	vector_alignment_reachable_p.
+	* target.h (vector_alignment_reachable): New builtin.
+	* target-def.h (TARGET_VECTOR_ALIGNMENT_REACHABLE): New.
+	* config/rs6000/rs6000.c (rs6000_vector_alignment_reachable): New.
+	(TARGET_VECTOR_ALIGNMENT_REACHABLE): Define.
+
+2007-07-24  Richard Guenther  
+
+	Backport from mainline:
+	2007-07-16  Richard Guenther  
+		    Uros Bizjak  
+
+	* tree-if-conv.c (find_phi_replacement_condition): Unshare "*cond"
+	before forcing it to gimple operand.
+
+2007-07-24  Richard Guenther  
+
+	PR tree-optimization/32723
+	Backport from mainline:
+	2007-03-09  Daniel Berlin  
+
+        * tree-ssa-structalias.c (shared_bitmap_info_t): New structure.
+        (shared_bitmap_table): New variable.
+        (shared_bitmap_hash): New function.
+        (shared_bitmap_eq): Ditto
+        (shared_bitmap_lookup): Ditto.
+        (shared_bitmap_add): Ditto.
+        (find_what_p_points_to): Rewrite to use shared bitmap hashtable.
+        (init_alias_vars): Init shared bitmap hashtable.
+        (delete_points_to_sets): Delete shared bitmap hashtable.
+
+2007-07-23  Bernd Schmidt  
+
+	* reload1.c (choose_reload_regs): Set reload_spill_index for regs
+	chosen during find_reloads.
+
 2007-07-19  Release Manager
 
 	* GCC 4.2.1 released.

Modified: vendor/gcc/dist/gcc/DATESTAMP
==============================================================================
--- vendor/gcc/dist/gcc/DATESTAMP	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/DATESTAMP	Thu Mar 10 13:59:17 2011	(r219451)
@@ -1 +1 @@
-20070719
+20070831

Modified: vendor/gcc/dist/gcc/DEV-PHASE
==============================================================================
--- vendor/gcc/dist/gcc/DEV-PHASE	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/DEV-PHASE	Thu Mar 10 13:59:17 2011	(r219451)
@@ -0,0 +1 @@
+prerelease

Modified: vendor/gcc/dist/gcc/config/mips/predicates.md
==============================================================================
--- vendor/gcc/dist/gcc/config/mips/predicates.md	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/config/mips/predicates.md	Thu Mar 10 13:59:17 2011	(r219451)
@@ -116,7 +116,9 @@
       /* If -mlong-calls, force all calls to use register addressing.  Also,
 	 if this function has the long_call attribute, we must use register
 	 addressing.  */
-      return !TARGET_LONG_CALLS && !SYMBOL_REF_LONG_CALL_P (op);
+      return (!TARGET_LONG_CALLS
+	      && !(GET_CODE (op) == SYMBOL_REF
+		   && SYMBOL_REF_LONG_CALL_P (op)));
 
     case SYMBOL_GOT_GLOBAL:
       /* Without explicit relocs, there is no special syntax for

Modified: vendor/gcc/dist/gcc/config/rs6000/rs6000.c
==============================================================================
--- vendor/gcc/dist/gcc/config/rs6000/rs6000.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/config/rs6000/rs6000.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -664,6 +664,7 @@ static int rs6000_use_sched_lookahead (v
 static tree rs6000_builtin_mask_for_load (void);
 
 static void def_builtin (int, const char *, tree, int);
+static bool rs6000_vector_alignment_reachable (tree, bool);
 static void rs6000_init_builtins (void);
 static rtx rs6000_expand_unop_builtin (enum insn_code, tree, rtx);
 static rtx rs6000_expand_binop_builtin (enum insn_code, tree, rtx);
@@ -915,6 +916,9 @@ static const char alt_reg_names[][8] =
 #undef TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD
 #define TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD rs6000_builtin_mask_for_load
 
+#undef TARGET_VECTOR_ALIGNMENT_REACHABLE
+#define TARGET_VECTOR_ALIGNMENT_REACHABLE rs6000_vector_alignment_reachable
+
 #undef TARGET_INIT_BUILTINS
 #define TARGET_INIT_BUILTINS rs6000_init_builtins
 
@@ -1584,6 +1588,37 @@ rs6000_builtin_mask_for_load (void)
     return 0;
 }
 
+
+/* Return true iff, data reference of TYPE can reach vector alignment (16)
+   after applying N number of iterations.  This routine does not determine
+   how may iterations are required to reach desired alignment.  */
+
+static bool
+rs6000_vector_alignment_reachable (tree type ATTRIBUTE_UNUSED, bool is_packed)
+{
+  if (is_packed)
+    return false;
+
+  if (TARGET_32BIT)
+    {
+      if (rs6000_alignment_flags == MASK_ALIGN_NATURAL)
+        return true;
+
+      if (rs6000_alignment_flags ==  MASK_ALIGN_POWER)
+        return true;
+
+      return false;
+    }
+  else
+    {
+      if (TARGET_MACHO)
+        return false;
+
+      /* Assuming that all other types are naturally aligned. CHECKME!  */
+      return true;
+    }
+}
+
 /* Handle generic options of the form -mfoo=yes/no.
    NAME is the option name.
    VALUE is the option value.

Modified: vendor/gcc/dist/gcc/config/s390/s390.md
==============================================================================
--- vendor/gcc/dist/gcc/config/s390/s390.md	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/config/s390/s390.md	Thu Mar 10 13:59:17 2011	(r219451)
@@ -1500,7 +1500,7 @@
    && !s_operand (operands[1], VOIDmode)"
   [(set (match_dup 0) (match_dup 1))]
 {
-  rtx addr = operand_subword (operands[0], 1, 0, DFmode);
+  rtx addr = operand_subword (operands[0], 1, 0, TFmode);
   s390_load_address (addr, XEXP (operands[1], 0));
   operands[1] = replace_equiv_address (operands[1], addr);
 })
@@ -5624,7 +5624,7 @@
   "s390_match_ccmode(insn, CCTmode) && TARGET_64BIT"
   "@
    xgr\t%0,%2
-   xr\t%0,%2"
+   xg\t%0,%2"
   [(set_attr "op_type"  "RRE,RXY")])
 
 (define_insn "*xordi3_extimm"

Modified: vendor/gcc/dist/gcc/cp/ChangeLog
==============================================================================
--- vendor/gcc/dist/gcc/cp/ChangeLog	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/ChangeLog	Thu Mar 10 13:59:17 2011	(r219451)
@@ -1,3 +1,66 @@
+2007-08-24  Jakub Jelinek  
+
+	PR c++/31941
+	* error.c (resolve_virtual_fun_from_obj_type_ref): Handle
+	TARGET_VTABLE_USES_DESCRIPTORS targets properly.
+
+	PR c++/32898
+	* name-lookup.c (set_decl_namespace): lookup_qualified_name failure
+	is error_mark_node rather than NULL_TREE.
+	* pt.c (check_explicit_specialization): Likewise.
+
+2007-08-22  Jason Merrill  
+
+	PR c++/29365
+	* pt.c (outermost_tinst_level): New function.
+	* lex.c (in_main_input_context): New function.
+	* cp-tree.h: Declare it.
+	* decl2.c (constrain_class_visibility): Use it to avoid warning
+	about uses of the anonymous namespace in the main input file.
+
+2007-08-20  Jakub Jelinek  
+
+	PR c++/32992
+	* typeck.c (check_return_expr): Don't NRV optimize vars in
+	anonymous unions.
+	* decl.c (finish_function): Comment fix.
+
+2007-08-18  Paolo Carlini  
+
+	PR c++/32112
+	* error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
+	* cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
+
+2007-08-10  Paolo Carlini  
+
+	PR c++/17763
+	* error.c (dump_expr): Consistently use the *_cxx_*
+	variants of the pretty-print functions.
+
+2007-07-30  Paolo Carlini  
+
+	PR c++/32108
+	* semantics.c (finish_label_stmt): Reject the __label__
+	extension outside function scopes.
+
+2007-07-28  Simon Martin  
+	    Mark Mitchell  
+
+	PR c++/30917
+	* name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
+	hidden due to friend declarations in local classes.
+
+2007-07-27  Mark Mitchell  
+
+	PR c++/32346
+	* call.c (convert_for_arg_passing): Only widen bitfields to their
+	declared types if necessary.
+
+2007-07-24  Paolo Carlini  
+
+	PR c++/30535
+	* pt.c (unify): Never pass error_mark_node to template_decl_level.
+
 2007-07-19  Release Manager
 
 	* GCC 4.2.1 released.

Modified: vendor/gcc/dist/gcc/cp/call.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/call.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/call.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -4674,7 +4674,27 @@ type_passed_as (tree type)
 tree
 convert_for_arg_passing (tree type, tree val)
 {
-  val = convert_bitfield_to_declared_type (val);
+  tree bitfield_type;
+
+  /* If VAL is a bitfield, then -- since it has already been converted
+     to TYPE -- it cannot have a precision greater than TYPE.  
+
+     If it has a smaller precision, we must widen it here.  For
+     example, passing "int f:3;" to a function expecting an "int" will
+     not result in any conversion before this point.
+
+     If the precision is the same we must not risk widening.  For
+     example, the COMPONENT_REF for a 32-bit "long long" bitfield will
+     often have type "int", even though the C++ type for the field is
+     "long long".  If the value is being passed to a function
+     expecting an "int", then no conversions will be required.  But,
+     if we call convert_bitfield_to_declared_type, the bitfield will
+     be converted to "long long".  */
+  bitfield_type = is_bitfield_expr_with_lowered_type (val);
+  if (bitfield_type 
+      && TYPE_PRECISION (TREE_TYPE (val)) < TYPE_PRECISION (type))
+    val = convert_to_integer (TYPE_MAIN_VARIANT (bitfield_type), val);
+
   if (val == error_mark_node)
     ;
   /* Pass classes with copy ctors by invisible reference.  */

Modified: vendor/gcc/dist/gcc/cp/cp-tree.h
==============================================================================
--- vendor/gcc/dist/gcc/cp/cp-tree.h	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/cp-tree.h	Thu Mar 10 13:59:17 2011	(r219451)
@@ -4079,6 +4079,7 @@ extern void yyerror				(const char *);
 extern void yyhook				(int);
 extern bool cxx_init				(void);
 extern void cxx_finish				(void);
+extern bool in_main_input_context		(void);
 
 /* in method.c */
 extern void init_method				(void);
@@ -4161,6 +4162,7 @@ extern tree build_non_dependent_args		(t
 extern bool reregister_specialization		(tree, tree, tree);
 extern tree fold_non_dependent_expr		(tree);
 extern bool explicit_class_specialization_p     (tree);
+extern tree outermost_tinst_level		(void);
 
 /* in repo.c */
 extern void init_repo				(void);

Modified: vendor/gcc/dist/gcc/cp/cxx-pretty-print.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/cxx-pretty-print.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/cxx-pretty-print.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -204,6 +204,10 @@ pp_cxx_unqualified_id (cxx_pretty_printe
       pp_cxx_unqualified_id (pp, TEMPLATE_PARM_DECL (t));
       break;
 
+    case UNBOUND_CLASS_TEMPLATE:
+      pp_cxx_unqualified_id (pp, TYPE_NAME (t));
+      break;
+
     default:
       pp_unsupported_tree (pp, t);
       break;

Modified: vendor/gcc/dist/gcc/cp/decl.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/decl.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/decl.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -11273,7 +11273,7 @@ finish_function (int flags)
   gcc_assert (stmts_are_full_exprs_p ());
 
   /* Set up the named return value optimization, if we can.  Candidate
-     variables are selected in check_return_value.  */
+     variables are selected in check_return_expr.  */
   if (current_function_return_value)
     {
       tree r = current_function_return_value;

Modified: vendor/gcc/dist/gcc/cp/decl2.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/decl2.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/decl2.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -1860,9 +1860,12 @@ constrain_class_visibility (tree type)
 	int subvis = type_visibility (ftype);
 
 	if (subvis == VISIBILITY_ANON)
-	  warning (0, "\
+	  {
+	    if (!in_main_input_context ())
+	      warning (0, "\
 %qT has a field %qD whose type uses the anonymous namespace",
 		   type, t);
+	  }
 	else if (IS_AGGR_TYPE (ftype)
 		 && vis < VISIBILITY_HIDDEN
 		 && subvis >= VISIBILITY_HIDDEN)
@@ -1877,9 +1880,12 @@ constrain_class_visibility (tree type)
       int subvis = type_visibility (TREE_TYPE (t));
 
       if (subvis == VISIBILITY_ANON)
-	warning (0, "\
+        {
+	  if (!in_main_input_context())
+	    warning (0, "\
 %qT has a base %qT whose type uses the anonymous namespace",
 		 type, TREE_TYPE (t));
+	}
       else if (vis < VISIBILITY_HIDDEN
 	       && subvis >= VISIBILITY_HIDDEN)
 	warning (OPT_Wattributes, "\

Modified: vendor/gcc/dist/gcc/cp/error.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/error.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/error.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -901,6 +901,10 @@ dump_decl (tree t, int flags)
 	pp_type_id (cxx_pp, t);
       break;
 
+    case UNBOUND_CLASS_TEMPLATE:
+      dump_type (t, flags);
+      break;
+
     default:
       pp_unsupported_tree (cxx_pp, t);
       /* Fall through to error.  */
@@ -1301,10 +1305,14 @@ static tree
 resolve_virtual_fun_from_obj_type_ref (tree ref)
 {
   tree obj_type = TREE_TYPE (OBJ_TYPE_REF_OBJECT (ref));
-  int index = tree_low_cst (OBJ_TYPE_REF_TOKEN (ref), 1);
+  HOST_WIDE_INT index = tree_low_cst (OBJ_TYPE_REF_TOKEN (ref), 1);
   tree fun = BINFO_VIRTUALS (TYPE_BINFO (TREE_TYPE (obj_type)));
-    while (index--)
+  while (index)
+    {
       fun = TREE_CHAIN (fun);
+      index -= (TARGET_VTABLE_USES_DESCRIPTORS
+		? TARGET_VTABLE_USES_DESCRIPTORS : 1);
+    }
 
   return BV_FN (fun);
 }
@@ -1420,13 +1428,13 @@ dump_expr (tree t, int flags)
 	    if (TREE_CODE (ob) == ADDR_EXPR)
 	      {
 		dump_expr (TREE_OPERAND (ob, 0), flags | TFF_EXPR_IN_PARENS);
-		pp_dot (cxx_pp);
+		pp_cxx_dot (cxx_pp);
 	      }
 	    else if (TREE_CODE (ob) != PARM_DECL
 		     || strcmp (IDENTIFIER_POINTER (DECL_NAME (ob)), "this"))
 	      {
 		dump_expr (ob, flags | TFF_EXPR_IN_PARENS);
-		pp_arrow (cxx_pp);
+		pp_cxx_arrow (cxx_pp);
 	      }
 	    args = TREE_CHAIN (args);
 	  }

Modified: vendor/gcc/dist/gcc/cp/lex.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/lex.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/lex.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -827,3 +827,18 @@ make_aggr_type (enum tree_code code)
 
   return t;
 }
+
+/* Returns true if we are currently in the main source file, or in a
+   template instantiation started from the main source file.  */
+
+bool
+in_main_input_context (void)
+{
+  tree tl = outermost_tinst_level();
+
+  if (tl)
+    return strcmp (main_input_filename,
+		   LOCATION_FILE (TINST_LOCATION (tl))) == 0;
+  else
+    return strcmp (main_input_filename, input_filename) == 0;
+}

Modified: vendor/gcc/dist/gcc/cp/name-lookup.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/name-lookup.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/name-lookup.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -2924,7 +2924,7 @@ set_decl_namespace (tree decl, tree scop
 
   /* See whether this has been declared in the namespace.  */
   old = lookup_qualified_name (scope, DECL_NAME (decl), false, true);
-  if (!old)
+  if (old == error_mark_node)
     /* No old declaration at all.  */
     goto complain;
   if (!is_overloaded_fn (decl))
@@ -3996,8 +3996,49 @@ lookup_name_real (tree name, int prefer_
 
 	if (binding)
 	  {
-	    /* Only namespace-scope bindings can be hidden.  */
-	    gcc_assert (!hidden_name_p (binding));
+	    if (hidden_name_p (binding))
+	      {
+		/* A non namespace-scope binding can only be hidden if
+		   we are in a local class, due to friend declarations.
+		   In particular, consider:
+
+		   void f() {
+		     struct A {
+		       friend struct B;
+		       void g() { B* b; } // error: B is hidden
+		     }
+		     struct B {};
+		   }
+
+		   The standard says that "B" is a local class in "f"
+		   (but not nested within "A") -- but that name lookup
+		   for "B" does not find this declaration until it is
+		   declared directly with "f".
+
+		   In particular:
+
+		   [class.friend]
+
+		   If a friend declaration appears in a local class and
+		   the name specified is an unqualified name, a prior
+		   declaration is looked up without considering scopes
+		   that are outside the innermost enclosing non-class
+		   scope. For a friend class declaration, if there is no
+		   prior declaration, the class that is specified 
+		   belongs to the innermost enclosing non-class scope,
+		   but if it is subsequently referenced, its name is not
+		   found by name lookup until a matching declaration is
+		   provided in the innermost enclosing nonclass scope.
+		*/
+		gcc_assert (current_class_type &&
+			    LOCAL_CLASS_P (current_class_type));
+
+		/* This binding comes from a friend declaration in the local
+		   class. The standard (11.4.8) states that the lookup can
+		   only succeed if there is a non-hidden declaration in the
+		   current scope, which is not the case here.  */
+		POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, NULL_TREE);
+	      }
 	    val = binding;
 	    break;
 	  }

Modified: vendor/gcc/dist/gcc/cp/pt.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/pt.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/pt.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -1971,7 +1971,7 @@ check_explicit_specialization (tree decl
 		 context.  */
 	      fns = lookup_qualified_name (CP_DECL_CONTEXT (decl), dname,
 					   false, true);
-	      if (!fns || !is_overloaded_fn (fns))
+	      if (fns == error_mark_node || !is_overloaded_fn (fns))
 		{
 		  error ("%qD is not a template function", dname);
 		  fns = error_mark_node;
@@ -5288,6 +5288,15 @@ reopen_tinst_level (tree level)
   pop_tinst_level ();
 }
 
+/* Returns the TINST_LEVEL which gives the original instantiation
+   context.  */
+
+tree
+outermost_tinst_level (void)
+{
+  return tree_last (current_tinst_level);
+}
+
 /* DECL is a friend FUNCTION_DECL or TEMPLATE_DECL.  ARGS is the
    vector of template arguments, as for tsubst.
 
@@ -10453,6 +10462,8 @@ unify (tree tparms, tree targs, tree par
     case TEMPLATE_TEMPLATE_PARM:
     case BOUND_TEMPLATE_TEMPLATE_PARM:
       tparm = TREE_VALUE (TREE_VEC_ELT (tparms, 0));
+      if (tparm == error_mark_node)
+	return 1;
 
       if (TEMPLATE_TYPE_LEVEL (parm)
 	  != template_decl_level (tparm))

Modified: vendor/gcc/dist/gcc/cp/semantics.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/semantics.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/semantics.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -1320,8 +1320,13 @@ finish_label_stmt (tree name)
 void
 finish_label_decl (tree name)
 {
-  tree decl = declare_local_label (name);
-  add_decl_expr (decl);
+  if (!at_function_scope_p ())
+    {
+      error ("__label__ declarations are only allowed in function scopes");
+      return;
+    }
+
+  add_decl_expr (declare_local_label (name));
 }
 
 /* When DECL goes out of scope, make sure that CLEANUP is executed.  */

Modified: vendor/gcc/dist/gcc/cp/typeck.c
==============================================================================
--- vendor/gcc/dist/gcc/cp/typeck.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/cp/typeck.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -6604,6 +6604,7 @@ check_return_expr (tree retval, bool *no
 	  && TREE_CODE (retval) == VAR_DECL
 	  && DECL_CONTEXT (retval) == current_function_decl
 	  && ! TREE_STATIC (retval)
+	  && ! DECL_ANON_UNION_VAR_P (retval)
 	  && (DECL_ALIGN (retval)
 	      >= DECL_ALIGN (DECL_RESULT (current_function_decl)))
 	  && same_type_p ((TYPE_MAIN_VARIANT

Modified: vendor/gcc/dist/gcc/doc/contrib.texi
==============================================================================
--- vendor/gcc/dist/gcc/doc/contrib.texi	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/doc/contrib.texi	Thu Mar 10 13:59:17 2011	(r219451)
@@ -514,6 +514,10 @@ patches.
 Robert Lipe for OpenServer support, new testsuites, testing, etc.
 
 @item
+Chen Liqin for various S+core related fixes/improvement, and for
+maintaining the S+core port.
+
+@item
 Weiwen Liu for testing and various bug fixes.
 
 @item

Modified: vendor/gcc/dist/gcc/dwarf2out.c
==============================================================================
--- vendor/gcc/dist/gcc/dwarf2out.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/dwarf2out.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -10065,6 +10065,43 @@ rtl_for_decl_init (tree init, tree type)
   else if (initializer_constant_valid_p (init, type)
 	   && ! walk_tree (&init, reference_to_unused, NULL, NULL))
     {
+      /* Convert vector CONSTRUCTOR initializers to VECTOR_CST if
+	 possible.  */
+      if (TREE_CODE (type) == VECTOR_TYPE)
+	switch (TREE_CODE (init))
+	  {
+	  case VECTOR_CST:
+	    break;
+	  case CONSTRUCTOR:
+	    if (TREE_CONSTANT (init))
+	      {
+		VEC(constructor_elt,gc) *elts = CONSTRUCTOR_ELTS (init);
+		bool constant_p = true;
+		tree value;
+		unsigned HOST_WIDE_INT ix;
+
+		/* Even when ctor is constant, it might contain non-*_CST
+		   elements (e.g. { 1.0/0.0 - 1.0/0.0, 0.0 }) and those don't
+		   belong into VECTOR_CST nodes.  */
+		FOR_EACH_CONSTRUCTOR_VALUE (elts, ix, value)
+		  if (!CONSTANT_CLASS_P (value))
+		    {
+		      constant_p = false;
+		      break;
+		    }
+
+		if (constant_p)
+		  {
+		    init = build_vector_from_ctor (type, elts);
+		    break;
+		  }
+	      }
+	    /* FALLTHRU */
+
+	  default:
+	    return NULL;
+	  }
+
       rtl = expand_expr (init, NULL_RTX, VOIDmode, EXPAND_INITIALIZER);
 
       /* If expand_expr returns a MEM, it wasn't immediate.  */
@@ -13197,7 +13234,8 @@ gen_decl_die (tree decl, dw_die_ref cont
 	 was generated within the original definition of an inline function) we
 	 have to generate a special (abbreviated) DW_TAG_structure_type,
 	 DW_TAG_union_type, or DW_TAG_enumeration_type DIE here.  */
-      if (TYPE_DECL_IS_STUB (decl) && decl_ultimate_origin (decl) != NULL_TREE)
+      if (TYPE_DECL_IS_STUB (decl) && decl_ultimate_origin (decl) != NULL_TREE
+	  && is_tagged_type (TREE_TYPE (decl)))
 	{
 	  gen_tagged_type_instantiation_die (TREE_TYPE (decl), context_die);
 	  break;

Modified: vendor/gcc/dist/gcc/expr.c
==============================================================================
--- vendor/gcc/dist/gcc/expr.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/expr.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -5654,7 +5654,6 @@ get_inner_reference (tree exp, HOST_WIDE
   enum machine_mode mode = VOIDmode;
   tree offset = size_zero_node;
   tree bit_offset = bitsize_zero_node;
-  tree tem;
 
   /* First get the mode, signedness, and size.  We do this from just the
      outermost expression.  */
@@ -5690,6 +5689,8 @@ get_inner_reference (tree exp, HOST_WIDE
 	*pbitsize = tree_low_cst (size_tree, 1);
     }
 
+  *pmode = mode;
+
   /* Compute cumulative bit-offset for nested component-refs and array-refs,
      and find the ultimate containing object.  */
   while (1)
@@ -5774,21 +5775,69 @@ get_inner_reference (tree exp, HOST_WIDE
  done:
 
   /* If OFFSET is constant, see if we can return the whole thing as a
-     constant bit position.  Otherwise, split it up.  */
-  if (host_integerp (offset, 0)
-      && 0 != (tem = size_binop (MULT_EXPR,
-				 fold_convert (bitsizetype, offset),
-				 bitsize_unit_node))
-      && 0 != (tem = size_binop (PLUS_EXPR, tem, bit_offset))
-      && host_integerp (tem, 0))
-    *pbitpos = tree_low_cst (tem, 0), *poffset = 0;
-  else
-    *pbitpos = tree_low_cst (bit_offset, 0), *poffset = offset;
+     constant bit position.  Make sure to handle overflow during
+     this conversion.  */
+  if (host_integerp (offset, 0))
+    {
+      double_int tem = double_int_mul (tree_to_double_int (offset),
+				       uhwi_to_double_int (BITS_PER_UNIT));
+      tem = double_int_add (tem, tree_to_double_int (bit_offset));
+      if (double_int_fits_in_shwi_p (tem))
+	{
+	  *pbitpos = double_int_to_shwi (tem);
+	  *poffset = NULL_TREE;
+	  return exp;
+	}
+    }
+
+  /* Otherwise, split it up.  */
+  *pbitpos = tree_low_cst (bit_offset, 0);
+  *poffset = offset;
 
-  *pmode = mode;
   return exp;
 }
 
+/* Given an expression EXP that may be a COMPONENT_REF or an ARRAY_REF,
+   look for whether EXP or any nested component-refs within EXP is marked
+   as PACKED.  */
+
+bool
+contains_packed_reference (tree exp)
+{
+  bool packed_p = false;
+
+  while (1)
+    {
+      switch (TREE_CODE (exp))
+	{
+	case COMPONENT_REF:
+	  {
+	    tree field = TREE_OPERAND (exp, 1);
+	    packed_p = DECL_PACKED (field) 
+		       || TYPE_PACKED (TREE_TYPE (field))
+		       || TYPE_PACKED (TREE_TYPE (exp));
+	    if (packed_p)
+	      goto done;
+	  }
+	  break;
+
+	case BIT_FIELD_REF:
+	case ARRAY_REF:
+	case ARRAY_RANGE_REF:
+	case REALPART_EXPR:
+	case IMAGPART_EXPR:
+	case VIEW_CONVERT_EXPR:
+	  break;
+
+	default:
+	  goto done;
+	}
+      exp = TREE_OPERAND (exp, 0);
+    }
+ done:
+  return packed_p;
+}
+
 /* Return a tree of sizetype representing the size, in bytes, of the element
    of EXP, an ARRAY_REF.  */
 

Modified: vendor/gcc/dist/gcc/fold-const.c
==============================================================================
--- vendor/gcc/dist/gcc/fold-const.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/fold-const.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -9387,6 +9387,7 @@ fold_binary (enum tree_code code, tree t
 
       /* ~X | X is -1.  */
       if (TREE_CODE (arg0) == BIT_NOT_EXPR
+	  && INTEGRAL_TYPE_P (TREE_TYPE (arg1))
 	  && operand_equal_p (TREE_OPERAND (arg0, 0), arg1, 0))
 	{
 	  t1 = build_int_cst (type, -1);
@@ -9396,6 +9397,7 @@ fold_binary (enum tree_code code, tree t
 
       /* X | ~X is -1.  */
       if (TREE_CODE (arg1) == BIT_NOT_EXPR
+	  && INTEGRAL_TYPE_P (TREE_TYPE (arg0))
 	  && operand_equal_p (arg0, TREE_OPERAND (arg1, 0), 0))
 	{
 	  t1 = build_int_cst (type, -1);
@@ -9503,6 +9505,7 @@ fold_binary (enum tree_code code, tree t
 
       /* ~X ^ X is -1.  */
       if (TREE_CODE (arg0) == BIT_NOT_EXPR
+	  && INTEGRAL_TYPE_P (TREE_TYPE (arg1))
 	  && operand_equal_p (TREE_OPERAND (arg0, 0), arg1, 0))
 	{
 	  t1 = build_int_cst (type, -1);
@@ -9512,6 +9515,7 @@ fold_binary (enum tree_code code, tree t
 
       /* X ^ ~X is -1.  */
       if (TREE_CODE (arg1) == BIT_NOT_EXPR
+	  && INTEGRAL_TYPE_P (TREE_TYPE (arg0))
 	  && operand_equal_p (arg0, TREE_OPERAND (arg1, 0), 0))
 	{
 	  t1 = build_int_cst (type, -1);

Modified: vendor/gcc/dist/gcc/gimplify.c
==============================================================================
--- vendor/gcc/dist/gcc/gimplify.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/gimplify.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -3532,8 +3532,16 @@ gimplify_modify_expr (tree *expr_p, tree
   gcc_assert (TREE_CODE (*expr_p) == MODIFY_EXPR
 	      || TREE_CODE (*expr_p) == INIT_EXPR);
 
-  /* For zero sized types only gimplify the left hand side and right hand side
-     as statements and throw away the assignment.  */
+  /* See if any simplifications can be done based on what the RHS is.  */
+  ret = gimplify_modify_expr_rhs (expr_p, from_p, to_p, pre_p, post_p,
+				  want_value);
+  if (ret != GS_UNHANDLED)
+    return ret;
+
+  /* For zero sized types only gimplify the left hand side and right hand
+     side as statements and throw away the assignment.  Do this after
+     gimplify_modify_expr_rhs so we handle TARGET_EXPRs of addressable
+     types properly.  */
   if (zero_sized_type (TREE_TYPE (*from_p)))
     {
       gimplify_stmt (from_p);
@@ -3544,12 +3552,6 @@ gimplify_modify_expr (tree *expr_p, tree
       return GS_ALL_DONE;
     }
 
-  /* See if any simplifications can be done based on what the RHS is.  */
-  ret = gimplify_modify_expr_rhs (expr_p, from_p, to_p, pre_p, post_p,
-				  want_value);
-  if (ret != GS_UNHANDLED)
-    return ret;
-
   /* If the value being copied is of variable width, compute the length
      of the copy into a WITH_SIZE_EXPR.   Note that we need to do this
      before gimplifying any of the operands so that we can resolve any

Modified: vendor/gcc/dist/gcc/reload1.c
==============================================================================
--- vendor/gcc/dist/gcc/reload1.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/reload1.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -5451,7 +5451,14 @@ choose_reload_regs (struct insn_chain *c
   for (j = 0; j < n_reloads; j++)
     {
       reload_order[j] = j;
-      reload_spill_index[j] = -1;
+      if (rld[j].reg_rtx != NULL_RTX)
+	{
+	  gcc_assert (REG_P (rld[j].reg_rtx)
+		      && HARD_REGISTER_P (rld[j].reg_rtx));
+	  reload_spill_index[j] = REGNO (rld[j].reg_rtx);
+	}
+      else
+	reload_spill_index[j] = -1;
 
       if (rld[j].nregs > 1)
 	{

Modified: vendor/gcc/dist/gcc/simplify-rtx.c
==============================================================================
--- vendor/gcc/dist/gcc/simplify-rtx.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/simplify-rtx.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -589,7 +589,8 @@ simplify_unary_operation_1 (enum rtx_cod
       /* (neg (lt x 0)) is (ashiftrt X C) if STORE_FLAG_VALUE is 1.  */
       /* (neg (lt x 0)) is (lshiftrt X C) if STORE_FLAG_VALUE is -1.  */
       if (GET_CODE (op) == LT
-	  && XEXP (op, 1) == const0_rtx)
+	  && XEXP (op, 1) == const0_rtx
+	  && SCALAR_INT_MODE_P (GET_MODE (XEXP (op, 0))))
 	{
 	  enum machine_mode inner = GET_MODE (XEXP (op, 0));
 	  int isize = GET_MODE_BITSIZE (inner);

Modified: vendor/gcc/dist/gcc/target-def.h
==============================================================================
--- vendor/gcc/dist/gcc/target-def.h	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/target-def.h	Thu Mar 10 13:59:17 2011	(r219451)
@@ -337,9 +337,12 @@ Foundation, 51 Franklin Street, Fifth Fl
    TARGET_SCHED_SET_SCHED_FLAGS}
 
 #define TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD 0
+#define TARGET_VECTOR_ALIGNMENT_REACHABLE \
+  default_builtin_vector_alignment_reachable
 
 #define TARGET_VECTORIZE                                                \
-  {TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD}
+  {TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD,				\
+   TARGET_VECTOR_ALIGNMENT_REACHABLE}
 
 #define TARGET_DEFAULT_TARGET_FLAGS 0
 

Modified: vendor/gcc/dist/gcc/target.h
==============================================================================
--- vendor/gcc/dist/gcc/target.h	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/target.h	Thu Mar 10 13:59:17 2011	(r219451)
@@ -375,6 +375,10 @@ struct gcc_target
        by the vectorizer, and return the decl of the target builtin
        function.  */
     tree (* builtin_mask_for_load) (void);
+
+    /* Return true if vector alignment is reachable (by peeling N
+      interations) for the given type.  */
+     bool (* vector_alignment_reachable) (tree, bool);
   } vectorize;
 
   /* The initial value of target_flags.  */

Modified: vendor/gcc/dist/gcc/targhooks.c
==============================================================================
--- vendor/gcc/dist/gcc/targhooks.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/targhooks.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -604,4 +604,20 @@ default_reloc_rw_mask (void)
   return flag_pic ? 3 : 0;
 }
 
+bool
+default_builtin_vector_alignment_reachable (tree type, bool is_packed)
+{
+  if (is_packed)
+    return false;
+
+  /* Assuming that types whose size is > pointer-size are not guaranteed to be
+     naturally aligned.  */
+  if (tree_int_cst_compare (TYPE_SIZE (type), bitsize_int (POINTER_SIZE)) > 0)
+    return false;
+
+  /* Assuming that types whose size is <= pointer-size
+     are naturally aligned.  */
+  return true;
+}
+
 #include "gt-targhooks.h"

Modified: vendor/gcc/dist/gcc/targhooks.h
==============================================================================
--- vendor/gcc/dist/gcc/targhooks.h	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/targhooks.h	Thu Mar 10 13:59:17 2011	(r219451)
@@ -57,6 +57,8 @@ extern const char * default_invalid_with
 
 extern bool default_narrow_bitfield (void);
 
+extern bool default_builtin_vector_alignment_reachable (tree, bool);
+
 /* These are here, and not in hooks.[ch], because not all users of
    hooks.h include tm.h, and thus we don't have CUMULATIVE_ARGS.  */
 

Modified: vendor/gcc/dist/gcc/tree-if-conv.c
==============================================================================
--- vendor/gcc/dist/gcc/tree-if-conv.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/tree-if-conv.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -743,7 +743,7 @@ find_phi_replacement_condition (struct l
       if (TREE_CODE (*cond) == TRUTH_NOT_EXPR)
 	/* We can be smart here and choose inverted
 	   condition without switching bbs.  */
-	  *cond = invert_truthvalue (*cond);
+	*cond = invert_truthvalue (*cond);
       else
 	/* Select non loop header bb.  */
 	first_edge = second_edge;
@@ -762,9 +762,11 @@ find_phi_replacement_condition (struct l
 
   /* Create temp. for the condition. Vectorizer prefers to have gimple
      value as condition. Various targets use different means to communicate
-     condition in vector compare operation. Using gimple value allows compiler
-     to emit vector compare and select RTL without exposing compare's result.  */
-  *cond = force_gimple_operand (*cond, &new_stmts, false, NULL_TREE);
+     condition in vector compare operation. Using gimple value allows
+     compiler to emit vector compare and select RTL without exposing
+     compare's result.  */
+  *cond = force_gimple_operand (unshare_expr (*cond), &new_stmts,
+				false, NULL_TREE);
   if (new_stmts)
     bsi_insert_before (bsi, new_stmts, BSI_SAME_STMT);
   if (!is_gimple_reg (*cond) && !is_gimple_condexpr (*cond))

Modified: vendor/gcc/dist/gcc/tree-ssa-structalias.c
==============================================================================
--- vendor/gcc/dist/gcc/tree-ssa-structalias.c	Thu Mar 10 11:23:43 2011	(r219450)
+++ vendor/gcc/dist/gcc/tree-ssa-structalias.c	Thu Mar 10 13:59:17 2011	(r219451)
@@ -4350,6 +4350,75 @@ intra_create_variable_infos (void)
   process_constraint (new_constraint (lhs, rhs));
 }
 
+/* Structure used to put solution bitmaps in a hashtable so they can
+   be shared among variables with the same points-to set.  */
+
+typedef struct shared_bitmap_info
+{
+  bitmap pt_vars;
+  hashval_t hashcode;
+} *shared_bitmap_info_t;
+
+static htab_t shared_bitmap_table;
+
+/* Hash function for a shared_bitmap_info_t */
+
+static hashval_t
+shared_bitmap_hash (const void *p)
+{
+  const shared_bitmap_info_t bi = (shared_bitmap_info_t) p;
+  return bi->hashcode;
+}
+
+/* Equality function for two shared_bitmap_info_t's. */
+
+static int
+shared_bitmap_eq (const void *p1, const void *p2)
+{
+  const shared_bitmap_info_t sbi1 = (shared_bitmap_info_t) p1;
+  const shared_bitmap_info_t sbi2 = (shared_bitmap_info_t) p2;
+  return bitmap_equal_p (sbi1->pt_vars, sbi2->pt_vars);
+}
+
+/* Lookup a bitmap in the shared bitmap hashtable, and return an already
+   existing instance if there is one, NULL otherwise.  */
+
+static bitmap
+shared_bitmap_lookup (bitmap pt_vars)
+{
+  void **slot;
+  struct shared_bitmap_info sbi;
+
+  sbi.pt_vars = pt_vars;
+  sbi.hashcode = bitmap_hash (pt_vars);
+  
+  slot = htab_find_slot_with_hash (shared_bitmap_table, &sbi,

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***