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/31639] [4.1/4.2/4.3] ICE in gfc_conv_constant, at fortran/trans-const.c:348 with len



------- 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


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