When I attempt to compile the following function using http://users.physik.fu-berlin.de/~tburnus/gcc-trunk/gcc-trunk-x86_64.tar.gz FUNCTION next_state() INTRINSIC :: RESHAPE INTEGER, PARAMETER :: trantb(1,1) = RESHAPE((/1,2/), shape=(/1,1/)) next_state = trantb(1, 1) END FUNCTION next_state I get the message: test161.f90:3.67: INTEGER, PARAMETER :: trantb(1,1) = RESHAPE((/1,2/), shape=(/1,1/)) 1 Error: Symbol at (1) is not a DUMMY variable test161.f90:3.67: INTEGER, PARAMETER :: trantb(1,1) = RESHAPE((/1,2/), shape=(/1,1/)) 1 Error: Symbol at (1) is not a DUMMY variable The problem goes away if I remove "INTRINSIC :: RESHAPE"
Janus, can you have a look? It looks like another fallout of your patch. If it is not fixable quickly, we should consider backing it out until we have a working version.
> Janus, can you have a look? It looks like another fallout of your patch. Indeed, it is. > If it is not fixable quickly, we should consider backing it out > until we have a working version. The fix is quite trivial, I'll post a patch for this and PR39861 in a minute. I really wonder why these things have not been caught by the testsuite.
Subject: Bug 39864 Author: janus Date: Fri Apr 24 08:34:14 2009 New Revision: 146677 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146677 Log: 2009-04-24 Janus Weil <janus@gcc.gnu.org> PR fortran/39861 PR fortran/39864 * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy for the formal arguments. 2009-04-24 Janus Weil <janus@gcc.gnu.org> PR fortran/39861 PR fortran/39864 * gfortran.dg/intrinsic_1.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/intrinsic_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/symbol.c trunk/gcc/testsuite/ChangeLog
Fixed by r146677. Closing.