[Bug fortran/29505] Should give an error when using: real :: r; r(j) = ...

2006-10-18 Thread kargl at gcc dot gnu dot org


--- Comment #1 from kargl at gcc dot gnu dot org  2006-10-18 20:52 ---
Tobias,

The code is valid fortran in that  del(j) = sin(10) is a
statement function.  Putting any executable line before that line 
(such as j = 1) causes an error to be emitted.  If you look at the
-fdump-parse-tree you'll see

symtree: del  Ambig 0
symbol del (REAL 4)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS
STATEMENT-PROC FUNCTION)
value: -5.44021130e-1
result: del
Formal arglist: j

I think the bug should be closed as INVALID.


-- 


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



[Bug fortran/29505] Should give an error when using: real :: r; r(j) = ...

2006-10-18 Thread tobias dot burnus at physik dot fu-berlin dot de


--- Comment #2 from tobias dot burnus at physik dot fu-berlin dot de  
2006-10-18 21:11 ---
Yes, you are right. I somehow missed those.

12.5.4 Statement function
A statement function is a function defined by a single statement.
  R1238 stmt-function-stmt is function-name ( [ dummy-arg-name-list ] )
= scalar-expr


-- 

tobias dot burnus at physik dot fu-berlin dot de changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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