public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25102]  New: better diagnostic needed
@ 2005-11-26 18:08 jv244 at cam dot ac dot uk
  2005-11-27  3:55 ` [Bug fortran/25102] " kargl at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jv244 at cam dot ac dot uk @ 2005-11-26 18:08 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:

MODULE TT
 TYPE data_type
   INTEGER :: I
 END TYPE data_type
 INTERFACE ASSIGNMENT (=)
   MODULE PROCEDURE set
 END INTERFACE
CONTAINS
  PURE SUBROUTINE set(x1,*)
    TYPE(data_type), INTENT(OUT) :: x1
    x1%i=0
  END SUBROUTINE set
END MODULE
USE TT
TYPE(data_type) D(10)
D(1)=data_type(0)
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=25102


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

* [Bug fortran/25102] better diagnostic needed
  2005-11-26 18:08 [Bug fortran/25102] New: better diagnostic needed jv244 at cam dot ac dot uk
@ 2005-11-27  3:55 ` kargl at gcc dot gnu dot org
  2005-12-30  6:57 ` [Bug fortran/25102] ICE on invalid code pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-11-27  3:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2005-11-27 03:55 -------
What's broken here?  Where are the details?


-- 


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


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

* [Bug fortran/25102] ICE on invalid code
  2005-11-26 18:08 [Bug fortran/25102] New: better diagnostic needed jv244 at cam dot ac dot uk
  2005-11-27  3:55 ` [Bug fortran/25102] " kargl at gcc dot gnu dot org
@ 2005-12-30  6:57 ` pinskia at gcc dot gnu dot org
  2006-01-14  9:44 ` [Bug fortran/25102] Procedure for interface assignment must have two dummy arguments pault at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-30  6:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-30 06:57 -------
Confirmed, this is an ICE.  Backtrace:
#0  check_operator_interface (intr=0x41d017f0, operator=INTRINSIC_ASSIGN) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/interface.c:508
#1  0x0001b684 in check_operator_interface (intr=0x41d017f0,
operator=INTRINSIC_ASSIGN) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/interface.c:482
#2  0x0001c164 in gfc_check_interfaces (ns=0x43006200) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/interface.c:1047
#3  0x00049b5c in gfc_resolve (ns=0x0) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/resolve.c:5525
#4  0x0003f250 in gfc_parse_file () at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/parse.c:2661
#5  0x00057dc0 in gfc_be_parse_file (set_yydebug=1104156656) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/f95-lang.c:287


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-30 06:57:32
               date|                            |
            Summary|better diagnostic needed    |ICE on invalid code


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


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

* [Bug fortran/25102] Procedure for interface assignment must have two dummy arguments
  2005-11-26 18:08 [Bug fortran/25102] New: better diagnostic needed jv244 at cam dot ac dot uk
  2005-11-27  3:55 ` [Bug fortran/25102] " kargl at gcc dot gnu dot org
  2005-12-30  6:57 ` [Bug fortran/25102] ICE on invalid code pinskia at gcc dot gnu dot org
@ 2006-01-14  9:44 ` pault at gcc dot gnu dot org
  2006-08-20 20:20 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-01-14  9:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2006-01-14 09:44 -------
To quote Lahey on this one:

Compiling program unit TT at line 1:
  1267-S: "SOURCE.F90", line 6: If ASSIGNMENT is specified in the INTERFACE
statement, 'set' must have exactly 2 dummy arguments.

Strangely, ifort does not complain and even produces an executable!


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu dot org
            Summary|ICE on invalid code         |Procedure for interface
                   |                            |assignment must have two
                   |                            |dummy arguments


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


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

* [Bug fortran/25102] Procedure for interface assignment must have two dummy arguments
  2005-11-26 18:08 [Bug fortran/25102] New: better diagnostic needed jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2006-01-14  9:44 ` [Bug fortran/25102] Procedure for interface assignment must have two dummy arguments pault at gcc dot gnu dot org
@ 2006-08-20 20:20 ` patchapp at dberlin dot org
  2006-08-30  5:19 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: patchapp at dberlin dot org @ 2006-08-20 20:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from patchapp at dberlin dot org  2006-08-20 20:20 -------
Subject: Bug number PR25102

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00729.html


-- 


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


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

* [Bug fortran/25102] Procedure for interface assignment must have two dummy arguments
  2005-11-26 18:08 [Bug fortran/25102] New: better diagnostic needed jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2006-08-20 20:20 ` patchapp at dberlin dot org
@ 2006-08-30  5:19 ` pault at gcc dot gnu dot org
  2006-08-30  5:20 ` pault at gcc dot gnu dot org
  2006-08-30  5:32 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-30  5:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2006-08-30 05:19 -------
Subject: Bug 25102

Author: pault
Date: Wed Aug 30 05:18:36 2006
New Revision: 116578

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

        PR fortran/28885
        REGRESSION FIX
        * trans-expr.c (gfc_conv_aliased_arg): Ensure that the temp
        declaration is retained for INTENT(OUT) arguments.

        PR fortran/28873
        REGRESSION FIX
        PR fortran/20067
        * resolve.c (resolve_generic_f): Make error message more
        comprehensible.
        (resolve_generic_s): Restructure search for specific procedures
        to be similar to resolve_generic_f and change to similar error
        message.  Ensure that symbol reference is refreshed, in case
        the search produces a NULL.
        (resolve_specific_s): Restructure search, as above and as
        resolve_specific_f. Ensure that symbol reference is refreshed,
        in case the search produces a NULL.

        PR fortran/25077
        PR fortran/25102
        * interface.c (check_operator_interface): Throw error if the
        interface assignment tries to change intrinsic type assigments
        or has less than two arguments.  Also, it is an error if an
        interface operator contains an alternate return.

        PR fortran/24866
        * parse.c (gfc_fixup_sibling_symbols): Do not modify the symbol
        if it is a dummy in the contained namespace.


2006-08-30  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/28885
        * gfortran.dg/aliasing_dummy_2.f90: New test.

        PR fortran/20067
        * gfortran.dg/generic_5.f90: Change error message.

        PR fortran/28873
        * gfortran.dg/generic_6.f90: New test.

        PR fortran/25077
        * gfortran.dg/redefined_intrinsic_assignment.f90: New test.

        PR fortran/25102
        * gfortran.dg/invalid_interface_assignment.f90: New test.

        PR fortran/24866
        * gfortran.dg/module_proc_external_dummy.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/aliasing_dummy_2.f90
    trunk/gcc/testsuite/gfortran.dg/generic_6.f90
    trunk/gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90
    trunk/gcc/testsuite/gfortran.dg/module_proc_external_dummy.f90
    trunk/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/generic_5.f90


-- 


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


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

* [Bug fortran/25102] Procedure for interface assignment must have two dummy arguments
  2005-11-26 18:08 [Bug fortran/25102] New: better diagnostic needed jv244 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2006-08-30  5:19 ` pault at gcc dot gnu dot org
@ 2006-08-30  5:20 ` pault at gcc dot gnu dot org
  2006-08-30  5:32 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-30  5:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2006-08-30 05:19 -------
Subject: Bug 25102

Author: pault
Date: Wed Aug 30 05:19:34 2006
New Revision: 116579

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

        PR fortran/28885
        REGRESSION FIX
        * trans-expr.c (gfc_conv_aliased_arg): Ensure that the temp
        declaration is retained for INTENT(OUT) arguments.

        PR fortran/28873
        REGRESSION FIX
        PR fortran/20067
        * resolve.c (resolve_generic_f): Make error message more
        comprehensible.
        (resolve_generic_s): Restructure search for specific procedures
        to be similar to resolve_generic_f and change to similar error
        message.  Ensure that symbol reference is refreshed, in case
        the search produces a NULL.
        (resolve_specific_s): Restructure search, as above and as
        resolve_specific_f. Ensure that symbol reference is refreshed,
        in case the search produces a NULL.

        PR fortran/25077
        PR fortran/25102
        * interface.c (check_operator_interface): Throw error if the
        interface assignment tries to change intrinsic type assigments
        or has less than two arguments.  Also, it is an error if an
        interface operator contains an alternate return.

        PR fortran/24866
        * parse.c (gfc_fixup_sibling_symbols): Do not modify the symbol
        if it is a dummy in the contained namespace.


2006-08-30  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/28885
        * gfortran.dg/aliasing_dummy_2.f90: New test.

        PR fortran/20067
        * gfortran.dg/generic_5.f90: Change error message.

        PR fortran/28873
        * gfortran.dg/generic_6.f90: New test.

        PR fortran/25077
        * gfortran.dg/redefined_intrinsic_assignment.f90: New test.

        PR fortran/25102
        * gfortran.dg/invalid_interface_assignment.f90: New test.

        PR fortran/24866
        * gfortran.dg/module_proc_external_dummy.f90: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/aliasing_dummy_2.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/generic_6.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/module_proc_external_dummy.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment.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/parse.c
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/generic_5.f90


-- 


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


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

* [Bug fortran/25102] Procedure for interface assignment must have two dummy arguments
  2005-11-26 18:08 [Bug fortran/25102] New: better diagnostic needed jv244 at cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2006-08-30  5:20 ` pault at gcc dot gnu dot org
@ 2006-08-30  5:32 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-30  5:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2006-08-30 05:32 -------
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=25102


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

end of thread, other threads:[~2006-08-30  5:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-26 18:08 [Bug fortran/25102] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-27  3:55 ` [Bug fortran/25102] " kargl at gcc dot gnu dot org
2005-12-30  6:57 ` [Bug fortran/25102] ICE on invalid code pinskia at gcc dot gnu dot org
2006-01-14  9:44 ` [Bug fortran/25102] Procedure for interface assignment must have two dummy arguments pault at gcc dot gnu dot org
2006-08-20 20:20 ` patchapp at dberlin dot org
2006-08-30  5:19 ` pault at gcc dot gnu dot org
2006-08-30  5:20 ` pault at gcc dot gnu dot org
2006-08-30  5:32 ` 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).