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>
Tue, 3 May 2022 09:19:20 +0000 (11:19 +0200)
commit6b4cc784806ac8676a08ecbbeadbd1bfa56073bb
tree777dbc28b217da71aaab56e1a65aeaa0e0af6a62
parent99f55024b0609e0d85f6c58828faad3c51a49749
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.
gcc/opts.cc
gcc/testsuite/gcc.dg/pr105461.c [new file with mode: 0644]