* [Patch, Fortran] PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789
@ 2009-10-23 14:52 Janus Weil
2009-10-23 15:09 ` Jerry DeLisle
0 siblings, 1 reply; 3+ messages in thread
From: Janus Weil @ 2009-10-23 14:52 UTC (permalink / raw)
To: gfortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
Hi all,
here is a one-line fix for another OOP problem, connected to
CLASS-valued functions.
Regtested on x86_64-unknown-linux-gnu. Ok for trunk?
Cheers,
Janus
2009-10-23 Janus Weil <janus@gcc.gnu.org>
PR fortran/41800
* trans-expr.c (gfc_trans_scalar_assign): Handle CLASS variables.
2009-10-23 Janus Weil <janus@gcc.gnu.org>
PR fortran/41800
* gfortran.dg/class_10.f03: New test.
[-- Attachment #2: pr41800.diff --]
[-- Type: text/x-diff, Size: 518 bytes --]
Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c (Revision 153496)
+++ gcc/fortran/trans-expr.c (Arbeitskopie)
@@ -4660,7 +4660,7 @@ gfc_trans_scalar_assign (gfc_se * lse, gfc_se * rs
gfc_add_expr_to_block (&block, tmp);
}
}
- else if (ts.type == BT_DERIVED)
+ else if (ts.type == BT_DERIVED || ts.type == BT_CLASS)
{
gfc_add_block_to_block (&block, &lse->pre);
gfc_add_block_to_block (&block, &rse->pre);
[-- Attachment #3: class_10.f03 --]
[-- Type: application/octet-stream, Size: 628 bytes --]
! { dg-do compile }
!
! PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789
!
! Contributed by Harald Anlauf <anlauf@gmx.de>
module abstract_gradient
implicit none
private
type, public, abstract :: gradient_class
contains
procedure, nopass :: inner_product
end type
contains
function inner_product ()
class(gradient_class), pointer :: inner_product
inner_product => NULL()
end function
end module
use abstract_gradient
class(gradient_class), pointer :: g_initial, ip_save
ip_save => g_initial%inner_product() ! ICE
end
! { dg-final { cleanup-modules "abstract_gradient" } }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch, Fortran] PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789
2009-10-23 14:52 [Patch, Fortran] PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789 Janus Weil
@ 2009-10-23 15:09 ` Jerry DeLisle
2009-10-23 16:21 ` Janus Weil
0 siblings, 1 reply; 3+ messages in thread
From: Jerry DeLisle @ 2009-10-23 15:09 UTC (permalink / raw)
To: Janus Weil; +Cc: gfortran, gcc-patches
On 10/23/2009 07:27 AM, Janus Weil wrote:
> Hi all,
>
> here is a one-line fix for another OOP problem, connected to
> CLASS-valued functions.
>
> Regtested on x86_64-unknown-linux-gnu. Ok for trunk?
>
OK, Thanks
Jerry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch, Fortran] PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789
2009-10-23 15:09 ` Jerry DeLisle
@ 2009-10-23 16:21 ` Janus Weil
0 siblings, 0 replies; 3+ messages in thread
From: Janus Weil @ 2009-10-23 16:21 UTC (permalink / raw)
To: Jerry DeLisle; +Cc: gfortran, gcc-patches
>> here is a one-line fix for another OOP problem, connected to
>> CLASS-valued functions.
>>
>> Regtested on x86_64-unknown-linux-gnu. Ok for trunk?
>>
> OK, Thanks
Committed as r153504.
Cheers,
Janus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-23 16:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-23 14:52 [Patch, Fortran] PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789 Janus Weil
2009-10-23 15:09 ` Jerry DeLisle
2009-10-23 16:21 ` Janus Weil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).