public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jv244 at cam dot ac dot uk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/30876]  New: incorrect error message for valid code
Date: Tue, 20 Feb 2007 07:52:00 -0000	[thread overview]
Message-ID: <bug-30876-6642@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2007-02-20  7:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-20  7:52 jv244 at cam dot ac dot uk [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30876-6642@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).