gcc/testsuite/gfortran.dg/pr98016.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! Fix for PR98016 - Used to fail with Error: Variable ānā cannot appear in the |
| 4 | ! expression at (1) for line 16. Workaround was to declare y to be real. |
| 5 | ! |
| 6 | ! Posted by Juergen Reuter <[email protected]> |
| 7 | ! |
| 8 | program is_it_valid |
| 9 | dimension y(3) |
| 10 | n=3 |
| 11 | y=func(1.0) |
| 12 | print *, y |
| 13 | stop |
| 14 | contains |
| 15 | function func(x) result (y) |
| 16 | dimension y(n) |
| 17 | y=x |
| 18 | end function |
| 19 | end |