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/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-03-20 23:51 -------
I think test.f is not valid Fortran, because size(p,1) is not a valid
specification expression. See 7.1.6 of the F2003 standard: it is a array
inquiry function (size) with an argument that is a variable (p) whose
properties inquired about *are dependent* on the upper bound of the last
dimension of an assumed-size array. So, it's invalid.

Now, we actually accept it because SIZE is a specification inquiry, and we
don't check things any further. This part (check_inquiry and its callers in
expr.c) need some rewriting to go along with the standard.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
           Severity|major                       |normal
  GCC build triplet|x86_64-linux-gnu            |
   GCC host triplet|x86_64-linux-gnu            |
 GCC target triplet|x86_64-linux-gnu            |
           Keywords|ice-on-valid-code           |accepts-invalid, ice-on-
                   |                            |invalid-code
      Known to fail|4.1.1 4.1.2                 |4.1.1 4.1.2 4.2.0 4.3.0
   Last reconfirmed|2007-03-17 22:08:39         |2007-03-20 23:51:36
               date|                            |


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


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