public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/48279] New: segfault in gfc_check_vardef_context
@ 2011-03-24 23:58 adrian at llnl dot gov
  2011-03-25  0:06 ` [Bug fortran/48279] " adrian at llnl dot gov
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: adrian at llnl dot gov @ 2011-03-24 23:58 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: segfault in gfc_check_vardef_context
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: adrian@llnl.gov


I have found gfortran 4.6-rc2 (and also svn r171355) to segfault in
gfc_check_vardef_context().
The code spans over 3 modules, but I used delta to come up with the following
minimal example: 

$ cat sidl_string_array.F03

module sidl_string_array
  type sidl_string_1d
  end type sidl_string_1d
  interface set
    module procedure &
      setg1_p
  end interface
contains
  subroutine setg1_p(array, index, val)
    type(sidl_string_1d), intent(inout) :: array
  end subroutine setg1_p
end module sidl_string_array

$ cat s_Hard.F03
module s_Hard
  use sidl_string_array
  type, bind(c) :: s_Hard_t
  end type s_Hard_t
  interface set_d_interface
  end interface 
  interface get_d_string
    module procedure get_d_string_p
  end interface 
  contains ! Derived type member access functions
    type(sidl_string_1d) function get_d_string_p(s)
      type(s_Hard_t), intent(in) :: s
    end function get_d_string_p
    subroutine set_d_objectArray_p(s, d_objectArray)
    end subroutine set_d_objectArray_p
end module s_Hard

$ cat main.F03 
  subroutine initHard(h, ex)
    use s_Hard
    type(s_Hard_t), intent(inout) :: h
    call set(get_d_string(h), 0, 'Three')
  end subroutine initHard

$ gfortran -c sidl_string_array.F03 -o sidl_string_array.o
$ gfortran -c s_Hard.F03 -o s_Hard.o
s_Hard.F03:3.27:

  type, bind(c) :: s_Hard_t
                           1
Warning: Derived type 's_hard_t' with BIND(C) attribute at (1) is empty, and
may be inaccessible by the C companion processor

$ gfortran main.F03
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

end of thread, other threads:[~2011-04-28 19:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-24 23:58 [Bug fortran/48279] New: segfault in gfc_check_vardef_context adrian at llnl dot gov
2011-03-25  0:06 ` [Bug fortran/48279] " adrian at llnl dot gov
2011-03-25  0:41 ` dominiq at lps dot ens.fr
2011-03-25  0:46 ` adrian at llnl dot gov
2011-03-25 19:52 ` adrian at llnl dot gov
2011-03-28  9:10 ` [Bug fortran/48279] [4.6/4.7 Regression] " burnus at gcc dot gnu.org
2011-03-28 12:34 ` jakub at gcc dot gnu.org
2011-03-28 13:52 ` burnus at gcc dot gnu.org
2011-03-28 20:40 ` janus at gcc dot gnu.org
2011-03-28 20:55 ` janus at gcc dot gnu.org
2011-03-29  7:18 ` burnus at gcc dot gnu.org
2011-04-26 13:37 ` burnus at gcc dot gnu.org
2011-04-26 17:07 ` burnus at gcc dot gnu.org
2011-04-26 17:55 ` jakub at gcc dot gnu.org
2011-04-26 18:47 ` burnus at gcc dot gnu.org
2011-04-28  5:50 ` burnus at gcc dot gnu.org
2011-04-28 18:50 ` burnus at gcc dot gnu.org
2011-04-28 19:06 ` burnus at gcc dot gnu.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).