public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/36355] New: matmul argument-check: wrong error messages Date: Wed, 28 May 2008 09:47:00 -0000 [thread overview] Message-ID: <bug-36355-13648@http.gcc.gnu.org/bugzilla/> (raw) $> cat matmul.f90 REAL, DIMENSION(2,2) :: a character(1) :: b print *, MATMUL(a, b) ! line 4: argument matrix_b is wrong print *, MATMUL(b, a) ! line 5: argument matrix_a is wrong end $> gfortran-svn matmul.f90 matmul.f90:4.18: print *, MATMUL(a, b) 1 Error: 'matrix_a' argument of 'matmul' intrinsic at (1) must be numeric or LOGICAL matmul.f90:5.20: print *, MATMUL(b, a) 1 Error: 'matrix_b' argument of 'matmul' intrinsic at (1) must be numeric or LOGICAL Proposed change (untested): Index: check.c =================================================================== --- check.c (revision 136058) +++ check.c (working copy) @@ -1761,7 +1761,7 @@ gfc_check_malloc (gfc_expr *size) try gfc_check_matmul (gfc_expr *matrix_a, gfc_expr *matrix_b) { - if ((matrix_a->ts.type != BT_LOGICAL) && !gfc_numeric_ts (&matrix_b->ts)) + if ((matrix_a->ts.type != BT_LOGICAL) && !gfc_numeric_ts (&matrix_a->ts)) { gfc_error ("'%s' argument of '%s' intrinsic at %L must be numeric " "or LOGICAL", gfc_current_intrinsic_arg[0], @@ -1769,7 +1769,7 @@ gfc_check_matmul (gfc_expr *matrix_a, gf return FAILURE; } - if ((matrix_b->ts.type != BT_LOGICAL) && !gfc_numeric_ts (&matrix_a->ts)) + if ((matrix_b->ts.type != BT_LOGICAL) && !gfc_numeric_ts (&matrix_b->ts)) { gfc_error ("'%s' argument of '%s' intrinsic at %L must be numeric " "or LOGICAL", gfc_current_intrinsic_arg[1], -- Summary: matmul argument-check: wrong error messages Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dfranke at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36355
next reply other threads:[~2008-05-28 9:47 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-05-28 9:47 dfranke at gcc dot gnu dot org [this message] 2008-05-28 11:53 ` [Bug fortran/36355] " dfranke at gcc dot gnu dot org 2008-07-22 12:30 ` tkoenig at gcc dot gnu dot org 2008-10-25 8:41 ` tkoenig at gcc dot gnu dot org 2008-10-25 12:30 ` dfranke at gcc dot gnu dot org 2008-12-08 22:36 ` mikael at gcc dot gnu dot org 2008-12-09 17:58 ` dfranke at gcc dot gnu dot org 2008-12-12 13:25 ` dfranke at gcc dot gnu dot org 2008-12-12 13:28 ` dfranke 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-36355-13648@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).