This is the mail archive of the gcc-bugs@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]

[Bug fortran/16937] Compiler segmentation fault - compound derived types are not acceptable function arguments


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-08-09 17:45 -------
Here's a reduced version:

============================
program FOO
  type :: T
    character :: C(1)
  end type T

  type (T) :: X

  call BAR( X%C(:1) )
end program FOO
============================

If I replace
  call BAR( X%C(:1) )
by
  X%C(:1)='X'
I get

f951: ../../gcc/gcc/fortran/trans-expr.c:1741: gfc_trans_scalar_assign:
Assertion `lse->string_length != (tree) ((void *)0) && rse->string_length !=
(tree) ((void *)0)' failed.
lall.f90: In function `MAIN__':
lall.f90:8: internal compiler error: Aborted
Please submit a full bug report, [etc.]

If I replace the character variable by an integer variable, the code compiles
fine. Therefore I think it's a problem with character arrays and thus a dupe
of PR 15196.


*** This bug has been marked as a duplicate of 15196 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


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


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