From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27859 invoked by alias); 4 May 2004 16:56:32 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27852 invoked by uid 48); 4 May 2004 16:56:32 -0000 Date: Tue, 04 May 2004 16:56:00 -0000 Message-ID: <20040504165632.27851.qmail@sources.redhat.com> From: "belyshev at lubercy dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040323221847.14699.belyshev@lubercy.com> References: <20040323221847.14699.belyshev@lubercy.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug preprocessor/14699] abort() in hashtable.c in approx_sqrt() with -fmem-report X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg00333.txt.bz2 List-Id: ------- Additional Comments From belyshev at lubercy dot com 2004-05-04 16:56 ------- An updated patch here: http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02049.html 2004-05-04 Serge Belyshev PR 14699 * hashtable.c (ht_dump_statistics): Change type of sum_of_squares from size_t to double. diff -u hashtable.c.~1.16.~ hashtable.c --- hashtable.c.~1.16.~ 2003-08-23 02:29:17.000000000 +0400 +++ hashtable.c 2004-03-25 01:37:01.998704560 +0300 @@ -228,8 +228,8 @@ ht_dump_statistics (hash_table *table) { size_t nelts, nids, overhead, headers; - size_t total_bytes, longest, sum_of_squares; - double exp_len, exp_len2, exp2_len; + size_t total_bytes, longest; + double exp_len, exp_len2, exp2_len, sum_of_squares; hashnode *p, *limit; #define SCALE(x) ((unsigned long) ((x) < 1024*10 \ @@ -248,7 +248,7 @@ size_t n = HT_LEN (*p); total_bytes += n; - sum_of_squares += n * n; + sum_of_squares += (double) n * n; if (n > longest) longest = n; nids++; Can anyone apply it as it was approved by Zack in http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02117.html ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14699