This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31639] [4.1/4.2/4.3] ICE in gfc_conv_constant, at fortran/trans-const.c:348 with len
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jul 2007 17:49:36 -0000
- Subject: [Bug fortran/31639] [4.1/4.2/4.3] ICE in gfc_conv_constant, at fortran/trans-const.c:348 with len
- References: <bug-31639-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from burnus at gcc dot gnu dot org 2007-07-08 17:49 -------
> function f()
> integer :: i = irand()
> f = i
> end function
We should give a message such as ifort:
The initialization shall not appear for this object name. [F]
This array or function or substring is invalid in constant expressions.
[IRAND]
The place to change is check_init_expr; maybe gfc_intrinsic_func_interface.
Giving an error should fix both problems.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31639