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/35779] error pointer wrong in PARAMETER



------- Comment #2 from kargl at gcc dot gnu dot org  2008-12-11 20:17 -------
For some reason, init_flag in gfc_match_iterator is set to zero.
So when the matcher hits

  m = init_flag ? gfc_match_init_expr (&e1) : gfc_match_expr (&e1);

gfc_match_expr() is executed instead of gfc_match_init_expr().
By forcibly set init_flag=1 in gdb, gfortran then generates

% gfc4x -c pr35778.f90
pr35779.f90:2.43:

  integer,PARAMETER :: I2(10) = (/ (J1, J1=its_bad,1,-1) /)
                                          1
Error: Parameter 'its_bad' at (1) has not been declared or is a variable,
which does not reduce to a constant expression

Still hunting for a place to properly set init_flag.


-- 


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


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