[patch, Fortran] Fix some string temporaries
Thomas Koenig
tkoenig@netcologne.de
Mon Jul 18 20:20:00 GMT 2016
Am 18.07.2016 um 20:58 schrieb Mikael Morin:
>> Unfortunately not. The original code (before I lifted out the
>> functionality) sometimes had GFC_DEP_ERROR at the end of the
>> function, which was then removed by
>>
>> return fin_dep == GFC_DEP_OVERLAP;
>>
> That is very strange, there is an assert just a few lines before, that
> fin_dep != GFC_DEP_ERROR.
This is not the only return statement.
For example, look at
@@ -2215,7 +2268,7 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gf
/* Exactly matching and forward overlapping ranges don't cause a
dependency. */
if (fin_dep < GFC_DEP_BACKWARD)
- return 0;
+ return fin_dep;
A GFC_DEP_ERROR could 'escape' here.
I didn't change the logic (at least not intentionally), I just made
it more visible.
Regards
Thomas
More information about the Fortran
mailing list