This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch,gfortran] PR 24426: initialization of component pointers


:ADDPATCH fortran:

Here's a patch for PR 24426, a bug very similar to PR 15975/16606.  In code like

        type foo
            integer :: i = 0
            type (foo), pointer :: next
        end type foo

we try to assign a default initializer to foo%next, eventhough
it's a pointer.  This patch avoids assigning default initializers to
pointers.

Bubblestrapped and reg.tested on Linux/x86.
OK for mainline?  4.0?


        Erik


2005-10-21  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/24426
        * decl.c (variable_decl): Don't assign default initializers to
          pointers.



2005-10-21  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/24426
        * gfortran.dg/der_pointer_4.f90: New.

Attachment: 24426.diff
Description: Text document

Attachment: der_pointer_4.f90
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]