This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ICE on BIT_FIELD_REF <VECTOR_CST> (PR regression/21897)

On Sat, 4 Jun 2005, Jakub Jelinek wrote:
> 2005-06-04  Jakub Jelinek  <>
> 	* fold-const.c (operand_equal_p): Don't return 1, if element
> 	chains for 2 VECTOR_CSTs are not the same length.
> 	PR regression/21897
> 	* fold-const.c (fold_ternary) <case BIT_FIELD_REF>: Don't crash if
> 	not all VECTOR_CST elements are given.
> 	* gcc.c-torture/execute/20050604-1.c: New test.

This is OK for mainline.  Thanks.

My personal preference on this issue would be to force the front-ends
to fully populate these vectors to the appropriate size, padding with
zero elements as necessary.  Because, the constants in a VECTOR_CST can
be shared the space overhead is minimal.  It also avoids the ambiguity
in whether { 12, 14 } should be considered equal to { 12, 14, 0, 0 },
and should simplify the implementations of folding vector operations,
which would need to handle implicit zeros for vector addition, vector
subtraction, vector multiplication, etc...



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]