re PR middle-end/77475 (unnecessary or misleading context in reporting command line...
authorJakub Jelinek <jakub@redhat.com>
Mon, 5 Sep 2016 18:14:25 +0000 (20:14 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 5 Sep 2016 18:14:25 +0000 (20:14 +0200)
PR middle-end/77475
* toplev.c (process_options): Temporarily set input_location
to UNKNOWN_LOCATION around targetm.target_option.override () call.

From-SVN: r239994

gcc/ChangeLog
gcc/toplev.c

index 897bfbbea8af831b06e38fbad75396d0e2e5ed51..fcca2cf68526c00c845cd3edb160b16fc1ae9b66 100644 (file)
@@ -1,3 +1,9 @@
+2016-09-05  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/77475
+       * toplev.c (process_options): Temporarily set input_location
+       to UNKNOWN_LOCATION around targetm.target_option.override () call.
+
 2016-09-05  Uros Bizjak  <ubizjak@gmail.com>
 
        PR rtl-optimization/77452
index 4da5627b350a165c1453309bedac39b76e5fa862..66099ec7d23b7abe30df6e599fafb1d452917893 100644 (file)
@@ -1220,7 +1220,10 @@ process_options (void)
   no_backend = lang_hooks.post_options (&main_input_filename);
 
   /* Some machines may reject certain combinations of options.  */
+  location_t saved_location = input_location;
+  input_location = UNKNOWN_LOCATION;
   targetm.target_option.override ();
+  input_location = saved_location;
 
   if (flag_diagnostics_generate_patch)
       global_dc->edit_context_ptr = new edit_context ();