From f1a4499719c966d53d6d2775a160538abd3fc5f9 Mon Sep 17 00:00:00 2001 From: davidxl Date: Wed, 30 Apr 2014 23:17:36 +0000 Subject: [PATCH] port r209961 from v18 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google@209962 138bc75d-0d04-0410-961f-82ee72b054a4 --- main/gcc/coverage.c | 12 +++++++++++- main/gcc/dumpfile.c | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/main/gcc/coverage.c b/main/gcc/coverage.c index 844f60de526..b3ef8e2369b 100644 --- a/main/gcc/coverage.c +++ b/main/gcc/coverage.c @@ -337,6 +337,7 @@ incompatible_cl_args (struct gcov_module_info* mod_info1, char **non_warning_opts1 = XNEWVEC (char *, mod_info1->num_cl_args); char **non_warning_opts2 = XNEWVEC (char *, mod_info2->num_cl_args); char *std_opts1 = NULL, *std_opts2 = NULL; + unsigned arch_isa1 = 0, arch_isa2 = 0; unsigned int i, num_warning_opts1 = 0, num_warning_opts2 = 0; unsigned int num_non_warning_opts1 = 0, num_non_warning_opts2 = 0; bool warning_mismatch = false; @@ -350,6 +351,7 @@ incompatible_cl_args (struct gcov_module_info* mod_info1, + mod_info2->num_cpp_defines + mod_info2->num_cpp_includes; bool *cg_opts1, *cg_opts2, has_any_incompatible_cg_opts, has_incompatible_std; + bool has_incompatible_arch_isa; unsigned int num_cg_opts = 0; for (i = 0; force_matching_cg_opts[i].opt_str; i++) @@ -382,6 +384,9 @@ incompatible_cl_args (struct gcov_module_info* mod_info1, if (strstr (option_string, "-std=")) std_opts1 = option_string; + if (!strncmp (option_string, "-m",2)) + arch_isa1 = crc32_string (arch_isa1, option_string); + slot = option_tab1.find_slot (option_string, INSERT); if (!*slot) { @@ -403,6 +408,9 @@ incompatible_cl_args (struct gcov_module_info* mod_info1, if (strstr (option_string, "-std=")) std_opts2 = option_string; + if (!strncmp (option_string, "-m",2)) + arch_isa2 = crc32_string (arch_isa2, option_string); + slot = option_tab2.find_slot (option_string, INSERT); if (!*slot) { @@ -415,6 +423,7 @@ incompatible_cl_args (struct gcov_module_info* mod_info1, std_opts1 != std_opts2 && (std_opts1 == NULL || std_opts2 == NULL || strcmp (std_opts1, std_opts2)); + has_incompatible_arch_isa = (arch_isa1 != arch_isa2); /* Compare warning options. If these mismatch, we emit a warning. */ if (num_warning_opts1 != num_warning_opts2) warning_mismatch = true; @@ -462,7 +471,8 @@ incompatible_cl_args (struct gcov_module_info* mod_info1, option_tab1.dispose (); option_tab2.dispose (); return ((flag_ripa_disallow_opt_mismatch && non_warning_mismatch) - || has_any_incompatible_cg_opts || has_incompatible_std); + || has_any_incompatible_cg_opts || has_incompatible_std + || has_incompatible_arch_isa); } diff --git a/main/gcc/dumpfile.c b/main/gcc/dumpfile.c index fd630a69933..7ca67b9fc1e 100644 --- a/main/gcc/dumpfile.c +++ b/main/gcc/dumpfile.c @@ -266,6 +266,8 @@ dump_loc (int dump_kind, FILE *dfile, source_location loc) { if (dump_kind) { + /* Ensure dump message starts on a new line. */ + fprintf (dfile, "\n"); if (LOCATION_LOCUS (loc) > BUILTINS_LOCATION) fprintf (dfile, "%s:%d:%d: note: ", LOCATION_FILE (loc), LOCATION_LINE (loc), LOCATION_COLUMN (loc)); -- 2.11.4.GIT