+2009-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39379
+ * tree-cfg.c (remove_useless_stmts_bind): Don't remove GIMPLE_BINDs
+ with blocks containing IMPORTED_DECLs in BLOCK_VARS.
+
2009-03-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (R8_REG, R9_REG): New constants.
+2009-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39379
+ * g++.dg/debug/dwarf2/imported-module-3.C: New test.
+ * g++.dg/debug/dwarf2/imported-module-4.C: New test.
+
2009-03-04 Jason Merrill <jason@redhat.com>
PR c++/13549
|| (TREE_CODE (BLOCK_ABSTRACT_ORIGIN (block))
!= FUNCTION_DECL)))
{
- gsi_insert_seq_before (gsi, body_seq, GSI_SAME_STMT);
- gsi_remove (gsi, false);
- data->repeat = true;
+ tree var = NULL_TREE;
+ /* Even if there are no gimple_bind_vars, there might be other
+ decls in BLOCK_VARS rendering the GIMPLE_BIND not useless. */
+ if (block)
+ for (var = BLOCK_VARS (block); var; var = TREE_CHAIN (var))
+ if (TREE_CODE (var) == IMPORTED_DECL)
+ break;
+ if (var)
+ gsi_next (gsi);
+ else
+ {
+ gsi_insert_seq_before (gsi, body_seq, GSI_SAME_STMT);
+ gsi_remove (gsi, false);
+ data->repeat = true;
+ }
}
else
gsi_next (gsi);