This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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,*) J<1
END
$ gfortran -fdump-tree-original a9.f90
$ ./a.out
 F

Output should be
F F F

instead.  This is correct when the logical expression
isn't constant:

$ cat a10.f90
INTEGER :: K(3)=1
INTEGER, PARAMETER :: J(3)= (/0, 1, 2 /)
write (6,*) J<1
END
$ gfortran a10.f90
$ ./a.out
 T F F

Looks like overzelous simplification, somewhere.


-- 

tkoenig at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tkoenig at gcc dot gnu dot
                   |                            |org
            Summary|Problem with MAXLOC where   |Constant logical expression
                   |mask involves a parameter   |with parameter array
                   |array                       |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]