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/52332] Internal compiler error in in gfc_get_symbol_decl


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-21 23:07:43 UTC ---
Fails for:

pure function get_expected( ast ) result(res)
  class(t_xfunit_assertion_array_character), intent(in) :: ast
  character, dimension(size(ast%rast)) :: res
  integer :: i
  res = (/ (character(ast%rast(i)%get_expected()), i=1, size(ast%rast)) /)
end function get_expected


Hereby, character is a generic name for the specific function (in
m_string.F90):

elemental function string_to_char( s ) result(res)
  type(t_string),    intent(in) :: s
#if defined(__G95__) || defined(__GFORTRAN__)
  character(len=size(s%string)) :: res
#endif


The failue is for "s" at the assert:

      /* Dummy variables should already have been created.  */
      gcc_assert (sym->backend_decl);

#0  gfc_get_symbol_decl (sym=0x177cfe0) at
/home/tob/projects/gcc-trunk-checkout/gcc/fortran/trans-decl.c:1234
#1  0x00000000005db598 in gfc_conv_variable (se=0x7fffffffc850, expr=0x1768930)
    at trans-expr.c:1196
#2  0x00000000005dbd19 in gfc_conv_expr_lhs (se=0x7fffffffc850, expr=0x1768930)
    at trans-expr.c:5542

If one looks at the expr, one sees that there is a REF_COMPONENT followed by a
REF_ARRAY.

(gdb) p ((gfc_expr *)0x1768930)->ref->u.c->sym->name
$2 = 0x2aaaaccdbf30 "t_string"
(gdb) p ((gfc_expr *)0x1768930)->ref->u.c->component->name
$5 = 0x2aaaacd10048 "string"


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