[Bug fortran/45369] problem with the associate statement

2010-08-21 Thread clerman at fuse dot net


--- Comment #4 from clerman at fuse dot net  2010-08-21 21:35 ---
Subject: Re:  problem with the associate statement


Thank you very much. I use the associate construct a great deal; it can really
clarify your code.

Norm

 domob at gcc dot gnu dot org  wrote: 

=


--- Comment #3 from domob at gcc dot gnu dot org  2010-08-21 16:58 ---
Thanks for the test-case, I'll check against it when this will be implemented.


-- 


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



[Bug fortran/45369] problem with the associate statement

2010-08-21 Thread domob at gcc dot gnu dot org


--- Comment #3 from domob at gcc dot gnu dot org  2010-08-21 16:58 ---
Thanks for the test-case, I'll check against it when this will be implemented.


-- 


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



[Bug fortran/45369] problem with the associate statement

2010-08-21 Thread domob at gcc dot gnu dot org


--- Comment #2 from domob at gcc dot gnu dot org  2010-08-21 16:57 ---
I only get a limited set of errors:

test.f03:188.10:

  x_dist = pt1 % Get (X_COORD) - pt2 % Get (X_COORD)
  1
Error: Unclassifiable statement at (1)
test.f03:189.10:

  y_dist = pt1 % Get (Y_COORD) - pt2 % Get (Y_COORD)
  1
Error: Unclassifiable statement at (1)
test.f03:217.16:

  return_value = pt2d % Get (mold)
1
Error: Alternate RETURN statement at (1) is only allowed within a SUBROUTINE
test.f03:234.12:

  return_value = point_2d % Get ()
1
Error: Alternate RETURN statement at (1) is only allowed within a SUBROUTINE
test.f03:249.21:

call point_2d % Print ()
 1
Error: VARIABLE attribute of 'point_2d' conflicts with PROCEDURE attribute at
(1
)
test.f03:273.21:

call point_2d % Set (coordinates)
 1
Error: VARIABLE attribute of 'point_2d' conflicts with PROCEDURE attribute at
(1
)
test.f03:297.29:

  use Pt3d_mod, only : pt3d_t
 1
Fatal Error: Can't open module file 'pt3d_mod.mod' for reading at (1): No such
f
ile or directory



These are currently expected, because the parser does not know pt1 or pt2 are
derived-types and thus rejects a component-reference on them.  This is what I
meant with the statement, that ASSOCIATE is not yet completely working for
derived-types, see PR 38936.

*** This bug has been marked as a duplicate of 38936 ***


-- 

domob at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug fortran/45369] problem with the associate statement

2010-08-21 Thread clerman at fuse dot net


--- Comment #1 from clerman at fuse dot net  2010-08-21 16:40 ---
Created an attachment (id=21538)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21538&action=view)
code that allow the bug to be reproduced


-- 


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