re PR debug/66691 (ICE on valid code at -O3 with -g enabled in simplify_subreg, at...
[gcc.git] / gcc / tree-ssa.c
index ba6d5dd502bcdbe79d480afaaaa0fb1c1c6bec56..cab627daa1534665cdca4c4c6812126942737f12 100644 (file)
@@ -21,19 +21,17 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "alias.h"
+#include "symtab.h"
 #include "tree.h"
+#include "fold-const.h"
 #include "stor-layout.h"
 #include "flags.h"
 #include "tm_p.h"
 #include "target.h"
 #include "langhooks.h"
 #include "predict.h"
-#include "vec.h"
-#include "hashtab.h"
-#include "hash-set.h"
-#include "machmode.h"
 #include "hard-reg-set.h"
-#include "input.h"
 #include "function.h"
 #include "dominance.h"
 #include "cfg.h"
@@ -43,7 +41,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "internal-fn.h"
 #include "gimple-fold.h"
 #include "gimple-expr.h"
-#include "is-a.h"
 #include "gimple.h"
 #include "gimplify.h"
 #include "gimple-iterator.h"
@@ -57,7 +54,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-into-ssa.h"
 #include "tree-ssa.h"
 #include "tree-inline.h"
-#include "hash-map.h"
 #include "tree-pass.h"
 #include "diagnostic-core.h"
 #include "cfgloop.h"
@@ -1555,6 +1551,8 @@ execute_update_addresses_taken (void)
                                        TREE_TYPE (other),
                                        TREE_OPERAND (lhs, 0));
                    gimple load = gimple_build_assign (other, lrhs);
+                   location_t loc = gimple_location (stmt);
+                   gimple_set_location (load, loc);
                    gimple_set_vuse (load, gimple_vuse (stmt));
                    gsi_insert_before (&gsi, load, GSI_SAME_STMT);
                    gimple_assign_set_lhs (stmt, TREE_OPERAND (lhs, 0));