Commit 06919226 by Tobias Burnus

re PR fortran/38095 (character ICE)

2008-11-16  Tobias Burnus  <burnus@net-b.de>

        PR fortran/38095
        * trans-expr.c (gfc_map_intrinsic_function): Fix pointer access.

2008-11-16  Tobias Burnus  <burnus@net-b.de>

        PR fortran/38095
        * gfortran.dg/char_length_13.f90: New test.

From-SVN: r141917
parent 7cf98868
2008-11-16 Tobias Burnus <burnus@net-b.de>
PR fortran/38095
* trans-expr.c (gfc_map_intrinsic_function): Fix pointer access.
2008-11-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/38119
......@@ -14,8 +19,8 @@
2008-11-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37926
* trans-expr.c (gfc_add_interface_mapping): Transfer the formal
PR fortran/37926
* trans-expr.c (gfc_add_interface_mapping): Transfer the formal
arglist and the always_explicit attribute if the dummy arg is a
procedure.
......
......@@ -1922,8 +1922,9 @@ gfc_map_intrinsic_function (gfc_expr *expr, gfc_interface_mapping *mapping)
case GFC_ISYM_LEN:
/* TODO figure out why this condition is necessary. */
if (sym->attr.function
&& arg1->ts.cl->length->expr_type != EXPR_CONSTANT
&& arg1->ts.cl->length->expr_type != EXPR_VARIABLE)
&& (arg1->ts.cl->length == NULL
|| (arg1->ts.cl->length->expr_type != EXPR_CONSTANT
&& arg1->ts.cl->length->expr_type != EXPR_VARIABLE)))
return false;
new_expr = gfc_copy_expr (arg1->ts.cl->length);
......
2008-11-16 Tobias Burnus <burnus@net-b.de>
PR fortran/38095
* gfortran.dg/char_length_13.f90: New test.
2008-11-16 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/pr36246.c: Add -fomit-frame-pointer to dg-options.
......
! { dg-do compile }
!
! PR fortran/38095
!
! Contributed by Vivek Rao
!
! Compiling the program below gave an ICE
!
module bar
implicit none
contains
elemental function trim_append(xx,yy) result(xy)
character (len=*), intent(in) :: xx,yy
character (len=len(xx) + len(yy)) :: xy
xy = trim(xx) // yy
end function trim_append
function same(xx) result(yy)
character (len=*), intent(in) :: xx(:)
character (len=len(xx)) :: yy(size(xx))
yy = [xx]
end function same
subroutine foo(labels)
character (len=*), intent(in) :: labels(:)
print*,"size(labels)=",size(labels)
end subroutine foo
subroutine xmain()
call foo(trim_append(["a"],same(["b"])))
end subroutine xmain
end module bar
program main
use bar
call xmain()
end program main
! { dg-final { cleanup-modules "bar" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment