------- Comment #6 from burnus at gcc dot gnu dot org  2008-11-01 22:14 -------
(In reply to comment #5)
> On a related note: The following snippet from PR36426 produces an ICE.
>  function foo(x)
>    character(len=len(x)) :: foo,x
>  end function foo

As this ICE is a regression, I opened the PR 37992 for this. (It is also not an
accepts invalid since gfortran 4.4 now prints an error message.)

 * * *

For the LHS (of "=") expressions such as in comment 1, one now also gets the
error message.

 * * *

(In reply to comment #4)
> > And I also believe all our examples in this PR are wrong.
> In all the invalid examples given in comment #3, the dimension specification
> is on the rhs of '::'. In my example it's on the lhs.

Sorry, I don't understand / find your example. The example

 REAL, DIMENSION(2,2), PARAMETER :: xyz = RESHAPE((/ 1,2,3,4 /), SHAPE(xyz))
is no different from the invalid examples of comment #3:
  REAL :: X = EPSILON(X)

> If the latter is invalid too, how about
> DIMENSION :: xyz(2,2)
> REAL, PARAMETER :: xyz = RESHAPE((/ 1,2,3,4 /), SHAPE(xyz))

I think that test case is OK.


-- 


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

Reply via email to