internal compiler error: in fold_convert_loc, at fold-const.c:1899
Janus Weil
janus@gcc.gnu.org
Mon Sep 6 20:10:00 GMT 2010
>> >> > Somewhere between r163809 and r163878, something happened leading to ...
>> >>
>> >> This is probably pr45550 due to revision 163861.
>> >
>> > The symptom looks the same, but on my code it appears at exactly
>> > r163856, which is the fix from Janus for 45507, and is there ever since
>> > (now at r163909).
>>
>> Well, maybe my patch just triggered the other bug on your code. Let's
>> just wait until PR45550 is fixed. If your error still appears then,
>> I'll take a look at it.
>>
>> Cheers,
>> Janus
>>
> Ok, I already have a very small test case I am attaching here for your
> convenience.
Thanks. Can you please tell me if this patch fixes the problem for you?
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 163901)
+++ gcc/fortran/resolve.c (working copy)
@@ -6727,7 +6727,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code
if (ts.type == BT_CLASS)
ts = ts.u.derived->components->ts;
- if (ts.type == BT_DERIVED)
+ if (ts.type == BT_DERIVED && gfc_has_default_initializer(ts.u.derived))
{
code->expr3 = gfc_default_initializer (&ts);
gfc_resolve_expr (code->expr3);
Cheers,
Janus
More information about the Fortran
mailing list