Commit 0f2fca6f by Jakub Jelinek

re PR inline-asm/84625 (ICE with empty constraint and vector constant)

	PR inline-asm/84625
	* config/i386/i386.c (ix86_print_operand): Use conditional
	output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
	zero vector.

	* gcc.target/i386/pr84625.c: New test.

From-SVN: r258125
parent e8b3f7a4
2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84625
* config/i386/i386.c (ix86_print_operand): Use conditional
output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
zero vector.
2018-03-02 Richard Biener <rguenther@suse.de> 2018-03-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/84427 PR tree-optimization/84427
......
...@@ -18743,7 +18743,8 @@ ix86_print_operand (FILE *file, rtx x, int code) ...@@ -18743,7 +18743,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
since we can in fact encode that into an immediate. */ since we can in fact encode that into an immediate. */
if (GET_CODE (x) == CONST_VECTOR) if (GET_CODE (x) == CONST_VECTOR)
{ {
gcc_assert (x == CONST0_RTX (GET_MODE (x))); if (x != CONST0_RTX (GET_MODE (x)))
output_operand_lossage ("invalid vector immediate");
x = const0_rtx; x = const0_rtx;
} }
2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84625
* gcc.target/i386/pr84625.c: New test.
2018-03-02 Richard Biener <rguenther@suse.de> 2018-03-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/84427 PR tree-optimization/84427
......
/* PR inline-asm/84625 */
/* { dg-do compile } */
/* { dg-options "-O2 -msse2" } */
typedef int V __attribute__((vector_size (16)));
void
foo (void)
{
asm volatile ("# %0" : : "X" ((V) { 1, 2, 3, 4 })); // { dg-error "invalid vector immediate" }
asm volatile ("# %0" : : "" ((V) { 2, 3, 4, 5 })); // { dg-error "invalid vector immediate" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment