public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/28735]  New: Crash in resolve.c - related to contents of .mod
@ 2006-08-15 18:33 adsspamtrap01 at yahoo dot com
  2006-08-15 18:35 ` [Bug fortran/28735] " adsspamtrap01 at yahoo dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: adsspamtrap01 at yahoo dot com @ 2006-08-15 18:33 UTC (permalink / raw)
  To: gcc-bugs

Encountering segfault when compiling a very simple .F and 
"use" -ing a certain .mod file.  

Encountered crash on gfortran 4.1.0 and 4.1.1.  Patch below 
is against 4.1.1.

I've pared down the .mod file from it's original size; I've 
removed as much as I can such that the crash occurs.  Note 
that the crash doesn't happen if "('imaxf' 0 50 )" is removed 
from the module.  

Crash occurs because e->symtree is NULL in 
resolve_ref()/find_array_spec().  

Patch to fix crash (needs review; I don't know gcc/gfortran):

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

--- resolve.c.orig      2006-08-15 12:48:43.000000000 -0500
+++ resolve.c   2006-08-15 12:48:57.000000000 -0500
@@ -2555,6 +2555,10 @@
 {
   gfc_symbol *sym;

+  /* added extra check before resolve_ref() -ADS */
+  if (e->symtree == NULL)
+    return FAILURE;
+
   if (e->ref && resolve_ref (e) == FAILURE)
     return FAILURE;

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Fortran source to compile, to generate crash:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
      subroutine sub( myint )

      use domdec
      use bdy_comm


      return
      end
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Compile with:

gfortran -c -o sub.o sub.F


Module file used to generate crash (has been simplified from 
original version):

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
GFORTRAN module created from domdec.F on Fri Jul 28 14:56:20 2006
If you edit this, you'll get what you deserve.

(() () () () () () () () () () () () () () () () () () () () ())

()

()

(('mpipriv1' 2 1) ('mpiprivc' 3 1) ('mpipriv2' 4 1))

()

(106 'mpi_argv_null' 'domdec' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
UNKNOWN DIMENSION IN_COMMON) (CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1')))
0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4
()) 0 '1')) 0 () ())
3 'mpi_argvs_null' 'domdec' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
UNKNOWN DIMENSION IN_COMMON) (CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1')))
0 106 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER
4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0
'1')) 0 () ())
2 'mpi_bottom' 'domdec' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
IN_COMMON) (INTEGER 4 ()) 0 107 () () 0 () ())
50 'imaxf' 'domdec' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
ALLOCATABLE DIMENSION) (INTEGER 4 ()) 0 0 () (1 DEFERRED () ()) 0 () ())
212 'mpi_errcodes_ignore' 'domdec' 1 ((VARIABLE UNKNOWN-INTENT
UNKNOWN-PROC UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1
EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '1'))
0 () ())
107 'mpi_in_place' 'domdec' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 226 () () 0 () ())
4 'mpi_statuses_ignore' 'domdec' 1 ((VARIABLE UNKNOWN-INTENT
UNKNOWN-PROC UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 212 () (2
EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '5')
(CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '1')) 0 () ())
226 'mpi_status_ignore' 'domdec' 1 ((VARIABLE UNKNOWN-INTENT
UNKNOWN-PROC UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1
EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '5'))
0 () ())
)

('imaxf' 0 50 )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


-- 
           Summary: Crash in resolve.c - related to contents of .mod
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: adsspamtrap01 at yahoo dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
@ 2006-08-15 18:35 ` adsspamtrap01 at yahoo dot com
  2006-08-15 18:50 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: adsspamtrap01 at yahoo dot com @ 2006-08-15 18:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from adsspamtrap01 at yahoo dot com  2006-08-15 18:35 -------
Err, nix the "use bdy_comm" line.  Sample fortran code 
should read:

      subroutine sub( myint )

      use domdec

      return
      end



-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
  2006-08-15 18:35 ` [Bug fortran/28735] " adsspamtrap01 at yahoo dot com
@ 2006-08-15 18:50 ` pinskia at gcc dot gnu dot org
  2006-08-15 21:52 ` adsspamtrap01 at yahoo dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-15 18:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-08-15 18:50 -------
Can you provide the source that generated the module?


-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
  2006-08-15 18:35 ` [Bug fortran/28735] " adsspamtrap01 at yahoo dot com
  2006-08-15 18:50 ` pinskia at gcc dot gnu dot org
@ 2006-08-15 21:52 ` adsspamtrap01 at yahoo dot com
  2006-08-15 22:24 ` adsspamtrap01 at yahoo dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: adsspamtrap01 at yahoo dot com @ 2006-08-15 21:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from adsspamtrap01 at yahoo dot com  2006-08-15 21:52 -------
(In reply to comment #2)
> Can you provide the source that generated the module?
> 

Sorry, no.  It is from the COAMPS project 
(http://www.nrlmry.navy.mil/coamps-web/web/home).  
Source for the project is available to anyone, but you 
have to sign (!) a EULA to get the code; part of the 
EULA states that you can't redistribute the code.  


-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (2 preceding siblings ...)
  2006-08-15 21:52 ` adsspamtrap01 at yahoo dot com
@ 2006-08-15 22:24 ` adsspamtrap01 at yahoo dot com
  2006-08-15 23:01 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: adsspamtrap01 at yahoo dot com @ 2006-08-15 22:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from adsspamtrap01 at yahoo dot com  2006-08-15 22:24 -------
(In reply to comment #2)
> Can you provide the source that generated the module?
> 

(In reply to comment #2)
> Can you provide the source that generated the module?
> 

OK, I've put together some sample .F files that demonstrate the 
crash without compromising the COAMPS IP.  Compile dummydomdec 
and dummybdy_comm, then try to compile sub and you'll get the 
crash.

-- dummydomdec.F -----------------------------------------------
      module dummydomdec
      implicit none
      public
      integer, allocatable :: iminf(:), imaxf(:), jminf(:), jmaxf(:)
      end module dummydomdec

-- dummybdy_comm.F ---------------------------------------------
      module dummybdy_comm
      use dummydomdec
      implicit none
      private
      public :: commptoc

      contains

      subroutine commptoc(puv, numz, nn, np, nbdypt, dti, 
     &                    parray1, carray1, parray3, carray3, 
     &                    ldavies, lnestf,iref,jref,lmpi2)
      character (len=*),         intent(in)    :: puv
      integer,                   intent(in)    :: numz, nn, np, nbdypt
      integer,                   intent(in)    :: iref,jref
      logical,                   intent(in)    :: ldavies, lnestf
      logical,                   intent(in)    :: lmpi2
      real,                      intent(in)    :: dti
      real,    dimension(iminf(np):imaxf(np),jminf(np):jmaxf(np),numz)
     &                                         :: parray1, parray3
      real,    dimension(iminf(nn):imaxf(nn),jminf(nn):jmaxf(nn),numz)
     &                        , intent(inout)  :: carray1, carray3
      end subroutine commptoc
      end module dummybdy_comm

-- sub.F -------------------------------------------------------
      subroutine sub( myint )

      use dummydomdec
      use dummybdy_comm

      return
      end



-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (3 preceding siblings ...)
  2006-08-15 22:24 ` adsspamtrap01 at yahoo dot com
@ 2006-08-15 23:01 ` pinskia at gcc dot gnu dot org
  2006-08-16 22:00 ` pault at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-15 23:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-08-15 23:01 -------
Confirmed on 20060621's mainline.
Backtrace:
#0  0x0808cbfa in resolve_ref (expr=0x872a438)
    at /home/apinski/src/gcc-fsf/local/trunk/gcc/fortran/resolve.c:2409
#1  0x0808d63c in gfc_resolve_expr (e=0x872a438)
    at /home/apinski/src/gcc-fsf/local/trunk/gcc/fortran/resolve.c:2786
#2  0x08051095 in resolve_array_bound (e=0x872a438, check_constant=0)
    at /home/apinski/src/gcc-fsf/local/trunk/gcc/fortran/array.c:218
#3  0x08051144 in gfc_resolve_array_spec (as=0x872a3f0, check_constant=0)
    at /home/apinski/src/gcc-fsf/local/trunk/gcc/fortran/array.c:248
#4  0x0808bad2 in resolve_formal_arglist (proc=0x8727a58)
    at /home/apinski/src/gcc-fsf/local/trunk/gcc/fortran/resolve.c:153
#5  0x0809b8f3 in traverse_ns (st=0x8727ad8, func=0x808be20 <find_arglists>)
    at /home/apinski/src/gcc-fsf/local/trunk/gcc/fortran/symbol.c:2592
#6  0x0809b8de in traverse_ns (st=0x8726940, func=0x808be20 <find_arglists>)
    at /home/apinski/src/gcc-fsf/local/trunk/gcc/fortran/symbol.c:2595
#7  0x0808f6b1 in resolve_types (ns=0x8725db0)
    at /home/apinski/src/gcc-fsf/local/trunk/gcc/fortran/resolve.c:269


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-08-15 23:01:22
               date|                            |


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (4 preceding siblings ...)
  2006-08-15 23:01 ` pinskia at gcc dot gnu dot org
@ 2006-08-16 22:00 ` pault at gcc dot gnu dot org
  2006-08-17 14:57 ` pault at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-16 22:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2006-08-16 22:00 -------
Andrews,

The proposed fix is a good start but I am going to go at this one carefully -
the ICE goes away if the PRIVATE in dummybdy_com is removed; I want to find out
why this is first.

Paul


-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (5 preceding siblings ...)
  2006-08-16 22:00 ` pault at gcc dot gnu dot org
@ 2006-08-17 14:57 ` pault at gcc dot gnu dot org
  2006-08-17 15:03 ` pault at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-17 14:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2006-08-17 14:57 -------
(In reply to comment #6)
OK I understand it now.  The PRIVATE declaration prevents references to 'a' and
'b' from being resolved, when USEing dummybdy_comm, because it suppresses the
symtree.  This is demonstrated by making 'a' and 'b' public in module
dummybdy_comm, or by inverting the order of the USE statements in 'sub' (yes,
they get USEd in inverted order!).

Your proposed patch is OK but the subsequent check on e->symtree is now
redundant and should be removed. I am just now regtesting the result and will
submit mit it and the testcase below tonight.

Thanks for the report.

Paul

! { dg-do compile }
! This tests the fix for PR28735 in which an ICE would be triggered in
resolve_ref
! because the references to 'a' and 'b' in the dummy arguments of mysub have
! no symtrees in module bar, being private there.
!
! Contributed by  Andrew Sampson  <adsspamtrap01@yahoo.com>
!
!-- foo.F -----------------------------------------------
module foo
  implicit none
  public
  integer, allocatable :: a(:), b(:)
end module foo

!-- bar.F ---------------------------------------------
module bar
  use foo
  implicit none
  private                !  This triggered the ICE
  public :: mysub        !  since a and b are not public

contains

  subroutine mysub(n, parray1)
    integer, intent(in) :: n
    real, dimension(a(n):b(n)) :: parray1
    if ((n == 1) .and. size(parray1, 1) /= 10) call abort ()
    if ((n == 2) .and. size(parray1, 1) /= 42) call abort ()
  end subroutine mysub
end module bar

!-- sub.F -------------------------------------------------------
subroutine sub()

  use foo
  use bar
  real :: z(100)
  allocate (a(2), b(2))
  a = (/1, 6/)
  b = (/10, 47/)
  call mysub (1, z)
  call mysub (2, z)

  return
end

!-- MAIN ------------------------------------------------------
  use bar
  call sub ()
end


-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (6 preceding siblings ...)
  2006-08-17 14:57 ` pault at gcc dot gnu dot org
@ 2006-08-17 15:03 ` pault at gcc dot gnu dot org
  2006-08-18  5:30 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-17 15:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pault at gcc dot gnu dot org  2006-08-17 15:03 -------
Sorry, meant to accept this on the last reply.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-08-15 23:01:22         |2006-08-17 15:03:25
               date|                            |


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (7 preceding siblings ...)
  2006-08-17 15:03 ` pault at gcc dot gnu dot org
@ 2006-08-18  5:30 ` patchapp at dberlin dot org
  2006-08-20  5:47 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: patchapp at dberlin dot org @ 2006-08-18  5:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from patchapp at dberlin dot org  2006-08-18 05:30 -------
Subject: Bug number PR28735

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/msg00635.html


-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (8 preceding siblings ...)
  2006-08-18  5:30 ` patchapp at dberlin dot org
@ 2006-08-20  5:47 ` pault at gcc dot gnu dot org
  2006-08-20  8:21 ` pault at gcc dot gnu dot org
  2006-08-20 17:45 ` pault at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-20  5:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pault at gcc dot gnu dot org  2006-08-20 05:46 -------
Subject: Bug 28735

Author: pault
Date: Sun Aug 20 05:45:43 2006
New Revision: 116268

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

        PR fortran/28601
        PR fortran/28630
        * gfortran.h : Eliminate gfc_dt_list structure and reference
        to it in gfc_namespace.
        * resolve.c (resolve_fl_derived): Remove the building of the
        list of derived types for the current namespace.
        * symbol.c (find_renamed_type): New function to find renamed
        derived types by symbol name rather than symtree name.
        (gfc_use_derived): Search parent namespace for identical
        derived type and use it, even if local version is complete,
        except in interface bodies. Ensure that renamed derived types
        are found by call to find_renamed_type. Recurse for derived
        type components.
        (gfc_free_dt_list): Remove.
        (gfc_free_namespace): Remove call to previous.
        * trans-types.c (copy_dt_decls_ifequal): Remove.
        (gfc_get_derived_type): Remove all the paraphenalia for
        association of derived types, including calls to previous.
        * match.c (gfc_match_allocate): Call gfc_use_derived to
        associate any derived types that are being allocated.

        PR fortran/20886
        * resolve.c (resolve_actual_arglist): The passing of
        a generic procedure name as an actual argument is an
        error.

        PR fortran/28735
        * resolve.c (resolve_variable): Check for a symtree before
        resolving references.

        PR fortran/28762
        * primary.c (match_variable): Return MATCH_NO if the symbol
        is that of the program.

        PR fortran/28425
        * trans-expr.c (gfc_trans_subcomponent_assign): Translate
        derived type component expressions other than another derived
        type constructor.

        PR fortran/28496
        * expr.c (find_array_section): Correct errors in
        the handling of a missing start value for the
        index triplet in an array reference.

        PR fortran/18111
        * trans-decl.c (gfc_build_dummy_array_decl): Before resetting
        reference to backend_decl, set it DECL_ARTIFICIAL.
        (gfc_get_symbol_decl): Likewise for original dummy decl, when
        a copy is made of an array.
        (create_function_arglist): Likewise for the _entry paramter
        in entry_masters.
        (build_entry_thunks): Likewise for dummies in entry thunks.

        PR fortran/28600
        * trans-decl.c (gfc_get_symbol_decl): Ensure that the
        DECL_CONTEXT of the length of a character dummy is the
        same as that of the symbol declaration.

        PR fortran/28771
        * decl.c (add_init_expr_to_sym): Remove setting of charlen for
        an initializer of an assumed charlen variable.

        PR fortran/28660
        * trans-decl.c (generate_expr_decls): New function.
        (generate_dependency_declarations): New function.
        (generate_local_decl): Call previous if not either a dummy or
        a declaration in an entry master.

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

        PR fortran/28630
        * gfortran.dg/used_types_2.f90: New test.

        PR fortran/28601
        * gfortran.dg/used_types_3.f90: New test.

        PR fortran/20886
        * gfortran.dg/generic_actual_arg.f90: New test.

        PR fortran/28735
        * gfortran.dg/module_private_array_refs_1.f90: New test.

        PR fortran/28762
        * gfortran.dg/program_name_1.f90: New test.

        PR fortran/28425
        * gfortran.dg/derived_constructor_comps_1.f90: New test.

        PR fortran/28496
        * gfortran.dg/array_initializer_2.f90: New test.

        PR fortran/18111
        * gfortran.dg/unused_artificial_dummies_1.f90: New test. 

        PR fortran/28600
        * gfortran.dg/assumed_charlen_function_4.f90: New test.

        PR fortran/28771
        * gfortran.dg/assumed_charlen_in_main.f90: New test.

        PR fortran/28660
        * gfortran.dg/dependent_decls_1.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/array_initializer_2.f90
    trunk/gcc/testsuite/gfortran.dg/assumed_charlen_function_4.f90
    trunk/gcc/testsuite/gfortran.dg/assumed_charlen_in_main.f90
    trunk/gcc/testsuite/gfortran.dg/dependent_decls_1.f90
    trunk/gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f90
    trunk/gcc/testsuite/gfortran.dg/generic_actual_arg.f90
    trunk/gcc/testsuite/gfortran.dg/module_private_array_refs_1.f90
    trunk/gcc/testsuite/gfortran.dg/program_name_1.f90
    trunk/gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f90
    trunk/gcc/testsuite/gfortran.dg/used_types_2.f90
    trunk/gcc/testsuite/gfortran.dg/used_types_3.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (9 preceding siblings ...)
  2006-08-20  5:47 ` pault at gcc dot gnu dot org
@ 2006-08-20  8:21 ` pault at gcc dot gnu dot org
  2006-08-20 17:45 ` pault at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-20  8:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pault at gcc dot gnu dot org  2006-08-20 08:21 -------
Subject: Bug 28735

Author: pault
Date: Sun Aug 20 08:20:26 2006
New Revision: 116269

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

        PR fortran/28601
        PR fortran/28630
        * gfortran.h : Eliminate gfc_dt_list structure and reference
        to it in gfc_namespace.
        * resolve.c (resolve_fl_derived): Remove the building of the
        list of derived types for the current namespace.
        * symbol.c (find_renamed_type): New function to find renamed
        derived types by symbol name rather than symtree name.
        (gfc_use_derived): Search parent namespace for identical
        derived type and use it, even if local version is complete,
        except in interface bodies. Ensure that renamed derived types
        are found by call to find_renamed_type. Recurse for derived
        type components.
        (gfc_free_dt_list): Remove.
        (gfc_free_namespace): Remove call to previous.
        * trans-types.c (copy_dt_decls_ifequal): Remove.
        (gfc_get_derived_type): Remove all the paraphenalia for
        association of derived types, including calls to previous.
        * match.c (gfc_match_allocate): Call gfc_use_derived to
        associate any derived types that are being allocated.

        PR fortran/20886
        * resolve.c (resolve_actual_arglist): The passing of
        a generic procedure name as an actual argument is an
        error.

        PR fortran/28735
        * resolve.c (resolve_variable): Check for a symtree before
        resolving references.

        PR fortran/28762
        * primary.c (match_variable): Return MATCH_NO if the symbol
        is that of the program.

        PR fortran/28425
        * trans-expr.c (gfc_trans_subcomponent_assign): Translate
        derived type component expressions other than another derived
        type constructor.

        PR fortran/28496
        * expr.c (find_array_section): Correct errors in
        the handling of a missing start value for the
        index triplet in an array reference.

        PR fortran/18111
        * trans-decl.c (gfc_build_dummy_array_decl): Before resetting
        reference to backend_decl, set it DECL_ARTIFICIAL.
        (gfc_get_symbol_decl): Likewise for original dummy decl, when
        a copy is made of an array.
        (create_function_arglist): Likewise for the _entry paramter
        in entry_masters.
        (build_entry_thunks): Likewise for dummies in entry thunks.

        PR fortran/28771
        * decl.c (add_init_expr_to_sym): Remove setting of charlen for
        an initializer of an assumed charlen variable.

        PR fortran/28660
        * trans-decl.c (generate_expr_decls): New function.
        (generate_dependency_declarations): New function.
        (generate_local_decl): Call previous if not either a dummy or
        a declaration in an entry master.

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

        PR fortran/28630
        * gfortran.dg/used_types_2.f90: New test.

        PR fortran/28601
        * gfortran.dg/used_types_3.f90: New test.

        PR fortran/20886
        * gfortran.dg/generic_actual_arg.f90: New test.

        PR fortran/28735
        * gfortran.dg/module_private_array_refs_1.f90: New test.

        PR fortran/28762
        * gfortran.dg/program_name_1.f90: New test.

        PR fortran/28425
        * gfortran.dg/derived_constructor_comps_1.f90: New test.

        PR fortran/28496
        * gfortran.dg/array_initializer_2.f90: New test.

        PR fortran/18111
        * gfortran.dg/unused_artificial_dummies_1.f90: New test. 

        PR fortran/28771
        * gfortran.dg/assumed_charlen_in_main.f90: New test.

        PR fortran/28660
        * gfortran.dg/dependent_decls_1.f90: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/array_initializer_2.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_in_main.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependent_decls_1.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/generic_actual_arg.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/module_private_array_refs_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/program_name_1.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_types_2.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_types_3.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/decl.c
    branches/gcc-4_1-branch/gcc/fortran/expr.c
    branches/gcc-4_1-branch/gcc/fortran/gfortran.h
    branches/gcc-4_1-branch/gcc/fortran/match.c
    branches/gcc-4_1-branch/gcc/fortran/primary.c
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/fortran/symbol.c
    branches/gcc-4_1-branch/gcc/fortran/trans-decl.c
    branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_1-branch/gcc/fortran/trans-types.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/28735] Crash in resolve.c - related to contents of .mod
  2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
                   ` (10 preceding siblings ...)
  2006-08-20  8:21 ` pault at gcc dot gnu dot org
@ 2006-08-20 17:45 ` pault at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-20 17:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pault at gcc dot gnu dot org  2006-08-20 17:45 -------
Fixed on trunk and 4.1

Paul


-- 

pault at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-08-20 17:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-15 18:33 [Bug fortran/28735] New: Crash in resolve.c - related to contents of .mod adsspamtrap01 at yahoo dot com
2006-08-15 18:35 ` [Bug fortran/28735] " adsspamtrap01 at yahoo dot com
2006-08-15 18:50 ` pinskia at gcc dot gnu dot org
2006-08-15 21:52 ` adsspamtrap01 at yahoo dot com
2006-08-15 22:24 ` adsspamtrap01 at yahoo dot com
2006-08-15 23:01 ` pinskia at gcc dot gnu dot org
2006-08-16 22:00 ` pault at gcc dot gnu dot org
2006-08-17 14:57 ` pault at gcc dot gnu dot org
2006-08-17 15:03 ` pault at gcc dot gnu dot org
2006-08-18  5:30 ` patchapp at dberlin dot org
2006-08-20  5:47 ` pault at gcc dot gnu dot org
2006-08-20  8:21 ` pault at gcc dot gnu dot org
2006-08-20 17:45 ` 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).