This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, Fortran] Fix some string temporaries


Le 17/07/2016 à 18:21, Thomas Koenig a écrit :
Hi Mikael,

Do we actually want to backport this? Technically, it is a regression,
but people are not likely to notice much.

It is not an ICE, neither a code correctness issue as far as I can see,
so I would rather not backport.

Fine with me.


+        case GFC_DEP_FORWARD:
+          return 0;

This is doubtfull, but not worse than before I guess.

0 in this case means that you need no array temporary.  This is fine.

+        case GFC_DEP_BACKWARD:
+          return 1;
+
+        case GFC_DEP_OVERLAP:
+          return 1;
+
+        case GFC_DEP_NODEP:
+          return 0;
+
+        case GFC_DEP_ERROR:
+          return 0;
Can we put a gcc_unreachable here instead?

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. The only case I can see where GFC_DEP_ERROR could be returned after your change is the REF_SUBSTRING case, but then it wouldn't work either without substring...




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]