Re: [patch, fortran] PR 46659 - extend conversion warnings to assignments

2011-08-17 Thread Tobias Burnus
On 08/15/2011 07:49 PM, Thomas Koenig wrote: Am 14.08.2011 22:54, schrieb Tobias Burnus: 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 The problem is that

Re: [patch, fortran] PR 46659 - extend conversion warnings to assignments

2011-08-15 Thread Thomas Koenig
Am 14.08.2011 22:54, schrieb Tobias Burnus: 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 The problem is that gfc_check_assign is called twice for this, fr

Re: [patch, fortran] PR 46659 - extend conversion warnings to assignments

2011-08-14 Thread Tobias Burnus
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 || lval

Re: [patch, fortran] PR 46659 - extend conversion warnings to assignments

2011-08-14 Thread Thomas Koenig
I wrote: Hello world, the attached patch extends conversion warnings to assignments. OK for trunk? ... and forgot to say that this has been regression-tested. Thomas

[patch, fortran] PR 46659 - extend conversion warnings to assignments

2011-08-14 Thread Thomas Koenig
Hello world, the attached patch extends conversion warnings to assignments. OK for trunk? Thomas 011-08-14 Thomas Koenig PR fortran/46659 * expr.c (gfc_check_assign): Check for type conversions when the right-hand side is a constant REAL cor COMPLEX contstan