This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,fortran] Relax restrictions on KIND in SELECT CASE constructs
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 18 Dec 2004 03:34:04 +0100
- Subject: Re: [PATCH,fortran] Relax restrictions on KIND in SELECT CASE constructs
- References: <20041217204951.GA85681@troutmask.apl.washington.edu> <20041218003645.GA44496@troutmask.apl.washington.edu>
Steve Kargl wrote:
> + if (e->ts.kind != case_expr->ts.kind)
> + {
> + if (e->ts.kind == gfc_kind_max(e, case_expr))
> + gfc_convert_type_warn (case_expr, &e->ts, 2, 0);
> + else
> + gfc_convert_type_warn (e, &case_expr->ts, 2, 0);
> + }
> +
I think since this is invalid code you should warn for the conversion (i.e.
call gfc_convert_type), and then change the dg-error lines in the testcase you
pointed out to dg-warning.
Regards,
- Tobi