aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-03-14 18:58:52 +0100
committerMarek Polacek <mpolacek@gcc.gnu.org>2014-03-14 17:58:52 +0000
commit91035653db2e23fa0f3b941537b8787731e67e29 (patch)
treed703519c49e1019b22082f798cb3843b103b3223 /gcc
parent9592100294e59ea7c6228d3d575d76d67a88f02b (diff)
downloadgcc-91035653db2e23fa0f3b941537b8787731e67e29.zip
gcc-91035653db2e23fa0f3b941537b8787731e67e29.tar.gz
gcc-91035653db2e23fa0f3b941537b8787731e67e29.tar.bz2
re PR middle-end/60484 (-fdump-rtl-expand and attribute optimize gives incorrect dump file path)
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/opts.c5
3 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 09b6e1f..5e61b25 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/common.opt b/gcc/common.opt
index de3fafff..62c72f0 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -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
diff --git a/gcc/opts.c b/gcc/opts.c
index a837408..fdc903f 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -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