This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[fortran,committed] Fix mismatch types
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 8 Nov 2007 15:34:57 +0000
- Subject: [fortran,committed] Fix mismatch types
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=FMwNLbs8co7c+wk2thRrfBdxmGlYoTlhdSYu+bvmh6Q=; b=DmT6WC1tZXh6gplKbR/Vwhf0dOSgWNJOVvKcZzpm/Ql4tDHE4n+eI56wAZYN5ItPnXuowdebCQOriWDuYLbj1HN/9MoChpuOSt2j0rgPCOPQWr7LoWPW/Er6tiqZjAyu3spIs3yD6xzuzAmpeOm3U8tVpYUqABBRCIDUFHr9Tew=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=dYYbknPTa+0Vp45Rdt7UZu7dLrOVWtAstGF1Jyc5WHbn0/PCkAlxQuS+RW6dnybzsJg3o6tI8HPdZd1wBapcKfh4lY3RVAeqAo9vdsuJf/vJ8KKfeM76sAkUAPJDt0/o+89Pp9EA2Fm+x5CRQEylq+PXTiIvvi2KWUdfgzJZT+A=
Regtesting with type-checking and -fdefault-integer-8 spotted a
trivial mismatch in trans-intrinsic.c (gfc_conv_intrinsic_ishft). I
committed the patch below as rev. 130003, under the "obvious" rule,
after regtesting with -m32 and -m64 on x86_64-linux. No new testcase,
since the testsuite already covered this.
(I missed rev. 130000! That would have been *cool*!)
FX
Index: ChangeLog
===================================================================
--- ChangeLog (revision 130002)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2007-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/34028
+ * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use correct type.
+
2007-11-08 Tobias Burnus <burnus@net-b.de>
PR fortran/33917
Index: trans-intrinsic.c
===================================================================
--- trans-intrinsic.c (revision 130002)
+++ trans-intrinsic.c (working copy)
@@ -2533,7 +2533,7 @@ gfc_conv_intrinsic_ishft (gfc_se * se, g
/* The Fortran standard allows shift widths <= BIT_SIZE(I), whereas
gcc requires a shift width < BIT_SIZE(I), so we have to catch this
special case. */
- num_bits = build_int_cst (TREE_TYPE (args[0]), TYPE_PRECISION (type));
+ num_bits = build_int_cst (TREE_TYPE (args[1]), TYPE_PRECISION (type));
cond = fold_build2 (GE_EXPR, boolean_type_node, width, num_bits);
se->expr = fold_build3 (COND_EXPR, type, cond,