From 91035653db2e23fa0f3b941537b8787731e67e29 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 14 Mar 2014 18:58:52 +0100 Subject: 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 From-SVN: r208571 --- gcc/opts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/opts.c') 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 -- cgit v1.1