This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29397] Constant logical expression with parameter array
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2006 20:39:36 -0000
- Subject: [Bug fortran/29397] Constant logical expression with parameter array
- References: <bug-29397-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla 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,*) 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