diff mbox

Call assemble_external only from final.c and from MI-thunk hooks

Message ID CABu31nOLQyGywJXUP9ogRNTLAq-ur3qeJTg6dd=S0VUjc7w4fw@mail.gmail.com
State New
Headers show

Commit Message

Steven Bosscher March 26, 2012, 8:21 p.m. UTC
On Mon, Mar 26, 2012 at 8:51 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> On Mon, Mar 26, 2012 at 8:22 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> It may have caused:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730
>
> It certainly seems so. Looking into it...

Java is the culprit. I'm going to commit the following patch to paper
over the issue for now.

Comments

Eric Botcazou March 26, 2012, 8:51 p.m. UTC | #1
> Index: varasm.c
> ===================================================================
> --- varasm.c	(revision 185823)
> +++ varasm.c	(working copy)
> @@ -2170,6 +2170,10 @@
>        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.  */

There is no PR52739.
Steven Bosscher March 26, 2012, 8:57 p.m. UTC | #2
On Mon, Mar 26, 2012 at 10:51 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> Index: varasm.c
>> ===================================================================
>> --- varasm.c  (revision 185823)
>> +++ varasm.c  (working copy)
>> @@ -2170,6 +2170,10 @@
>>        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.  */
>
> There is no PR52739.

*sigh* PR52730. It's one of those days...
diff mbox

Patch

Index: varasm.c
===================================================================
--- varasm.c	(revision 185823)
+++ varasm.c	(working copy)
@@ -2170,6 +2170,10 @@ 
       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 @@ 
      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;