public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "giannozz at nest dot sns dot it" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/17630] New: Interface procedure not recognized Date: Thu, 23 Sep 2004 09:10:00 -0000 [thread overview] Message-ID: <20040923090958.17630.giannozz@nest.sns.it> (raw) Linux C daily build, 22 sep: $ gfc --version GNU Fortran 95 (GCC 4.0.0 20040922 (experimental)) $ gfc -c wave_base.f90 In file wave_base..f90:49 cnorm = cnorm + dotp(gzero, cgrad(:,i,1), cgrad(:,i,1)) 1 Error: Symbol 'dotp' at (1) has no IMPLICIT type 'dotp' is defined as an interface procedure. I don't see anything wrong in the following piece of code: !==----------------------------------------------==! MODULE wave_base !==----------------------------------------------==! IMPLICIT NONE INTEGER, PARAMETER :: dbl = selected_real_kind(14,200) INTEGER, PARAMETER :: group = 0 PUBLIC :: converg_base_gamma INTERFACE dotp MODULE PROCEDURE dotp_gamma, dotp_gamma_n END INTERFACE !==----------------------------------------------==! CONTAINS !==----------------------------------------------==! !==----------------------------------------------==! SUBROUTINE converg_base_gamma(gzero, cgrad, gemax, cnorm) !==----------------------------------------------==! IMPLICIT NONE ! ... declare subroutine arguments COMPLEX(dbl) :: cgrad(:,:,:) LOGICAL, INTENT(IN) :: gzero REAL(dbl), INTENT(OUT) :: gemax, cnorm ! ... declare other variables INTEGER :: imx, izamax, i, nb, ngw REAL(dbl) :: gemax_l ! ... end of declarations ! ---------------------------------------------- ngw = SIZE( cgrad, 1) nb = SIZE( cgrad, 2) gemax_l = 0.d0 cnorm = 0.d0 DO i = 1, nb imx = izamax( ngw, cgrad(1, i, 1), 1 ) IF ( gemax_l < ABS( cgrad(imx, i, 1) ) ) THEN gemax_l = ABS ( cgrad(imx, i, 1) ) END IF cnorm = cnorm + dotp(gzero, cgrad(:,i,1), cgrad(:,i,1)) END DO CALL mp_max(gemax_l, group) CALL mp_sum(nb, group) CALL mp_sum(ngw, group) gemax = gemax_l cnorm = SQRT( cnorm / (nb * ngw) ) RETURN !==----------------------------------------------==! END SUBROUTINE converg_base_gamma !==----------------------------------------------==! !==----------------------------------------------==! REAL(dbl) FUNCTION dotp_gamma(gzero, ng, a, b) !==----------------------------------------------==! REAL(dbl) :: ddot REAL(dbl) :: dot_tmp INTEGER, INTENT(IN) :: ng LOGICAL, INTENT(IN) :: gzero COMPLEX(dbl) :: a(:), b(:) INTEGER :: n n = MIN( SIZE(a), SIZE(b) ) n = MIN( n, ng ) IF ( n < 1 ) & CALL errore( ' dotp_gamma ', ' wrong dimension ', 1 ) ! ... gzero is true on the processor where the first element of the ! ... input arrays is the coefficient of the G=0 plane wave ! IF (gzero) THEN dot_tmp = ddot( 2*(n-1), a(2), 1, b(2), 1) dot_tmp = 2.0d0 * dot_tmp + REAL( a(1) ) * REAL( b(1) ) ELSE dot_tmp = ddot( 2*ng, a(1), 1, b(1), 1) dot_tmp = 2.0d0*dot_tmp END IF CALL mp_sum( dot_tmp, group ) dotp_gamma = dot_tmp RETURN !==----------------------------------------------==! END FUNCTION dotp_gamma !==----------------------------------------------==! !==----------------------------------------------==! REAL(dbl) FUNCTION dotp_gamma_n(gzero, a, b) !==----------------------------------------------==! LOGICAL, INTENT(IN) :: gzero COMPLEX(dbl) :: a(:), b(:) INTEGER :: n n = MIN( SIZE(a), SIZE(b) ) IF ( n < 1 ) & CALL errore( ' dotp_gamma_n ', ' wrong dimension ', 1 ) dotp_gamma_n = dotp_gamma(gzero, n, a, b) RETURN !==----------------------------------------------==! END FUNCTION dotp_gamma_n !==----------------------------------------------==! !==----------------------------------------------==! END MODULE wave_base !==----------------------------------------------==! -- Summary: Interface procedure not recognized Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: giannozz at nest dot sns dot it CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17630
next reply other threads:[~2004-09-23 9:10 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-09-23 9:10 giannozz at nest dot sns dot it [this message] 2004-09-23 17:56 ` [Bug fortran/17630] " tobi at gcc dot gnu dot org 2004-09-23 19:46 ` tobi at gcc dot gnu dot org 2004-09-23 19:46 ` tobi 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=20040923090958.17630.giannozz@nest.sns.it \ --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).