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/30872] New: incorrect error message for valid code Date: Tue, 20 Feb 2007 07:50:00 -0000 [thread overview] Message-ID: <bug-30872-6642@http.gcc.gnu.org/bugzilla/> (raw) With recent trunk, gfortran incorrectly generates an error for the following standard code: MODULE MOD1 IMPLICIT NONE INTEGER, PARAMETER :: dp=KIND(0.0D0) CONTAINS SUBROUTINE pw_compose_stripe(weights,in_val,in_val_first,in_val_last,& out_val,n_el) REAL(kind=dp), DIMENSION(0:2), & INTENT(in) :: weights INTEGER :: n_el REAL(kind=dp), DIMENSION(1:n_el), & INTENT(in) :: in_val REAL(kind=dp), DIMENSION(1:n_el), & INTENT(inout) :: out_val REAL(kind=dp), INTENT(in) :: in_val_last, in_val_first out_val=in_val END SUBROUTINE pw_compose_stripe SUBROUTINE pw_nn_compose_r_work(weights,in_val,out_val,bo) REAL(kind=dp), DIMENSION(0:2, 0:2, 0:2) :: weights INTEGER, DIMENSION(2, 3) :: bo REAL(kind=dp), DIMENSION(bo(1, 1):bo(2, & 1), bo(1, 2):bo(2, 2), bo(1, 3):bo(2, & 3)), INTENT(inout) :: out_val REAL(kind=dp), DIMENSION(bo(1, 1):bo(2, & 1), bo(1, 2):bo(2, 2), bo(1, 3):bo(2, & 3)), INTENT(in) :: in_val INTEGER :: n_el,i,j REAL(kind=dp) :: in_val_f, in_val_l INTEGER, DIMENSION(3) :: s s(1)=bo(2,1)-bo(1,1)+1 i=1 ; j=1 CALL pw_compose_stripe(weights=weights(:,i,j),& in_val=in_val(:,i,j),& in_val_first=in_val_f,in_val_last=in_val_l,& out_val=out_val(:,bo(1,2)+i,bo(1,3)+j),n_el=s(1)) END SUBROUTINE pw_nn_compose_r_work END MODULE MOD1 USE MOD1 REAL(kind=dp), DIMENSION(0:2, 0:2, 0:2) :: weights INTEGER, PARAMETER, DIMENSION(2,3) :: bo= & RESHAPE((/-1,1,-1,1,-1,1/),(/2,3/)) REAL(kind=dp), DIMENSION(bo(1, 1):bo(2, & 1), bo(1, 2):bo(2, 2), bo(1, 3):bo(2, & 3)) :: out_val,in_val in_val=1.0 out_val=0.0 CALL pw_nn_compose_r_work(weights,in_val,out_val,bo) ! write(6,'(10F5.1)') in_val ! write(6,'(10F5.1)') out_val 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=30872
next reply other threads:[~2007-02-20 7:50 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-02-20 7:50 jv244 at cam dot ac dot uk [this message] 2007-02-20 16:50 ` [Bug fortran/30872] Bogus "size of variable is too large" burnus at gcc dot gnu dot org 2007-04-01 22:12 ` pault at gcc dot gnu dot org 2007-04-05 21:01 ` pault at gcc dot gnu dot org 2007-04-07 20:24 ` pault at gcc dot gnu dot org 2007-04-07 20:33 ` 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-30872-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: linkBe 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).