On 09/06/2015 03:57 AM, Chung-Lin Tang wrote:
Hi,
Currently most non-target specific options are skipped when crossing the
LTO/offload processing border, however since there are still quite a
number of warning calls in many target backends, it makes sense to
save and propagate the associated options, to preserve consistency in warning
behavior.
For example, currently:
$ x86_64-pc-linux-gnu-gcc -fopenacc test.c -fno-diagnostics-show-caret
y.c: In function 'main._omp_fn.0':
y.c:6:11: warning: using num_workers (32), ignoring 500
#pragma acc parallel num_workers(500)
^
(note: this warning message is triggered by nvptx code currently only
on gomp-4_0-branch, but illustrates the point)
The caret stills shows, because -fno-diagnostics-show-caret does not
reach the accel compiler. -flto should also have a similar issue.
The attached patch allows a series of -fdiagnostics-* options to be
propagated by lto-wrapper. I've tested this patch without regressions,
is this okay for trunk?
Thanks,
Chung-Lin
2015-09-06 Chung-Lin Tang <clt...@codesourcery.com>
* lto-wrapper.c (merge_and_complain): Add OPT_fdiagnostics_show_caret,
OPT_fdiagnostics_show_option, OPT_fdiagnostics_show_location_, and
OPT_fshow_column to handled saved option cases.
(append_compiler_options): Do not skip the above added options.
OK. Please install.
Thanks,
Jeff