aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorSerge Belyshev <belyshev@lubercy.com>2004-09-06 13:22:48 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2004-09-06 13:22:48 +0000
commit0fd9e8dd4ead50c4381c37b7d0234e9ba67c80b7 (patch)
tree45536273fb00f57cb1dc78c19fe561f9b3914a29 /libcpp
parent8ce16ed6bdc842b515bb49c3abe8e13ae517e8fb (diff)
downloadgcc-0fd9e8dd4ead50c4381c37b7d0234e9ba67c80b7.zip
gcc-0fd9e8dd4ead50c4381c37b7d0234e9ba67c80b7.tar.gz
gcc-0fd9e8dd4ead50c4381c37b7d0234e9ba67c80b7.tar.bz2
re PR preprocessor/14699 (abort() in hashtable.c in approx_sqrt() with -fmem-report)
2004-09-06 Serge Belyshev <belyshev@lubercy.com> PR preprocessor/14699 * symtab.c (ht_dump_statistics): Change type of sum_of_squares from size_t to double. From-SVN: r87116
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog6
-rw-r--r--libcpp/symtab.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 802a543..131f188 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-06 Serge Belyshev <belyshev@lubercy.com>
+
+ PR preprocessor/14699
+ * symtab.c (ht_dump_statistics): Change type of sum_of_squares
+ from size_t to double.
+
2004-08-28 Andreas Schwab <schwab@suse.de>
Andreas Jaeger <aj@suse.de>
diff --git a/libcpp/symtab.c b/libcpp/symtab.c
index 9b2e0f1..471765c 100644
--- a/libcpp/symtab.c
+++ b/libcpp/symtab.c
@@ -252,8 +252,8 @@ void
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 sum_of_squares, exp_len, exp_len2, exp2_len;
hashnode *p, *limit;
#define SCALE(x) ((unsigned long) ((x) < 1024*10 \
@@ -272,7 +272,7 @@ ht_dump_statistics (hash_table *table)
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++;