This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Mar 2007 23:51:36 -0000
- Subject: [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
- References: <bug-31253-14266@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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