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]

Re: [patch, fortran] PR34495 - accepts invalid init-expr with TRANSFER


Daniel Franke wrote:
> On Tuesday 18 December 2007 11:39:14 Daniel Franke wrote:
>   
>> 2007-12-18  Daniel Franke  <franke.daniel@gmail.com>
>>
>> 	PR fortran/34495
>> 	* transfer_simplify_2.f90: Fixed invalid initialization expressions.
>> 	* transfer_simplify_7.f90: New test.
>>     
Nice patch, but it gives now an ICE for the following invalid program:

  implicit none
  dimension :: i1(5)
  integer :: i1 = transfer([1,2,3,4,5], i1)
  end

f951: internal compiler error: in check_init_expr, at fortran/expr.c:2241


That is:

check_init_expr (gfc_expr *e)
[...]
  switch (e->expr_type)
[...]
    case EXPR_VARIABLE:
[...]
      if (e->symtree->n.sym->as)
        {
          switch (e->symtree->n.sym->as->type)
            {
[...]
              default:
                gcc_unreachable();

Tobias


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