]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/60484 (-fdump-rtl-expand and attribute optimize gives incorrect...
authorJakub Jelinek <jakub@redhat.com>
Fri, 14 Mar 2014 17:58:52 +0000 (18:58 +0100)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 14 Mar 2014 17:58:52 +0000 (17:58 +0000)
PR middle-end/60484
* common.opt (dump_base_name_prefixed): New Variable.
* opts.c (finish_options): Don't prepend directory to x_dump_base_name
if x_dump_base_name_prefixed is already set, set it at the end.

Co-Authored-By: Marek Polacek <polacek@redhat.com>
From-SVN: r208571

gcc/ChangeLog
gcc/common.opt
gcc/opts.c

index 09b6e1f73656c0a3438100b7d4cade2dac556898..5e61b25db5f97e0454658a3eb8fb2660d192f52c 100644 (file)
@@ -1,3 +1,11 @@
+2014-03-14  Jakub Jelinek  <jakub@redhat.com>
+           Marek Polacek  <polacek@redhat.com>
+
+       PR middle-end/60484
+       * common.opt (dump_base_name_prefixed): New Variable.
+       * opts.c (finish_options): Don't prepend directory to x_dump_base_name
+       if x_dump_base_name_prefixed is already set, set it at the end.
+
 2014-03-14  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR rtl-optimization/60508
index de3fafffa96545d07be187a2f0035cfcfe276dbe..62c72f0d2fbfec77e86c42fb2eacfe29e6a46f83 100644 (file)
@@ -211,6 +211,10 @@ bool flag_opts_finished
 Variable
 unsigned int flag_sanitize
 
+; Flag whether a prefix has been added to dump_base_name
+Variable
+bool dump_base_name_prefixed = false
+
 ###
 Driver
 
index a83740802782600e611914372e58d1926ca6c8de..fdc903f9271a7b8c13e26fb24c9bc00332f5b315 100644 (file)
@@ -644,7 +644,9 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
 {
   enum unwind_info_type ui_except;
 
-  if (opts->x_dump_base_name && ! IS_ABSOLUTE_PATH (opts->x_dump_base_name))
+  if (opts->x_dump_base_name
+      && ! IS_ABSOLUTE_PATH (opts->x_dump_base_name)
+      && ! opts->x_dump_base_name_prefixed)
     {
       /* First try to make OPTS->X_DUMP_BASE_NAME relative to the
         OPTS->X_DUMP_DIR_NAME directory.  Then try to make
@@ -674,6 +676,7 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
              opts->x_dump_base_name = new_dump_base_name;
            }
        }
+       opts->x_dump_base_name_prefixed = true;
     }
 
   /* Handle related options for unit-at-a-time, toplevel-reorder, and