From: Kai Tietz <ktietz70@googlemail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Richard Guenther <richard.guenther@gmail.com>,
"H.J. Lu" <hjl.tools@gmail.com>
Subject: [patch gimplify]: Fix for PR/48984
Date: Fri, 13 May 2011 09:23:00 -0000 [thread overview]
Message-ID: <BANLkTinEMSM2yQ85BwiM2FJSeu1+xe=DVg@mail.gmail.com> (raw)
Hello,
this patch fixes the issue reported in PR/48984. Issue is that
fortran has multiple BOOLEAN_TYPE'ed types with different modes. So
the check for BOOLEAN_TYPE in gimplification is wrong and instead we
need to check for identify to boolean_type_node.
ChangeLog
2011-05-13 Kai Tietz
* gimplify.c (gimplify_expr): Check for boolean_type_node instead
for BOOLEAN_TYPE for TRUTH-NOT/AND/OR/XOR.
(gimple_boolify): Check for cast for boolean_type_node instead for
BOOLEAN_TYPE.
Bootstrap passed and now doing fortran testsuite run to verify.
Regards,
Kai
Index: gimplify.c
===================================================================
--- gimplify.c (revision 173711)
+++ gimplify.c (working copy)
@@ -2848,7 +2848,7 @@
default:
/* Other expressions that get here must have boolean values, but
might need to be converted to the appropriate mode. */
- if (TREE_CODE (type) == BOOLEAN_TYPE)
+ if (type == boolean_type_node)
return expr;
return fold_convert_loc (loc, boolean_type_node, expr);
}
@@ -6754,7 +6754,7 @@
}
case TRUTH_NOT_EXPR:
- if (TREE_CODE (TREE_TYPE (*expr_p)) != BOOLEAN_TYPE)
+ if (TREE_TYPE (*expr_p) != boolean_type_node)
{
tree type = TREE_TYPE (*expr_p);
*expr_p = fold_convert (type, gimple_boolify (*expr_p));
@@ -7199,7 +7199,7 @@
fold_truth_not_expr) happily uses operand type and doesn't
automatically uses boolean_type as result, we need to keep
orignal type. */
- if (TREE_CODE (org_type) != BOOLEAN_TYPE)
+ if (org_type != boolean_type_node)
{
*expr_p = fold_convert (org_type, *expr_p);
ret = GS_OK;
next reply other threads:[~2011-05-13 6:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 9:23 Kai Tietz [this message]
2011-05-13 9:23 ` Eric Botcazou
2011-05-13 10:20 ` Richard Guenther
2011-05-13 10:25 ` Kai Tietz
2011-05-13 13:58 ` H.J. Lu
2011-05-13 13:59 ` Richard Guenther
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTinEMSM2yQ85BwiM2FJSeu1+xe=DVg@mail.gmail.com' \
--to=ktietz70@googlemail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).