This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25619] tempary array of character type goes wrong
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jan 2006 03:08:34 -0000
- Subject: [Bug fortran/25619] tempary array of character type goes wrong
- References: <bug-25619-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-01-02 03:08 -------
If we make a tempary variable to hold the array, it works:
subroutine option_stopwatch_s(default_clock)
character(len=2), intent(in) :: default_clock
character(len=2), dimension(1) :: a
a = (/default_clock/)
call option_stopwatch_a(a)
end subroutine option_stopwatch_s
--------------------------------
The problem is obvious in .t02.orginal:
(*(char[0:][1:1] *) atmp.3.data)[NON_LVALUE_EXPR <S.5>] =
*(*(char[0:][1:1] *) atmp.0.data)[NON_LVALUE_EXPR <S.5>];
That is an array copy which is just wrong as there is no such thing in Generic
or the gimplifier can handle.
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-01-02 03:08:33
date| |
Summary|ICE in gimplify_expr with |tempary array of character
|chacter type |type goes wrong
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619