This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [cfg-branch] location lists fixes


On Wed, 27 Mar 2002, Jan Hubicka wrote:

> 
> Hi,
> your location list code dies on i386 bootstrap in several cases.  I've
> fixed the crashes, but I don't have enought time today to understand the
> code better, so I think I've just fixed the symptoms, not real problems
> in number of cases.

Well, the second change is correct. I forgot we output global decls at 
the end, when we've already finished compiling all functions.  I'm *very* 
surprised i didn't hit this in my bootstraps.
The first is because variable tracking is run at a time when we still have 
things like LO_SUM's, etc.

> 
> I am going to check in the change, as keeping the tree bootstrapping is
> important for preformance testing.  Hope you will know how to fix it
> better.
> 
> Please next time try to check whether tree still bootstraps, so the
> testing will keep functional.
> 
Sorry.  I'll make it a flag so it's not on by default for now.



> Honza
> 
> Wed Mar 27 17:07:16 CET 2002  Jan Hubicka  <jh@suse.cz>
> 	* dwarf2out.c (loc_descriptor): Avoid some dead corners.
> 	(add_location_or_const_value_attribute): Avoid crash on null
> 	current_fucntion_decl.

> 
> Index: dwarf2out.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
> retrieving revision 1.328.2.14
> diff -c -3 -p -r1.328.2.14 dwarf2out.c
> *** dwarf2out.c	2002/03/25 17:12:03	1.328.2.14
> --- dwarf2out.c	2002/03/27 16:07:08
> *************** loc_descriptor (rtl)
> *** 8053,8058 ****
> --- 8053,8061 ----
>   {
>     dw_loc_descr_ref loc_result = NULL;
>   
> +   if (!rtl)
> +     return 0;
> + 
>     switch (GET_CODE (rtl))
>       {
>       case SUBREG:
> *************** loc_descriptor (rtl)
> *** 8104,8110 ****
>   	}  
>         break;
>       default:
> !       abort ();
>       }
>   
>     return loc_result;
> --- 8107,8113 ----
>   	}  
>         break;
>       default:
> !       return 0;
>       }
>   
>     return loc_result;
> *************** add_location_or_const_value_attribute (d
> *** 9100,9106 ****
>         
>         if (DECL_SECTION_NAME (decl))
>   	secname = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
> !       else if (DECL_SECTION_NAME (current_function_decl))
>   	secname = TREE_STRING_POINTER (DECL_SECTION_NAME (current_function_decl));
>         else
>   	secname = TEXT_SECTION_NAME;
> --- 9103,9110 ----
>         
>         if (DECL_SECTION_NAME (decl))
>   	secname = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
> !       else if (current_function_decl
> ! 	       && DECL_SECTION_NAME (current_function_decl))
>   	secname = TREE_STRING_POINTER (DECL_SECTION_NAME (current_function_decl));
>         else
>   	secname = TEXT_SECTION_NAME;
> 


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