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/31198] New: wrong code generated with gfortran


With a recent gfortran, the following compiles, but generates the wrong
results:

IF (T1(1.0,1.0) .NE. (1.0,1.0) ) CALL ABORT()
IF (T1(1.0) .NE. (1.0,0.0)) CALL ABORT()
IF (M1(1,2,3) .NE. 3) CALL ABORT()
IF (M1(1,2,A4=4) .NE. 4) CALL ABORT()
CONTAINS

COMPLEX FUNCTION T1(X,Y)
  REAL :: X
  REAL, OPTIONAL :: Y
  T1=CMPLX(X,Y)
END FUNCTION T1

INTEGER FUNCTION M1(A1,A2,A3,A4)
  INTEGER :: A1,A2
  INTEGER, OPTIONAL :: A3,A4
  M1=MAX(A1,A2,A3,A4)
END FUNCTION M1

END


-- 
           Summary: wrong code generated with gfortran
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


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