Thomas Koenig wrote:
the attached patch extends conversion warnings to assignments.
OK for trunk?

I get now two warnings for:

complex(8), parameter :: z = cmplx (0.5, 0.5)
r = z
end


Untested: Instead of checking

  if (rvalue->expr_type == EXPR_CONSTANT
&& (lvalue->ts.type == BT_REAL || lvalue->ts.type == BT_COMPLEX)
&& (rvalue->ts.type == BT_REAL || rvalue->ts.type == BT_COMPLEX))

one might check for:

  if (rvalue->expr_type == EXPR_CONSTANT
&& (lvalue->ts.type == BT_REAL || lvalue->ts.type == BT_COMPLEX)
&& (rvalue->ts.type ==rvalue->ts.type)

Tobias

Reply via email to