PR26471 UBSAN: tc-metag.c:7038 left shift cannot be represented

PR 26471
	* config/tc-metag.c (md_chars_to_number): Make retval unsigned.
This commit is contained in:
Alan Modra 2020-08-31 14:36:34 +09:30
parent 7a5dd76f3c
commit 46021a61e4
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2020-08-31 Alan Modra <amodra@gmail.com>
PR 26471
* config/tc-metag.c (md_chars_to_number): Make retval unsigned.
2020-08-31 Alan Modra <amodra@gmail.com>
PR 26468

View File

@ -7030,7 +7030,7 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp)
static unsigned int
md_chars_to_number (char *val, int n)
{
int retval;
unsigned int retval;
unsigned char * where = (unsigned char *) val;
for (retval = 0; n--;)