[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug fortran/41044] internal compiler error: in gfc_conv_intrinsic_funct

From: burnus at gcc dot gnu dot org
Subject: [Bug fortran/41044] internal compiler error: in gfc_conv_intrinsic_function
Date: 12 Oct 2009 09:33:45 -0000

------- Comment #8 from burnus at gcc dot gnu dot org  2009-10-12 09:33 -------
> I have further reducd the test code to:
> idx=sum(maxloc(index(pfd%n,pfmt)))-1

Even shorter:
    idx = index(pfd%n,pfmt) - 1
(Or any other one/two operator expression except of function calls; idx needs
to be a rank-1 array.)

Another issue (or the same?) is that pfd%n is seen as EXPR_VARIABLE and not as
EXPR_CONSTANT. The following vaguely related gives a segfault:

type t
  integer :: i
end type t
type(t), parameter :: a(1) = t(4)
real(a(1)%i) :: b

==27247== Invalid read of size 8
==27247==    at 0x4C3CDD: simplify_const_ref (expr.c:1168)

simplify_const_ref (p=<value optimized out>) at
1559              remove_subobject_ref (p, cons);

Seemingly, the segfault is in remove_subobject_ref, called by
simplify_const_ref (and "cons" being not a valid pointer).
        case REF_COMPONENT:
          cons = find_component_ref (p->value.constructor, p->ref);
          remove_subobject_ref (p, cons);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]