+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
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.