From 43d744c8e6ffb2da2f14aaae1cff0d32e5266e43 Mon Sep 17 00:00:00 2001 From: steven Date: Mon, 26 Mar 2012 20:23:36 +0000 Subject: [PATCH] * varasm.c (assemble_external): #if 0 out the new assert from the previous commit, it breaks the Java and Go front ends. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185825 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/varasm.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd53aff..7452da9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2012-03-26 Steven Bosscher + * 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 + * toplev.c (check_global_declaration_1): Do not call assemble_external. * expr.c (emit_block_move_libcall_fn): Likewise. (clear_storage_libcall_fn): Likewise. diff --git a/gcc/varasm.c b/gcc/varasm.c index 26f22dd..0c04de4 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -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; -- 2.7.4