------- Comment #8 from fxcoudert at gcc dot gnu dot org 2007-04-17 23:22 ------- (In reply to comment #6) > So, are you saying that LBOUND and UBOUND without the dimension > specifiers do not work at all?
I'm saying that gfortran is missing the piece of code that allows is to use UBOUND and LBOUND, without the DIM argument, as specification expression (ie as value assigned to a PARAMETER). So: integer, parameter, dimension(5) :: & TCg_bband_coef_ranks = ubound(TCg_coef) does not work, but integer, parameter, dimension(5) :: & TCg_bband_coef_ranks = (/ ubound(TCg_coef,1), ubound(TCg_coef,2), ... /) works (if you fill the ...) and also the following works: integer, dimension(5) :: & TCg_bband_coef_ranks = ubound(TCg_coef) > If I comment out the assignment statement > from TCg_bband_coef_ranks to rank, then it compiles, but does it > actually work? Is this program deceiving in that it compiles, but > underneath, is actually not working? That's not good! I *think* I see what you mean. When I say "it doesn't work", I mean "it doesn't work if you try to use that PARAMETER later". When a PARAMETER is unused, the missing bit of code inside gfortran is not triggered, and there's no failure to compile. So it's not deveiving in the sense of "compiling but not working". -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31591