https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79956

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #34 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Thomas, r246153 is wrong, e.g.:

diff --git a/libgfortran/generated/reshape_c10.c
b/libgfortran/generated/reshape_c10.c
index 00c64aeb746f..af45e960ee7f 100644
--- a/libgfortran/generated/reshape_c10.c
+++ b/libgfortran/generated/reshape_c10.c
@@ -78,6 +78,10 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
   index_type shape_data[GFC_MAX_DIMENSIONS];

   rdim = GFC_DESCRIPTOR_EXTENT(shape,0);
+  /* rdim is always > 0; this lets the compiler optimize more and
+   avoids a potential warning.  */
+  GFC_ASSERT(sdim>0);
+

This should of course read "GFC_ASSERT(rdim>0);" not "sdim>0"

I currently get warnings that sdim is uninitialized in the assert.

Reply via email to