re PR target/60693 (ICE on funny memcpy)
[gcc.git] / gcc / alloc-pool.c
index 68d66ee1b93c3ff8ff5a9d7ebdfcea89b2eb0a78..dfb13ce55fb1c13a854c1ec90a1c1fc733d509f4 100644 (file)
@@ -1,6 +1,5 @@
 /* Functions to support a pool of allocatable objects.
-   Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-   2007, 2008, 2010  Free Software Foundation, Inc.
+   Copyright (C) 1987-2014 Free Software Foundation, Inc.
    Contributed by Daniel Berlin <dan@cgsoftware.com>
 
 This file is part of GCC.
@@ -83,6 +82,7 @@ struct alloc_pool_descriptor
   int elt_size;
 };
 
+/* Hashtable helpers.  */
 struct alloc_pool_hasher : typed_noop_remove <alloc_pool_descriptor>
 {
   typedef alloc_pool_descriptor value_type;
@@ -91,10 +91,6 @@ struct alloc_pool_hasher : typed_noop_remove <alloc_pool_descriptor>
   static inline bool equal (const value_type *, const compare_type *);
 };
 
-/* Hashtable mapping alloc_pool names to descriptors.  */
-static hash_table <alloc_pool_hasher>  alloc_pool_hash;
-
-/* Hashtable helpers.  */
 inline hashval_t
 alloc_pool_hasher::hash (const value_type *d)
 {
@@ -108,6 +104,9 @@ alloc_pool_hasher::equal (const value_type *d,
   return d->name == p2;
 }
 
+/* Hashtable mapping alloc_pool names to descriptors.  */
+static hash_table <alloc_pool_hasher>  alloc_pool_hash;
+
 /* For given name, return descriptor, create new if needed.  */
 static struct alloc_pool_descriptor *
 allocate_pool_descriptor (const char *name)
@@ -317,7 +316,7 @@ pool_alloc (alloc_pool pool)
 
   /* Pull the first free element from the free list, and return it.  */
   header = pool->returned_free_list;
-  VALGRIND_DISCARD (VALGRIND_MAKE_MEM_DEFINED (header, sizeof(*header)));
+  VALGRIND_DISCARD (VALGRIND_MAKE_MEM_DEFINED (header, sizeof (*header)));
   pool->returned_free_list = header->next;
   pool->elts_free--;