This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec
- From: Janus Weil <janus at gcc dot gnu dot org>
- To: Mikael Morin <mikael dot morin at sfr dot fr>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Apr 2013 13:41:35 +0200
- Subject: Re: [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec
- References: <CAKwh3qhJCDe7o-JqBLMj_ejT+nJrUQi3UVxPdPxiGCxURnmOgw at mail dot gmail dot com> <51695BFC dot 9010101 at sfr dot fr> <CAKwh3qjVyi92P9AL=EH+7qCiszi7a9yOUSnpdWE2hv1OeL5z2Q at mail dot gmail dot com> <51697D4A dot 1060903 at sfr dot fr> <516C3AA0 dot 4020302 at sfr dot fr> <CAKwh3qggcR8fEdATGTOMBQjs7+Ag8QNC98gmB0iwdfp7wdtxnQ at mail dot gmail dot com>
Hi Mikael,
>> And then, the call to gfc_match_varspec shouldn't be there in the first
>> place. I'll test the following later.
>
> It seems like the parts you're removing have essentially been there
> since day zero. Would be interesting to know if (and where) your patch
> fails.
actually I just tried it myself, and I did not see any failures in the
testsuite. So in fact it seems like it might be ok to remove it.
However, one should carefully check the standard, in order to make
sure that this is really invalid in all cases, and that the
"gfc_match_varspec" is not needed for some corner case, which is not
covered by the testsuite.
As the comment says which the patch is removing, the gfc_match_varspec
should be relevant for cases like this:
print *,char_func()(1:3)
print *,array_func()(2)
print *,derived_type_func()%comp
Are we sure that all of these are actually invalid? (At least they are
rejected by gfortran.) Or are there other cases which would be valid?
Cheers,
Janus
- References:
- [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec
- Re: [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec
- Re: [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec
- Re: [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec
- Re: [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec
- Re: [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec