public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30876]  New: incorrect error message for valid code
@ 2007-02-20  7:52 jv244 at cam dot ac dot uk
  2007-02-20 16:28 ` [Bug fortran/30876] Array valued recursive function rejected burnus at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-02-20  7:52 UTC (permalink / raw)
  To: gcc-bugs

With recent trunk, gfortran incorrectly generates an error for the following
standard code:
MODULE M1
CONTAINS
 FUNCTION correct_input(i)
   INTEGER :: i,correct_input(5)
   IF (i<1) correct_input=test(1)
   IF (i>5) correct_input=test(5)
 END FUNCTION correct_input

 RECURSIVE FUNCTION test(i)
  INTEGER :: test(5),i,j
  IF (i<1 .OR. i>5) THEN
    test=correct_input(i)
  ELSE
    test=0
    test(1:6-i)=(/(j,j=i,5)/)
    test=test(3)
  ENDIF
 END FUNCTION

END MODULE M1

USE M1
IF (ANY(TEST(3).NE.(/5,5,5,5,5/))) CALL ABORT()
IF (ANY(TEST(6).NE.(/0,0,0,0,0/))) CALL ABORT()
END


-- 
           Summary: incorrect error message for valid code
           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=30876


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-05-11 11:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-20  7:52 [Bug fortran/30876] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20 16:28 ` [Bug fortran/30876] Array valued recursive function rejected burnus at gcc dot gnu dot org
2007-02-21 16:33 ` pault at gcc dot gnu dot org
2007-02-21 17:03 ` burnus at gcc dot gnu dot org
2007-02-21 18:52 ` pault at gcc dot gnu dot org
2007-03-22  0:22 ` fxcoudert at gcc dot gnu dot org
2007-03-22  7:41 ` burnus at gcc dot gnu dot org
2007-05-08 12:51 ` pault at gcc dot gnu dot org
2007-05-08 12:52 ` pault at gcc dot gnu dot org
2007-05-08 12:53 ` pault at gcc dot gnu dot org
2007-05-10  7:14 ` patchapp at dberlin dot org
2007-05-11 11:47 ` pault at gcc dot gnu dot org
2007-05-11 11:47 ` pault at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).