This is the mail archive of the
mailing list for the GCC project.
Re: [fortran,patch] Forbid assignment of different character kinds
- From: FX <fxcoudert at gmail dot com>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 4 Oct 2014 12:18:19 +0200
- Subject: Re: [fortran,patch] Forbid assignment of different character kinds
- Authentication-results: sourceware.org; auth=none
- References: <20140930084916 dot GA31712 at physik dot fu-berlin dot de>
> In the test case, could you also add a "PR fortran/36534" to the
> as comment?
> Additionally, I wonder whether instead of the name-based checking
> + && (sym->name != '_' || sym->name != '_'))
> it wouldn't be cleaner to check
> && sym->attr.intrinsic
> (If you change it to attr.intrinsic, you need to set
> the attribute also in intrinsic.c's gfc_convert_type_warn.)
> I know that using __... names it not really possible in Fortran (except as C
> binding name), but - still - I think it is cleaner. But I am fine with
> either version.
OK, it sounds logical, so I tried thatâ it gets caught later in resolve.c, saying ââ declared INTRINSIC at %L does not existâ, because itâs not actually a proper intrinsic, itâs just a function call manually constructed.
In the interest of minimal modification of this code, I have committed the original approach as rev. 215887.
Thanks for the review.