Two internal compiler errors

Arjen Markus arjen.markus895@gmail.com
Mon Feb 14 09:00:00 GMT 2011


Hi Janus,

it is bug #47728.

As the other one seems to be already covered, I have not made a PR out of that.
(Unless you think I should)

Regards,

Arjen

2011/2/14 Arjen Markus <arjen.markus895@gmail.com>:
> Hi Janus,
>
> I will open a PR for both.
>
> Regards,
>
> Arjen
>
> 2011/2/13 Janus Weil <janus@gcc.gnu.org>:
>> Hi Arjen,
>>
>>> while experimenting with the object-oriented features of Fortran 2003
>>> I ran into a few ICEs.
>>
>> thanks for the test drive :)
>>
>>
>>> The compiler stops with a message that there was a segmentation fault,
>>> the reported line is line 56.
>>> (No syntax errors or other messages of any kind are reported)
>>
>> Ok, I can confirm this with the current trunk and the following reduction:
>>
>> program test_objects
>>
>>   implicit none
>>
>>   type, abstract :: shape
>>   end type
>>
>>   type, extends(shape) :: rectangle
>>       real :: width, height
>>   end type
>>
>>   class(shape), dimension(2) :: object
>>
>>   object(1) = rectangle( 1.0, 2.0 )
>>
>> end program test_objects
>>
>>
>> There are at least two problems with this:
>> 1) Your "object" is missing one of the attributes POINTER or
>> ALLOCATABLE. Declaring "plain" class objects like this is forbidden.
>> 2) gfortran currently does not support dimensionful class variables.
>> This of course is not a flaw of your program, but of gfortran ;)
>>
>> However, it seems the respective error messages are being swallowed by
>> the ICE (which is caused by the last line). Could you open a PR for
>> this? I will take care of fixing it ...
>>
>> Cheers,
>> Janus
>>
>



More information about the Fortran mailing list