+2006-02-19 Roger Sayle <roger@eyesopen.com>
+
+ PR middle-end/19543
+ * varasm.c (compare_constant) <INTEGER_CST>: Integer constants are
+ only equivalent if the have both the same mode and precision.
+
2006-02-20 Ben Elliston <bje@au.ibm.com>
* doc/tree-ssa.texi (Interfaces): Describe low vs. high GIMPLE.
+2006-02-19 Roger Sayle <roger@eyesopen.com>
+
+ PR middle-end/19543
+ * gfortran.dg/logical_1.f90: New test case.
+
2006-02-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/26334
--- /dev/null
+! { dg-do run }
+! PR middle-end/19543
+program logical_1
+ implicit none
+ logical(1), parameter :: t1 = .TRUE., f1 = .FALSE.
+ logical(2), parameter :: t2 = .TRUE., f2 = .FALSE.
+ logical(4), parameter :: t4 = .TRUE., f4 = .FALSE.
+ logical(8), parameter :: t8 = .TRUE., f8 = .FALSE.
+ character*2 :: t(4), f(4)
+
+ write(t(1),*) t1
+ write(f(1),*) f1
+ write(t(2),*) t2
+ write(f(2),*) f2
+ write(t(3),*) t4
+ write(f(3),*) f4
+ write(t(4),*) t8
+ write(f(4),*) f8
+
+ if (any(t .ne. " T")) call abort
+ if (any(f .ne. " F")) call abort
+end
/* Integer constants are the same only if the same width of type. */
if (TYPE_PRECISION (TREE_TYPE (t1)) != TYPE_PRECISION (TREE_TYPE (t2)))
return 0;
+ if (TYPE_MODE (TREE_TYPE (t1)) != TYPE_MODE (TREE_TYPE (t2)))
+ return 0;
return tree_int_cst_equal (t1, t2);
case REAL_CST: