[patch, libfortran] Fix PR 38225

Daniel Kraft d@domob.eu
Sun Nov 23 01:08:00 GMT 2008


Hi Thomas,

-      source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+      source_extent = 1;
+      sdim = GFC_DESCRIPTOR_RANK (source);
+      for (n = 0; n < sdim; n++)
+	{
+	  index_type se;
+	  se = source->dim[n].ubound + 1 - source->dim[0].lbound;
+	  source_extent *= se > 0 ? se : 0;

This is there to catch the case se < 0, I guess?  Could this happen and 
what would it mean?  (Just curious)

Daniel

-- 
Done:  Arc-Bar-Cav-Rog-Sam-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran-Tou



More information about the Gcc-patches mailing list