[patch, fortran] Fix PR 33539
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Thu Oct 4 20:23:00 GMT 2007
Thomas Koenig wrote:
> Hello world,
>
> this fixes PR 33539 by not issuing a warning for strings
> that have zero length. Regression-tested on i686-pc-linux-gnu.
>
> No special test case needed; I just removed dg-warning lines from
> the places where they occurred in the testsuite.
>
> OK? (Also OK with the approach of not warning)?
When I thought about this bug, I decided against this approach, as I
thought it might suppress valid warnings.
The problem with doing real fix is that once we resolve character
lengths, we don't know where they're coming from, i.e. we can't tell if
they're from a module or whether they belong to PARAMETERs.
Unfortunately, we can't add this information to the gfc_charlen
structures, as they may be referred to from several objects.
If other people agree that this is the right way of solving this, I'm by
no means opposed to it, though.
Cheers,
- Tobi
>
> Thomas
>
> 2007-10-04 Thomas Koenig <tkoenig@gcc.gnu.org>
>
> PR fortran/33539
> * resolve.c: Only warn if the string length is
> less than zero.
>
> 2007-10-04 Thomas Koenig <tkoenig@gcc.gnu.org>
>
> PR fortran/33539
> * zero_length_2.f90: Omit warning for zero-length string.
> * repeat_2.f90: Likewise.
> * repeat_4.f90: Likewise.
> * char_length_2.f90: Likewise.
>
>
More information about the Fortran
mailing list