Commit b8475dd6 by Steven G. Kargl

re PR fortran/32899 (Broken diagnostic for invalid use of .eq. for logicals)

2007-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/32899
	* resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.

2007-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/32899
	* gfortran.dg/logical_comp.f90: Update dg-error strings.

From-SVN: r126985
parent 008afe51
2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/32899
* resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Daniel Franke <franke.daniel@gmail.com> Daniel Franke <franke.daniel@gmail.com>
......
...@@ -2830,8 +2830,9 @@ resolve_operator (gfc_expr *e) ...@@ -2830,8 +2830,9 @@ resolve_operator (gfc_expr *e)
if (op1->ts.type == BT_LOGICAL && op2->ts.type == BT_LOGICAL) if (op1->ts.type == BT_LOGICAL && op2->ts.type == BT_LOGICAL)
sprintf (msg, sprintf (msg,
_("Logicals at %%L must be compared with %s instead of %s"), _("Logicals at %%L must be compared with %s instead of %s"),
e->value.op.operator == INTRINSIC_EQ ? ".eqv." : ".neqv.", (e->value.op.operator == INTRINSIC_EQ
gfc_op2string (e->value.op.operator)); || e->value.op.operator == INTRINSIC_EQ_OS)
? ".eqv." : ".neqv.", gfc_op2string (e->value.op.operator));
else else
sprintf (msg, sprintf (msg,
_("Operands of comparison operator '%s' at %%L are %s/%s"), _("Operands of comparison operator '%s' at %%L are %s/%s"),
......
2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/32899
* gfortran.dg/logical_comp.f90: Update dg-error strings.
2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/32760 PR fortran/32760
! { dg-do compile } ! { dg-do compile }
! PR fortran/22503 ! PR fortran/22503, PR fortran/32899
! Suggest use of appropriate comparison operator ! Suggest use of appropriate comparison operator
program foo program foo
logical :: b logical :: b
b = b .eq. b ! { dg-error ".eqv. instead of .eq." } b = b .eq. b ! { dg-error "must be compared with" }
b = b .ne. b ! { dg-error ".neqv. instead of .ne." } b = b .ne. b ! { dg-error "must be compared with" }
end program end program
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment