diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-10 01:14:38 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-10 01:14:38 +0000 |
commit | ee85d7faa5b944860ccf8cb93a1dcab36e719508 (patch) | |
tree | 4f64ac85a76b8f914ad6a9c45baad925cfc39a07 /gcc | |
parent | 5dd7e24d702990674ea5e56bd059bcb8f9520d3b (diff) | |
download | gcc-ee85d7faa5b944860ccf8cb93a1dcab36e719508.tar.gz |
PR fortran/22527
* f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct
integer type when building an inequality.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108341 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/f95-lang.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0f9cd130451..58cf367f1c8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-12-09 Roger Sayle <roger@eyesopen.com> + + PR fortran/22527 + * f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct + integer type when building an inequality. + 2005-12-09 Richard Guenther <rguenther@suse.de> * f95-lang.c (build_builtin_fntypes): Use correct diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 1ddad87e719..a5d11615646 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -257,7 +257,8 @@ gfc_truthvalue_conversion (tree expr) if (TREE_CODE (expr) == INTEGER_CST) return integer_zerop (expr) ? boolean_false_node : boolean_true_node; else - return build2 (NE_EXPR, boolean_type_node, expr, integer_zero_node); + return build2 (NE_EXPR, boolean_type_node, expr, + build_int_cst (TREE_TYPE (expr), 0)); default: internal_error ("Unexpected type in truthvalue_conversion"); |