This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/12704] New: [gfortran] MAXLOC
- From: "jv244 at cam dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Oct 2003 07:27:53 -0000
- Subject: [Bug fortran/12704] New: [gfortran] MAXLOC
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12704
Summary: [gfortran] MAXLOC
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
The following contains a few testcases for MAXLOC, at least one of them is not
working (some other cases depend on PR12703 (ALLOCATE(C(0)))
INTEGER :: B(3)
INTEGER, POINTER, DIMENSION(:) :: C
INTEGER, POINTER, DIMENSION(:,:) :: D
B=0
IF (MAXLOC(B,1).NE.1) CALL ABORT()
B(1)=1
B(2)=0
B(3)=1
IF (MAXLOC(B,1).NE.1) CALL ABORT()
B=-HUGE(1)
IF (MAXLOC(B,1).NE.1) CALL ABORT()
ALLOCATE(C(0))
IF (MAXLOC(C,1).NE.0) CALL ABORT()
ALLOCATE(D(1,0))
IF (ANY(MAXLOC(D).NE.(/0,0/))) CALL ABORT()
END