]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimize.c (tree_rest_of_compilation): Save and restore input_location.
authorRichard Henderson <rth@redhat.com>
Thu, 18 Sep 2003 01:59:27 +0000 (18:59 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 18 Sep 2003 01:59:27 +0000 (18:59 -0700)
        * tree-optimize.c (tree_rest_of_compilation): Save and restore
        input_location.

        * semantics.c (expand_body): Don't save/restore input_location.

From-SVN: r71498

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/tree-optimize.c

index d363f33688a46dd504c93e6e1445194d24217818..7b606eccda8dc81d81dc8dc81ec2a4df00f294c2 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-17  Richard Henderson  <rth@redhat.com>
+
+       * tree-optimize.c (tree_rest_of_compilation): Save and restore
+       input_location.
+
 2003-09-17  Daniel Jacobowitz  <drow@mvista.com>
 
        * config/rs6000/sysv4.h (LIB_LINUX_SPEC): Give -lpthread before -lc.
index 7d3ddc36d90069fcea1f59be69f5fde7cd971106..6ea7ffb119966ea6a0fade43de052d80c96cc41a 100644 (file)
@@ -1,3 +1,7 @@
+2003-09-17  Richard Henderson  <rth@redhat.com>
+
+       * semantics.c (expand_body): Don't save/restore input_location.
+
 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/12266
index dcd81cdf25f2a152434f20157e363a59ef09ff60..37dca0a6a571ec7c441c4d3652e8b9c53e1a18b1 100644 (file)
@@ -2845,7 +2845,6 @@ emit_associated_thunks (tree fn)
 void
 expand_body (tree fn)
 {
-  location_t saved_loc;
   tree saved_function;
   
   /* Compute the appropriate object-file linkage for inline
@@ -2862,7 +2861,6 @@ expand_body (tree fn)
     return;
 
   /* ??? When is this needed?  */
-  saved_loc = input_location;
   saved_function = current_function_decl;
 
   timevar_push (TV_INTEGRATION);
@@ -2872,7 +2870,6 @@ expand_body (tree fn)
   tree_rest_of_compilation (fn, function_depth > 1);
 
   current_function_decl = saved_function;
-  input_location = saved_loc;
 
   extract_interface_info ();
 
index 253fda2f3cd94cbe2d223a21c83d246eb27cdb1a..397bb490cb6f9493e63fe5d890765807e1d938ec 100644 (file)
@@ -95,6 +95,8 @@ clear_decl_rtl (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data)
 void
 tree_rest_of_compilation (tree fndecl, bool nested_p)
 {
+  location_t saved_loc;
+
   timevar_push (TV_EXPAND);
 
   if (flag_unit_at_a_time && !cgraph_global_info_ready)
@@ -102,6 +104,7 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
 
   /* Initialize the RTL code for the function.  */
   current_function_decl = fndecl;
+  saved_loc = input_location;
   input_location = DECL_SOURCE_LOCATION (fndecl);
   init_function_start (fndecl);
 
@@ -232,5 +235,7 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
       DECL_ARGUMENTS (fndecl) = 0;
     }
 
+  input_location = saved_loc;
+
   timevar_pop (TV_EXPAND);
 }