diff options
Diffstat (limited to 'gcc/tree-ssa-strlen.c')
-rw-r--r-- | gcc/tree-ssa-strlen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index cc1f5f4..8794cc2 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -1886,7 +1886,9 @@ maybe_diag_stxncpy_trunc (gimple_stmt_iterator gsi, tree src, tree cnt) } } - location_t callloc = gimple_location (stmt); + location_t callloc = gimple_nonartificial_location (stmt); + callloc = expansion_point_location_if_in_system_header (callloc); + tree func = gimple_call_fndecl (stmt); if (lenrange[0] != 0 || !wi::neg_p (lenrange[1])) @@ -2069,7 +2071,8 @@ handle_builtin_stxncpy (built_in_function, gimple_stmt_iterator *gsi) to strlen(S)). */ strinfo *silen = get_strinfo (pss->first); - location_t callloc = gimple_location (stmt); + location_t callloc = gimple_nonartificial_location (stmt); + callloc = expansion_point_location_if_in_system_header (callloc); tree func = gimple_call_fndecl (stmt); |