Commit bf8e3b77 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/42927 (type mismatch in shift expression produces ice with -O3)

2010-02-03  Richard Guenther  <rguenther@suse.de>

	PR middle-end/42927
	* tree-cfg.c (verify_gimple_assign_binary): Fix shift verification.

	* gcc.c-torture/compile/pr42927.c: New testcase.

From-SVN: r156464
parent bde17fdc
2010-02-03 Richard Guenther <rguenther@suse.de>
PR middle-end/42927
* tree-cfg.c (verify_gimple_assign_binary): Fix shift verification.
2010-02-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.gcc: Reenable check for obsolete targets.
......
2010-02-03 Richard Guenther <rguenther@suse.de>
PR middle-end/42927
* gcc.c-torture/compile/pr42927.c: New testcase.
2010-02-03 Tobias Burnus <burnus@net-b.de>
PR fortran/42936
......
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef enum { READ_SHARED = 0, WRITE_EXCLUSIVE = 1,
READ_EXCLUSIVE = 2, EXCLUSIVE_ACCESS = 3 } scsires_access_mode;
struct scsires_extent_elem {
scsires_access_mode mode;
unsigned relative_address;
u_int32_t first_block;
u_int32_t length;
};
typedef struct scsires_extent_elem scsires_extent_elem_t;
struct scsires_extent {
u_int8_t num_elements;
scsires_extent_elem_t *elements;
};
typedef struct scsires_extent scsires_extent_t;
unsigned char buf[512];
void scsires_issue_reservation(scsires_extent_t * new_extent)
{
int i;
for (i = 0; i < new_extent->num_elements; i++)
{
buf[(i * 8)] = new_extent->elements[i].mode;
buf[(i * 8) + 1] = ((new_extent->elements[i].length >> 16) & 0xff);
buf[(i * 8) + 2] = ((new_extent->elements[i].length >> 8) & 0xff);
buf[(i * 8) + 3] = (new_extent->elements[i].length & 0xff);
buf[(i * 8) + 4] = ((new_extent->elements[i].first_block >> 24) & 0xff);
buf[(i * 8) + 5] = ((new_extent->elements[i].first_block >> 16) & 0xff);
buf[(i * 8) + 6] = ((new_extent->elements[i].first_block >> 8) & 0xff);
buf[(i * 8) + 7] = (new_extent->elements[i].first_block & 0xff);
}
}
......@@ -3287,13 +3287,13 @@ verify_gimple_assign_binary (gimple stmt)
if ((!INTEGRAL_TYPE_P (rhs1_type)
&& !FIXED_POINT_TYPE_P (rhs1_type)
&& !(TREE_CODE (rhs1_type) == VECTOR_TYPE
&& TREE_CODE (TREE_TYPE (rhs1_type)) == INTEGER_TYPE))
&& INTEGRAL_TYPE_P (TREE_TYPE (rhs1_type))))
|| (!INTEGRAL_TYPE_P (rhs2_type)
/* Vector shifts of vectors are also ok. */
&& !(TREE_CODE (rhs1_type) == VECTOR_TYPE
&& TREE_CODE (TREE_TYPE (rhs1_type)) == INTEGER_TYPE
&& INTEGRAL_TYPE_P (TREE_TYPE (rhs1_type))
&& TREE_CODE (rhs2_type) == VECTOR_TYPE
&& TREE_CODE (TREE_TYPE (rhs2_type)) == INTEGER_TYPE))
&& INTEGRAL_TYPE_P (TREE_TYPE (rhs2_type))))
|| !useless_type_conversion_p (lhs_type, rhs1_type))
{
error ("type mismatch in shift expression");
......
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