middle-end/105461 - opts processing of -fvar-tracking
authorRichard Biener <rguenther@suse.de>
Tue, 3 May 2022 08:36:30 +0000 (10:36 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 6 May 2022 09:13:13 +0000 (11:13 +0200)
commit1b13a6e0dc2f61fc26ebfd33ee8549da45286f34
tree747ef855ef352a9b75eedd3391a016c2b0171159
parentae6271d5e30bdcaf834a6720632bf9c18ab462fd
middle-end/105461 - opts processing of -fvar-tracking

The flag_var_tracking reset in finish_options doesn't match the
condition in process_options, in particular we fail to reset it
when the option was specified on the command line.  The following
fixes this and also alters the debug info level guard to match
the one in process_options.

2022-05-03  Richard Biener  <rguenther@suse.de>

PR middle-end/105461
* opts.cc (finish_options): Match the condition to
disable flag_var_tracking to that of process_options.

* gcc.dg/pr105461.c: New testcase.

(cherry picked from commit 6b4cc784806ac8676a08ecbbeadbd1bfa56073bb)
gcc/opts.cc
gcc/testsuite/gcc.dg/pr105461.c [new file with mode: 0644]