[PATCH][GCC][front-end][opt-framework] Remove superfluous assignment in add_params.

Tamar Christina tamar.christina@arm.com
Tue Oct 2 13:27:00 GMT 2018


Hi All,

This fixes the superfluous assignment that Coverity reported in add_params,
and changes the starting index from 0 to num_params - n in order for it to
work properly if add_params is called multiple times.

validate_params calls error so it doesn't matter that we don't check the
results here.  The results is checked in individual parameter updates after
front-end initialization.

bootstrapped and reg-tested on aarch64-none-linux-gnu and no issues.
bootstrapped x86_64-pc-linux-gnu and no issues.

Manually modified params.def to contain invalid values and code still works
as expected.  Manually passed invalid params and still errors out doing target
specific validations.  Testsuite also has existing validation tests.

Ok for trunk?

Thanks,
Tamar

gcc/:
2018-10-02  Tamar Christina  <tamar.christina@arm.com>

	* params.c (add_params): Fix initialization.

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb10045.patch
Type: text/x-diff
Size: 897 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181002/c8192b81/attachment.bin>


More information about the Gcc-patches mailing list