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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to Brad Richardson from comment #0)
> I'm using version Ubuntu 11.1.0-1ubuntu1~21.04 on Pop!OS.
> 
> I suspect this is related to 102106, but fails every time instead of just
> intermittently.
> 
> program main
>     type :: example_t
>         integer, allocatable :: vals(:)
>     end type
> 
>     associate(example => example_t([42]))
>     end associate
> end program

This appears to be fixed in HEAD.  I added 

   print *, example%vals

within the associate statement.  With gfortran 10.someversion, I
get

% gfortran10 -o z a.f90
% ./z

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x80081f6bb in ???
#1  0x80081e876 in ???
#2  0x7ffffffff192 in ???
#3  0x801093fa1 in ???
#4  0x400d8a in ???
#5  0x400e37 in ???
#6  0x40083f in ???

With HEAD, I get

% gfcx -o z a.f90
% ./z
          42

Reply via email to