i386.c (print_reg): Error out for values of 8-bit size in invalid integer register.

* config/i386/i386.c (print_reg): Error out for values
	of 8-bit size in invalid integer register.

testsuite/ChangeLog:

	* gcc.target/i386/invsize-1.c: New test.

From-SVN: r245785
This commit is contained in:
Uros Bizjak 2017-02-28 19:03:16 +01:00 committed by Uros Bizjak
parent 203ced0a77
commit 2af0c3edd1
4 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2017-02-28 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (print_reg): Error out for values
of 8-bit size in invalid integer register.
2017-02-28 Martin Sebor <msebor@redhat.com>
PR tree-optimization/79691

View File

@ -17660,6 +17660,8 @@ print_reg (rtx x, int code, FILE *file)
case 1:
if (regno >= ARRAY_SIZE (qi_reg_name))
goto normal;
if (!ANY_QI_REGNO_P (regno))
error ("unsupported size for integer register in 32-bit mode");
reg = qi_reg_name[regno];
break;
case 0:

View File

@ -1,3 +1,7 @@
2017-02-28 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/invsize-1.c: New test.
2017-02-28 Martin Sebor <msebor@redhat.com>
PR tree-optimization/79691

View File

@ -0,0 +1,8 @@
/* { dg-do compile { target ia32 } } */
void foo (char x)
{
register char rx __asm ("si") = x;
__asm__ volatile ("# %0" : : "r" (rx));
} /* { dg-error "unsupported size" } */