[Bug fortran/29397] Constant logical expression with parameter array

2007-05-06 Thread pault at gcc dot gnu dot org
--- Comment #7 from pault at gcc dot gnu dot org 2007-05-07 05:44 --- The patch below works and regtests. Before submitting it, however, I would like to understand why I could not persuade the use of the repeat count to work, rather than expanding to a full array. Paul Index:

[Bug fortran/29397] Constant logical expression with parameter array

2007-04-13 Thread pault at gcc dot gnu dot org
--- Comment #5 from pault at gcc dot gnu dot org 2007-04-13 22:26 --- INTEGER :: K(3)=1 INTEGER, PARAMETER :: J(3)=(/1,2,0/) write(6,*) MAXLOC(K,J1) END works just fine. I would say that the problem is that the initializtion expression is never getting turned into an EXPR_ARRAY. Paul

[Bug fortran/29397] Constant logical expression with parameter array

2007-04-13 Thread pault at gcc dot gnu dot org
--- Comment #6 from pault at gcc dot gnu dot org 2007-04-13 23:24 --- This cures the problem but is otherwise untested. Paul Index: gcc/fortran/decl.c === *** gcc/fortran/decl.c (revision 123793) --- gcc/fortran/decl.c

[Bug fortran/29397] Constant logical expression with parameter array

2007-03-17 Thread tkoenig at gcc dot gnu dot org
--- Comment #4 from tkoenig at gcc dot gnu dot org 2007-03-17 15:27 --- *** Bug 31206 has been marked as a duplicate of this bug. *** -- tkoenig at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/29397] Constant logical expression with parameter array

2007-02-09 Thread fxcoudert at gcc dot gnu dot org
--- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-02-09 22:42 --- When we enter into gfc_trans_transfer, we have the following: if (ss == gfc_ss_terminator) { /* Transfer a scalar value. */ and we come here with a EXPR_CONST array, for which ss is set to

[Bug fortran/29397] Constant logical expression with parameter array

2007-02-06 Thread fxcoudert at gcc dot gnu dot org
--- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-02-06 14:05 --- We're passing a pointer to a logical instead of an array descriptor: $ cat a.f90 integer :: k(3), l(1) integer, parameter :: j(3) = 2 l = maxloc (k, j1) end $ cat a.f90.003t.original

[Bug fortran/29397] Constant logical expression with parameter array

2006-10-25 Thread tkoenig at gcc dot gnu dot org
--- Comment #1 from tkoenig at gcc dot gnu dot org 2006-10-25 20:39 --- This is not a maxloc bug per se. Look at this: $ cat a9.f90 INTEGER :: K(3)=1 INTEGER, PARAMETER :: J(3)=2 write (6,*) J1 END $ gfortran -fdump-tree-original a9.f90 $ ./a.out F Output should be F F F instead.