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
This commit is contained in:
parent
008afe5148
commit
b8475dd604
4 changed files with 16 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
|
|
|
@ -2830,8 +2830,9 @@ resolve_operator (gfc_expr *e)
|
|||
if (op1->ts.type == BT_LOGICAL && op2->ts.type == BT_LOGICAL)
|
||||
sprintf (msg,
|
||||
_("Logicals at %%L must be compared with %s instead of %s"),
|
||||
e->value.op.operator == INTRINSIC_EQ ? ".eqv." : ".neqv.",
|
||||
gfc_op2string (e->value.op.operator));
|
||||
(e->value.op.operator == INTRINSIC_EQ
|
||||
|| e->value.op.operator == INTRINSIC_EQ_OS)
|
||||
? ".eqv." : ".neqv.", gfc_op2string (e->value.op.operator));
|
||||
else
|
||||
sprintf (msg,
|
||||
_("Operands of comparison operator '%s' at %%L are %s/%s"),
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
PR fortran/32760
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
! { dg-do compile }
|
||||
! PR fortran/22503
|
||||
! PR fortran/22503, PR fortran/32899
|
||||
! Suggest use of appropriate comparison operator
|
||||
|
||||
program foo
|
||||
logical :: b
|
||||
b = b .eq. b ! { dg-error ".eqv. instead of .eq." }
|
||||
b = b .ne. b ! { dg-error ".neqv. instead of .ne." }
|
||||
b = b .eq. b ! { dg-error "must be compared with" }
|
||||
b = b .ne. b ! { dg-error "must be compared with" }
|
||||
end program
|
||||
|
|
Loading…
Add table
Reference in a new issue