This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: DECL_DEFER_OUTPUT Change and Java


On Mon, 2001 Mar 05, Jeffrey D. Oldham wrote:
> On 2001Feb26, the treatment of DECL_DEFER_OUTPUT in gcc/toplev.c and
> gcc/c-decl.c was changed.  While the resulting source code still
> bootstraps, it does not compile when using "../configure
> --enable-languages=java".  What Java code does the (attached) change
> break?
>   
> To see the failure, check out a "2001-02-26 3:30" version of the gcc
> source code tree, e.g., 'cvs update -D "2001-02-26 3:30"'.  Compile using
> 
>         ../configure && make -j 4 CFLAGS=-g BOOT_CFLAGS=-g all
> 
> (All times are listed using Pacific Standard Time.  Please adjust to
> your local time zone.  (What is ISO 8601 syntax for specifying a
> timezone?))
> 
> A failure like:
> 
>     home/oldham/gcc/gcc2/objdir/gcc/gcj
> +-B/home/oldham/gcc/gcc2/objdir/i686-pc-linux-gnu/libjava/
> +-B/home/oldham/gcc/gcc2/objdir/gcc/ --encoding=UTF-8 -C
> +-L/home/oldham/gcc/gcc2/objdir/i686-pc-linux-gnu/libjava -g -classpath
> +/home/oldham/gcc/gcc2/objdir/i686-pc-linux-gnu/libjava:/home/oldham/gcc/gcc2/li+bjava -d /home/oldham/gcc/gcc2/objdir/i686-pc-linux-gnu/libjava
> +java/lang/ConcreteProcess.java
>     <built-in>:0: storage size of `_ZTVN4java4lang5ClassE' isn't known
> 
> will occur.

On Tue, Mar 06, 2001 at 02:16:41PM +0000, Jason Merrill wrote:
> Does setting DECL_EXTERNAL on class_dtable_decl fix things?

I do not know.  You understand what changes you made and your proposed
solution so your solving the problem should not take more than thirty
minutes.

Note that this problem has prevented bootstrapping gcc mainline on
mips-sgi-irix6.5 and i686-pc-linux-gnu for the five days since Mar02
because Java now participates in bootstrapping.  The error has
prevented building Java on the mainline since 26Feb.

Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com
? differences-26Feb-03
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.9389
retrieving revision 1.9390
diff -c -p -w -r1.9389 -r1.9390
*** ChangeLog	2001/02/25 19:34:04	1.9389
--- ChangeLog	2001/02/26 11:11:35	1.9390
***************
*** 1,3 ****
--- 1,13 ----
+ 2001-02-26  Jason Merrill  <jason@redhat.com>
+ 
+ 	* c-decl.c (finish_decl): Set DECL_DEFER_OUTPUT on tentative file-scope
+ 	definitions.
+ 	* toplev.c (rest_of_decl_compilation): Check DECL_DEFER_OUTPUT to
+ 	recognize a tentative definition.  Lose obsolete code.
+ 
+ 	* toplev.c (wrapup_global_declarations): Don't emit DECL_COMDAT
+ 	variables unless necessary, either.
+ 
  2001-02-25  Richard Henderson  <rth@redhat.com>
  
  	* ifcvt.c (struct noce_if_info): Add test_bb.
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.211
retrieving revision 1.212
diff -c -p -w -r1.211 -r1.212
*** c-decl.c	2001/02/23 20:38:54	1.211
--- c-decl.c	2001/02/26 11:11:38	1.212
*************** finish_decl (decl, init, asmspec_tree)
*** 3612,3620 ****
--- 3612,3628 ----
        maybe_objc_check_decl (decl);
  
        if (!DECL_CONTEXT (decl))
+ 	{
+ 	  if (DECL_INITIAL (decl) == NULL_TREE
+ 	      || DECL_INITIAL (decl) == error_mark_node)
+ 	    /* Don't output anything
+ 	       when a tentative file-scope definition is seen.
+ 	       But at end of compilation, do output code for them.  */
+ 	    DECL_DEFER_OUTPUT (decl) = 1;
  	  rest_of_decl_compilation (decl, asmspec,
  				    (DECL_CONTEXT (decl) == 0
  				     || TREE_ASM_WRITTEN (decl)), 0);
+ 	}
        else
  	{
  	  if (asmspec)
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.427
retrieving revision 1.428
diff -c -p -w -r1.427 -r1.428
*** toplev.c	2001/02/21 19:45:25	1.427
--- toplev.c	2001/02/26 11:11:38	1.428
*************** wrapup_global_declarations (vec, len)
*** 1940,1947 ****
  	     defined in a main file, as opposed to an include file.  */
  
  	  if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
! 	      && (! TREE_READONLY (decl)
! 		  || TREE_PUBLIC (decl)
  		  || (!optimize
  		      && flag_keep_static_consts
  		      && !DECL_ARTIFICIAL (decl))
--- 1940,1947 ----
  	     defined in a main file, as opposed to an include file.  */
  
  	  if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
! 	      && (((! TREE_READONLY (decl) || TREE_PUBLIC (decl))
! 		   && !DECL_COMDAT (decl))
  		  || (!optimize
  		      && flag_keep_static_consts
  		      && !DECL_ARTIFICIAL (decl))
*************** rest_of_decl_compilation (decl, asmspec,
*** 2562,2580 ****
      {
        timevar_push (TV_VARCONST);
        make_decl_rtl (decl, asmspec);
-       /* Initialized extern variable exists to be replaced
- 	 with its value, or represents something that will be
- 	 output in another file.  */
-       if (! (TREE_CODE (decl) == VAR_DECL
- 	     && DECL_EXTERNAL (decl) && TREE_READONLY (decl)
- 	     && DECL_INITIAL (decl) != 0
- 	     && DECL_INITIAL (decl) != error_mark_node))
  	/* Don't output anything
  	     when a tentative file-scope definition is seen.
  	     But at end of compilation, do output code for them.  */
! 	if (! (! at_end && top_level
! 	       && (DECL_INITIAL (decl) == 0
! 		   || DECL_INITIAL (decl) == error_mark_node)))
  	  assemble_variable (decl, top_level, at_end, 0);
        if (decl == last_assemble_variable_decl)
  	{
--- 2562,2571 ----
      {
        timevar_push (TV_VARCONST);
        make_decl_rtl (decl, asmspec);
        /* Don't output anything
  	 when a tentative file-scope definition is seen.
  	 But at end of compilation, do output code for them.  */
!       if (at_end || !DECL_DEFER_OUTPUT (decl))
  	assemble_variable (decl, top_level, at_end, 0);
        if (decl == last_assemble_variable_decl)
  	{

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]