Commit 67339062 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/36362 (ICE in simplify_subreg)

	PR target/36362
	* gimplify.c (gimplify_expr) <case TRUTH_NOT_EXPR>: If *expr_p type
	is not bool, boolify the whole *expr_p and convert to the desired type.

	* gcc.c-torture/execute/20080529-1.c: New test.

From-SVN: r136434
parent a68ab351
2008-06-06 Jakub Jelinek <jakub@redhat.com>
PR target/36362
* gimplify.c (gimplify_expr) <case TRUTH_NOT_EXPR>: If *expr_p type
is not bool, boolify the whole *expr_p and convert to the desired type.
2008-06-06 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to
200805.
* langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause.
......
......@@ -5890,8 +5890,14 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
break;
case TRUTH_NOT_EXPR:
TREE_OPERAND (*expr_p, 0)
= gimple_boolify (TREE_OPERAND (*expr_p, 0));
if (TREE_CODE (TREE_TYPE (*expr_p)) != BOOLEAN_TYPE)
{
tree type = TREE_TYPE (*expr_p);
*expr_p = fold_convert (type, gimple_boolify (*expr_p));
ret = GS_OK;
break;
}
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
is_gimple_val, fb_rvalue);
recalculate_side_effects (*expr_p);
......
2008-06-06 Jakub Jelinek <jakub@redhat.com>
PR target/36362
* gcc.c-torture/execute/20080529-1.c: New test.
2008-06-06 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/gomp/collapse-1.c: New test.
* gcc.dg/gomp/nesting-1.c: New test.
* g++.dg/gomp/task-1.C: New test.
......
/* PR target/36362 */
extern void abort (void);
int
test (float c)
{
return !!c * 7LL == 0;
}
int
main (void)
{
if (test (1.0f) != 0)
abort ();
return 0;
}
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