mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 02:44:18 +08:00
c++: modules and debug marker stmts
21_strings/basic_string/operations/contains/nonnull.cc was failing because the module was built with debug markers and the testcase was built not expecting debug markers, so we crashed in lower_stmt. Let's accommodate this by discarding debug marker statements we don't want. gcc/cp/ChangeLog: * module.cc (trees_in::core_vals) [STATEMENT_LIST]: Skip DEBUG_BEGIN_STMT if !MAY_HAVE_DEBUG_MARKER_STMTS.
This commit is contained in:
parent
03c7145a41
commit
74498be0e6
@ -6895,7 +6895,12 @@ trees_in::core_vals (tree t)
|
||||
{
|
||||
tree_stmt_iterator iter = tsi_start (t);
|
||||
for (tree stmt; RT (stmt);)
|
||||
tsi_link_after (&iter, stmt, TSI_CONTINUE_LINKING);
|
||||
{
|
||||
if (TREE_CODE (stmt) == DEBUG_BEGIN_STMT
|
||||
&& !MAY_HAVE_DEBUG_MARKER_STMTS)
|
||||
continue;
|
||||
tsi_link_after (&iter, stmt, TSI_CONTINUE_LINKING);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user