http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730
Steven Bosscher <steven at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|bootstrap |java Version|4.7.0 |4.8.0 Summary|[4.8 Regression] bootstrap |Java front end emits |failure on Linux/ia32 |assembly --- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> 2012-03-26 20:18:49 UTC --- I believe the following should fix the problem, altough I fail to see how this can ever have worked with LTO. HJ, could you test this for me, please? I have no access to ia32 anymore. Index: class.c =================================================================== --- class.c (revision 185813) +++ class.c (working copy) @@ -3241,6 +3241,7 @@ java_write_globals (void) write_global_declarations (); emit_debug_global_declarations (vec, len); VEC_free (tree, gc, pending_static_fields); + java_emit_static_constructor (); } #include "gt-java-class.h" Index: jcf-parse.c =================================================================== --- jcf-parse.c (revision 185813) +++ jcf-parse.c (working copy) @@ -1689,7 +1689,7 @@ predefined_filename_p (tree node) /* Generate a function that does all static initialization for this translation unit. */ -static void +void java_emit_static_constructor (void) { tree body = NULL; @@ -1974,8 +1974,6 @@ java_parse_file (void) bitmap_obstack_release (&bit_obstack); finish: - /* Arrange for any necessary initialization to happen. */ - java_emit_static_constructor (); gcc_assert (global_bindings_p ()); } Index: java-tree.h =================================================================== --- java-tree.h (revision 185813) +++ java-tree.h (working copy) @@ -940,6 +940,7 @@ struct GTY((variable_size)) lang_type { struct eh_range; extern void java_parse_file (void); +extern void java_emit_static_constructor (void); extern tree java_type_for_mode (enum machine_mode, int); extern tree java_type_for_size (unsigned int, int); extern tree java_truthvalue_conversion (tree);