public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25070]  New: better diagnostic needed
@ 2005-11-26 17:54 jv244 at cam dot ac dot uk
  2005-11-26 19:47 ` [Bug fortran/25070] rank mismatch in subroutine call fxcoudert at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jv244 at cam dot ac dot uk @ 2005-11-26 17:54 UTC (permalink / raw)
  To: gcc-bugs

using GNU Fortran 95 (GCC) 4.1.0 20051126 (prerelease)  with '-g -pedantic
-std=f95', I get a bad / no diagnostic for the following invalid code:

INTEGER :: I(2,2)
I=RESHAPE((/1,2,3,4/),(/2,2/))
CALL TST(I)
CONTAINS
 SUBROUTINE TST(I)
  INTEGER :: I(:)
  write(6,*) I
 END SUBROUTINE TST
END


-- 
           Summary: better diagnostic needed
           Product: gcc
           Version: 4.1.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=25070


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

* [Bug fortran/25070] rank mismatch in subroutine call
  2005-11-26 17:54 [Bug fortran/25070] New: better diagnostic needed jv244 at cam dot ac dot uk
@ 2005-11-26 19:47 ` fxcoudert at gcc dot gnu dot org
  2006-02-09 23:23 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-26 19:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from fxcoudert at gcc dot gnu dot org  2005-11-26 19:47 -------
gfortran doesn't catch that error at compile-time.

## g95 ##
In file foo.f90:3

CALL TST(I)
          1
Error: Rank mismatch for assumed-shape array in parameter 'i' at (1)
## Intel ##
fortcom: Error: foo.f90, line 3: The shape matching rules of actual arguments
and dummy arguments have been violated.   [I]
CALL TST(I)
---------^
compilation aborted for foo.f90 (code 1)
## Portland ##
PGF90-S-0446-Argument number 1 to tst: rank mismatch (foo.f90: 3)
  0 inform,   0 warnings,   1 severes, 0 fatal for MAIN
## Sun ##

CALL TST(I)
         ^
"foo.f90", Line = 3, Column = 10: ERROR: The rank of this actual argument must
match that of assumed-shape dummy argument "I".


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-26 19:47:29
               date|                            |
            Summary|better diagnostic needed    |rank mismatch in subroutine
                   |                            |call


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25070


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

* [Bug fortran/25070] rank mismatch in subroutine call
  2005-11-26 17:54 [Bug fortran/25070] New: better diagnostic needed jv244 at cam dot ac dot uk
  2005-11-26 19:47 ` [Bug fortran/25070] rank mismatch in subroutine call fxcoudert at gcc dot gnu dot org
@ 2006-02-09 23:23 ` pault at gcc dot gnu dot org
  2006-02-13 19:32 ` pault at gcc dot gnu dot org
  2006-02-13 19:37 ` pault at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-02-09 23:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2006-02-09 23:23 -------
Subject: Bug 25070

Author: pault
Date: Thu Feb  9 23:23:28 2006
New Revision: 110816

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110816
Log:
2006-02-09  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/26038
        * trans-stmt.c (gfc_trans_allocate): Provide assumed character length
        scalar with missing backend_decl for the hidden dummy charlen.

        PR fortran/25059
        * interface.c (gfc_extend_assign): Remove detection of non-PURE
        subroutine in assignment interface, with gfc_error, and put it in
        * resolve.c (resolve_code).

        PR fortran/25070
        * interface.c (gfc_procedure_use): Flag rank checking for non-
        elemental, contained or interface procedures in call to
        (compare_actual_formal), where ranks are checked for assumed
        shape arrays..

2006-02-09  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/26038
        * gfortran.dg/allocate_char_star_scalar_1.f90: New test.

        PR fortran/25059
        * gfortran.dg/impure_assignment_1.f90: New test.

        PR fortran/25070
        * gfortran.dg/assumed_shape_ranks_1.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f90
    trunk/gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90
    trunk/gcc/testsuite/gfortran.dg/impure_assignment_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25070


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

* [Bug fortran/25070] rank mismatch in subroutine call
  2005-11-26 17:54 [Bug fortran/25070] New: better diagnostic needed jv244 at cam dot ac dot uk
  2005-11-26 19:47 ` [Bug fortran/25070] rank mismatch in subroutine call fxcoudert at gcc dot gnu dot org
  2006-02-09 23:23 ` pault at gcc dot gnu dot org
@ 2006-02-13 19:32 ` pault at gcc dot gnu dot org
  2006-02-13 19:37 ` pault at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-02-13 19:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2006-02-13 19:32 -------
Subject: Bug 25070

Author: pault
Date: Mon Feb 13 19:32:02 2006
New Revision: 110921

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110921
Log:
2006-02-13  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/26038
        * trans-stmt.c (gfc_trans_allocate): Provide assumed character length
        scalar with missing backend_decl for the hidden dummy charlen.

        PR fortran/25059
        * interface.c (gfc_extend_assign): Remove detection of non-PURE
        subroutine in assignment interface, with gfc_error, and put it in
        * resolve.c (resolve_code).

        PR fortran/25070
        * interface.c (gfc_procedure_use): Flag rank checking for non-
        elemental, contained or interface procedures in call to
        (compare_actual_formal), where ranks are checked for assumed
        shape arrays..

2006-02-13  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/26038
        * gfortran.dg/allocate_char_star_scalar_1.f90: New test.

        PR fortran/25059
        * gfortran.dg/impure_assignment_1.f90: New test.

        PR fortran/25070
        * gfortran.dg/assumed_shape_ranks_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/impure_assignment_1.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/interface.c
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/fortran/trans-stmt.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25070


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

* [Bug fortran/25070] rank mismatch in subroutine call
  2005-11-26 17:54 [Bug fortran/25070] New: better diagnostic needed jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2006-02-13 19:32 ` pault at gcc dot gnu dot org
@ 2006-02-13 19:37 ` pault at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-02-13 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2006-02-13 19:37 -------
Fixed on trunk and 4.1.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25070


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

end of thread, other threads:[~2006-02-13 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-26 17:54 [Bug fortran/25070] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:47 ` [Bug fortran/25070] rank mismatch in subroutine call fxcoudert at gcc dot gnu dot org
2006-02-09 23:23 ` pault at gcc dot gnu dot org
2006-02-13 19:32 ` pault at gcc dot gnu dot org
2006-02-13 19:37 ` 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).