This is the mail archive of the gcc-bugs@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]

[Bug fortran/36371] [4.3/4.4 Regression] Wrong locus for errors in DATA statement



------- Comment #1 from pault at gcc dot gnu dot org  2008-06-07 16:17 -------
(In reply to comment #0)

This comes about, indirectly, because of simplification.  Change the the index
of the first item in the data list for 'c' to 2, for example.  This can be
tracked back to resolve.c (check_data_variable), where the call to
gfc_check_assign is gfc_check_assign (var->expr, values.vnode->expr, 0); The
rvalue, values.vnode->expr, is used for the locus in the error.  Since it has
been simplfied here, the error results.  Using the lvalue expression at least
hits the data statement.

I notice that the only customer for gfc_check_assign with 'conform' == 0 is
check_data_variable.  It might be better to take account of this in the call.

I'll do it.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-05-29 21:05:37         |2008-06-07 16:17:12
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36371


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