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]

[pretty-ipa] Fix some more problems with dwarf2out on expressions


	* omp-low.c (scan_omp_1_op): Do not duplicate nonlocal vars.
	* dwarf2out.c (loc_descriptor_from_tree_1): Handle CONST_DECL,
	COMPLEX_CST and do not abort on address of REAL_CST.
	* tree-inline.c (remap_decls): Do not push decls to nonlocalized
	list when it is NULL.
Index: omp-low.c
===================================================================
*** omp-low.c	(revision 144859)
--- omp-low.c	(working copy)
*************** scan_omp_1_op (tree *tp, int *walk_subtr
*** 1899,1904 ****
--- 1899,1907 ----
    switch (TREE_CODE (t))
      {
      case VAR_DECL:
+       if (ctx && auto_var_in_fn_p (*tp, current_function_decl))
+ 	*tp = remap_decl (t, &ctx->cb);
+       break;
      case PARM_DECL:
      case LABEL_DECL:
      case RESULT_DECL:
Index: dwarf2out.c
===================================================================
*** dwarf2out.c	(revision 144859)
--- dwarf2out.c	(working copy)
*************** loc_descriptor_from_tree_1 (tree loc, in
*** 10421,10426 ****
--- 10421,10430 ----
          return loc_descriptor_from_tree_1 (TREE_OPERAND (loc, 0), 1);
        break;
  
+     case CONST_DECL:
+       return loc_descriptor_from_tree_1 (DECL_INITIAL (loc), want_address);
+       break;
+ 
      case VAR_DECL:
        /* We don't know yet if the location will be referenced and output.
           Give up for the moment. 
*************** loc_descriptor_from_tree_1 (tree loc, in
*** 10625,10634 ****
  
      case REAL_CST:
      case STRING_CST:
!       if (want_address)
! 	goto cst_address;
!       /* We can handle STRING CSTs.  */
!       gcc_unreachable ();
  
      case CONSTRUCTOR:
      cst_address:
--- 10629,10638 ----
  
      case REAL_CST:
      case STRING_CST:
!     case COMPLEX_CST:
!       /* TODO: When we don't want address, we can construct small
!          constants here using int_loc_descriptor.  */
!       goto cst_address;
  
      case CONSTRUCTOR:
      cst_address:
Index: tree-inline.c
===================================================================
*** tree-inline.c	(revision 144859)
--- tree-inline.c	(working copy)
*************** remap_decls (tree decls, VEC(nonlocalize
*** 712,718 ****
  	      && (var_ann (old_var) || !gimple_in_ssa_p (cfun)))
  	    cfun->local_decls = tree_cons (NULL_TREE, old_var,
  						   cfun->local_decls);
! 	  declare_nonlocalized_var (nonlocalized_list, old_var, NULL_TREE, id, true);
  	  continue;
  	}
  
--- 712,719 ----
  	      && (var_ann (old_var) || !gimple_in_ssa_p (cfun)))
  	    cfun->local_decls = tree_cons (NULL_TREE, old_var,
  						   cfun->local_decls);
! 	  if (nonlocalized_list != NULL)
! 	    declare_nonlocalized_var (nonlocalized_list, old_var, NULL_TREE, id, true);
  	  continue;
  	}
  
*************** remap_decls (tree decls, VEC(nonlocalize
*** 726,732 ****
        if (new_var == id->retvar)
  	;
        else if (!new_var)
! 	declare_nonlocalized_var (nonlocalized_list, old_var, NULL_TREE, id, true);
        else
  	{
  	  gcc_assert (DECL_P (new_var));
--- 727,736 ----
        if (new_var == id->retvar)
  	;
        else if (!new_var)
!         {
! 	  if (nonlocalized_list != NULL)
! 	    declare_nonlocalized_var (nonlocalized_list, old_var, NULL_TREE, id, true);
! 	}
        else
  	{
  	  gcc_assert (DECL_P (new_var));


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