This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/62044] [4.8/4.9 Regression] ICE in USE statement with RENAME for extended derived type


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62044

--- Comment #11 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> ---
Dear Dominique,

For some reason, the hash values are different in the vtable and the
TYPE IS. I had always worried that that we would have different names
giving the same hash sometime but not that the same name would give a
different hash!

The 'other brand'  gives the correct result.

Thanks for the testcase!

Paul

On 26 January 2015 at 11:55, dominiq at lps dot ens.fr
<gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62044
>
> --- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
>> The following, which works OK with another brand, selects the "wrong type"
>> with trunk. 4.9 still segfaults. Without the use rename, 4.9 runs and gives
>> the wrong result.
>
> The following test without module also selects the "wrong type" when compiled
> with 4.8 up to 5.0
>
>   implicit none
>   type, abstract :: GridImageSiloTemplate
>   end type GridImageSiloTemplate
>
>   type, extends ( GridImageSiloTemplate ) :: &
>     UnstructuredGridImageSiloForm
>   end type UnstructuredGridImageSiloForm
>
>   call foo
> contains
>   subroutine foo
>     class (GridImageSiloTemplate), allocatable :: a
>     type (UnstructuredGridImageSiloForm) :: b
>     allocate (a, mold = b)
>     select type (a)
>       type is (UnstructuredGridImageSiloForm)
>         print *, "correct type selected"
>       class default
>         print *, "wrong type"
>     end select
>   end subroutine
> end
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]