* decl2.c (cp_write_global_declarations): Return after writing a PCH.
authorSteven Bosscher <steven@gcc.gnu.org>
Mon, 10 Dec 2012 17:58:45 +0000 (17:58 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Mon, 10 Dec 2012 17:58:45 +0000 (17:58 +0000)
From-SVN: r194363

gcc/cp/ChangeLog
gcc/cp/decl2.c

index a5d0b76c61541173e168be620c6ef425e17f7b21..50549a63a1a22ce8faaf00feed43b2c912576e9f 100644 (file)
@@ -1,3 +1,7 @@
+2012-12-10  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * decl2.c (cp_write_global_declarations): Return after writing a PCH.
+
 2012-12-07  Jason Merrill  <jason@redhat.com>
 
        PR c++/55127
index 9ed53b819fce9130a0b144c08a211251414787a6..fd54cac904733ab98360031d54210c8a72a6ebfc 100644 (file)
@@ -3944,8 +3944,13 @@ cp_write_global_declarations (void)
       || !vec_safe_is_empty (decl_namespace_list))
     return;
 
+  /* This is the point to write out a PCH if we're doing that.
+     In that case we do not want to do anything else.  */
   if (pch_file)
-    c_common_write_pch ();
+    {
+      c_common_write_pch ();
+      return;
+    }
 
   cgraph_process_same_body_aliases ();