varasm.c (assemble_external): #if 0 out the new assert from the previous commit...
authorSteven Bosscher <steven@gcc.gnu.org>
Mon, 26 Mar 2012 20:23:36 +0000 (20:23 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Mon, 26 Mar 2012 20:23:36 +0000 (20:23 +0000)
* varasm.c (assemble_external): #if 0 out the new assert from the
previous commit, it breaks the Java and Go front ends.

From-SVN: r185825

gcc/ChangeLog
gcc/varasm.c

index bd53aff7fa3d67e66c1278cb09e44d2bd8654268..7452da90f4755549402be0e4929bb10e96deae25 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-26  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * varasm.c (assemble_external): #if 0 out the new assert from the
+       previous commit, it breaks the Java and Go front ends.
+
 2012-03-26  Steven Bosscher  <steven@gcc.gnu.org>
 
        * toplev.c (check_global_declaration_1): Do not call assemble_external.
index 26f22ddcb1c8dc29eac318b104ae87958ae6cfb1..0c04de47974cf67cf7d79a4c4788a14067d4621e 100644 (file)
@@ -2170,6 +2170,10 @@ assemble_external (tree decl ATTRIBUTE_UNUSED)
       If it's not, we should not be calling this function.  */
   gcc_assert (asm_out_file);
 
+  /* In a perfect world, the following condition would be true.
+     Sadly, the Java and Go front ends emit assembly *from the front end*,
+     bypassing the call graph.  See PR52739.  Fix before GCC 4.8.  */
+#if 0
   /* This function should only be called if we are expanding, or have
      expanded, to RTL.
      Ideally, only final.c would be calling this function, but it is
@@ -2177,6 +2181,7 @@ assemble_external (tree decl ATTRIBUTE_UNUSED)
      for further discussion.  */
   gcc_assert (cgraph_state == CGRAPH_STATE_EXPANSION
              || cgraph_state == CGRAPH_STATE_FINISHED);
+#endif
 
   if (!DECL_P (decl) || !DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
     return;