[PATCH] Use proper type in linear transformation in tree-switch-conversion (PR tree-optimization/88753).

Martin Liška mliska@suse.cz
Tue Jan 8 12:40:00 GMT 2019


Hi.

As seen in the PR, when doing switch convert linear transformation,
one needs to first convert to unsigned type for constructor values.

Patch survives regression tests and bootstrap on x86_64-linux-gnu.
Ready for trunk?
Thanks,
Martin


gcc/ChangeLog:

2019-01-08  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/88753
	* tree-switch-conversion.c (switch_conversion::build_one_array):
	Come up with local variable constructor.  Convert first to
	type of constructor values.
---
 gcc/tree-switch-conversion.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-proper-type-in-linear-transformation-in-tree-swi.patch
Type: text/x-patch
Size: 1697 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190108/a84068ea/attachment.bin>


More information about the Gcc-patches mailing list