diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dfd0b7d1be71b33c1f09b3526eae852a3bf52b3f..a2778ae1557299732c869c35526366f19210e537 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2010-06-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR bootstrap/44509
+	* c-config-lang.in (gtfiles): Add c-family/c-cppbuiltin.c.
+	* c-family/c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
+	(lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
+	(lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
+	ggc_strdup instead of xstrdup.
+
 2010-06-14  Ira Rosen  <irar@il.ibm.com>
 
 	PR tree-optimization/44507 
diff --git a/gcc/c-config-lang.in b/gcc/c-config-lang.in
index 2565186b10d29ec27cd7eb10cff232b0f4884875..d91380311902633509114b9a8d28897f0ce7f751 100644
--- a/gcc/c-config-lang.in
+++ b/gcc/c-config-lang.in
@@ -22,4 +22,4 @@
 # files used by C that have garbage collection GTY macros in them
 # which therefore need to be scanned by gengtype.c.
 
-gtfiles="\$(srcdir)/c-lang.c \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/c-objc-common.c \$(srcdir)/c-parser.c \$(srcdir)/c-lang.h"
+gtfiles="\$(srcdir)/c-lang.c \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-cppbuiltin.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/c-objc-common.c \$(srcdir)/c-parser.c \$(srcdir)/c-lang.h"
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 4ed6975e45b00bd2ed618543a5255e18f3aa3f9b..77a92c39584bc7416fc6713a2f111bb807937ebd 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -951,15 +951,16 @@ builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value)
    array and function allows it to be done lazily when __DBL_MAX__
    etc. is first used.  */
 
-static struct
+struct GTY(()) lazy_hex_fp_value_struct
 {
   const char *hex_str;
   cpp_macro *macro;
   enum machine_mode mode;
   int digits;
   const char *fp_suffix;
-} lazy_hex_fp_values[12];
-static int lazy_hex_fp_value_count;
+};
+static GTY(()) struct lazy_hex_fp_value_struct lazy_hex_fp_values[12];
+static GTY(()) int lazy_hex_fp_value_count;
 
 static bool
 lazy_hex_fp_value (cpp_reader *pfile ATTRIBUTE_UNUSED,
@@ -987,7 +988,7 @@ lazy_hex_fp_value (cpp_reader *pfile ATTRIBUTE_UNUSED,
   gcc_assert (idx < node->value.macro->count);
   node->value.macro->exp.tokens[idx].val.str.len = strlen (buf1);
   node->value.macro->exp.tokens[idx].val.str.text
-    = (const unsigned char *) xstrdup (buf1);
+    = (const unsigned char *) ggc_strdup (buf1);
   return true;
 }
 
@@ -1014,7 +1015,8 @@ builtin_define_with_hex_fp_value (const char *macro,
       sprintf (buf1, "%s=%s", macro, buf2);
       cpp_define (parse_in, buf1);
       node = C_CPP_HASHNODE (get_identifier (macro));
-      lazy_hex_fp_values[lazy_hex_fp_value_count].hex_str = xstrdup (hex_str);
+      lazy_hex_fp_values[lazy_hex_fp_value_count].hex_str
+	= ggc_strdup (hex_str);
       lazy_hex_fp_values[lazy_hex_fp_value_count].mode = TYPE_MODE (type);
       lazy_hex_fp_values[lazy_hex_fp_value_count].digits = digits;
       lazy_hex_fp_values[lazy_hex_fp_value_count].fp_suffix = fp_suffix;
@@ -1173,3 +1175,5 @@ builtin_define_type_minmax (const char *min_macro, const char *max_macro,
       cpp_define (parse_in, buf);
     }
 }
+
+#include "gt-c-family-c-cppbuiltin.h"
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2dadf092ff0138d0805965e77b4c4788ed5ab5e6..013f3bf62791cc779f6311c2c0dfecd503fc747f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR bootstrap/44509
+	* gcc.dg/pr44509.c: New test.
+
 2010-06-14  Ira Rosen  <irar@il.ibm.com>
 
 	PR tree-optimization/44507 
diff --git a/gcc/testsuite/gcc.dg/pr44509.c b/gcc/testsuite/gcc.dg/pr44509.c
new file mode 100644
index 0000000000000000000000000000000000000000..7c50bd0fc2896a3c504184a67e05a9a85369f02c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44509.c
@@ -0,0 +1,9 @@
+/* PR bootstrap/44509 */
+/* { dg-do compile } */
+/* { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } */
+
+double
+foo (void)
+{
+  return __DBL_MAX__ - __FLT_MAX__;
+}