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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic

--- Comment #1 from anlauf at gcc dot gnu.org ---
What compilation options are you using?  I only get a warning here:

select_contiguous.F90:20:12:

   20 |        q => p_
      |            1
Warning: Assignment to contiguous pointer from non-contiguous target at (1)
[-Wextra]


The message comes from expr.cc:

  /* Warn for assignments of contiguous pointers to targets which is not
     contiguous.  Be lenient in the definition of what counts as
     contiguous.  */

  if (lhs_attr.contiguous
      && lhs_attr.dimension > 0)
    {
      if (gfc_is_not_contiguous (rvalue))
        {
          gfc_error ("Assignment to contiguous pointer from "
                     "non-contiguous target at %L", &rvalue->where);
          return false;
        }
      if (!gfc_is_simply_contiguous (rvalue, false, true))
        gfc_warning (OPT_Wextra, "Assignment to contiguous pointer from "
                                 "non-contiguous target at %L",
&rvalue->where);
    }


We're not being lenient enough...

Reply via email to