public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/102111] New: Segfault with associate to derived type with allocatable component
@ 2021-08-27 22:08 everythingfunctional at protonmail dot com
2021-08-27 22:39 ` [Bug libfortran/102111] " kargl at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: everythingfunctional at protonmail dot com @ 2021-08-27 22:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102111
Bug ID: 102111
Summary: Segfault with associate to derived type with
allocatable component
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
Assignee: unassigned at gcc dot gnu.org
Reporter: everythingfunctional at protonmail dot com
Target Milestone: ---
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libfortran/102111] Segfault with associate to derived type with allocatable component
2021-08-27 22:08 [Bug libfortran/102111] New: Segfault with associate to derived type with allocatable component everythingfunctional at protonmail dot com
@ 2021-08-27 22:39 ` kargl at gcc dot gnu.org
2021-08-27 22:42 ` everythingfunctional at protonmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-08-27 22:39 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libfortran/102111] Segfault with associate to derived type with allocatable component
2021-08-27 22:08 [Bug libfortran/102111] New: Segfault with associate to derived type with allocatable component everythingfunctional at protonmail dot com
2021-08-27 22:39 ` [Bug libfortran/102111] " kargl at gcc dot gnu.org
@ 2021-08-27 22:42 ` everythingfunctional at protonmail dot com
2021-09-06 20:04 ` anlauf at gcc dot gnu.org
2023-04-08 13:00 ` [Bug fortran/102111] " pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: everythingfunctional at protonmail dot com @ 2021-08-27 22:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102111
--- Comment #2 from Brad Richardson <everythingfunctional at protonmail dot com> ---
Thanks for the for the confirmation. Glad to hear it is fixed in later
versions.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libfortran/102111] Segfault with associate to derived type with allocatable component
2021-08-27 22:08 [Bug libfortran/102111] New: Segfault with associate to derived type with allocatable component everythingfunctional at protonmail dot com
2021-08-27 22:39 ` [Bug libfortran/102111] " kargl at gcc dot gnu.org
2021-08-27 22:42 ` everythingfunctional at protonmail dot com
@ 2021-09-06 20:04 ` anlauf at gcc dot gnu.org
2023-04-08 13:00 ` [Bug fortran/102111] " pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-09-06 20:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102111
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2021-09-06
Keywords| |wrong-code
--- Comment #3 from anlauf at gcc dot gnu.org ---
I get a memory corruption on x86_64-pc-linux-gnu when adding a print
as in comment#1.
valgrind complains about:
Invalid free() / delete / delete[] / realloc()
So I guess it is not (fully) fixed yet.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102111] Segfault with associate to derived type with allocatable component
2021-08-27 22:08 [Bug libfortran/102111] New: Segfault with associate to derived type with allocatable component everythingfunctional at protonmail dot com
` (2 preceding siblings ...)
2021-09-06 20:04 ` anlauf at gcc dot gnu.org
@ 2023-04-08 13:00 ` pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu.org @ 2023-04-08 13:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102111
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to anlauf from comment #3)
> I get a memory corruption on x86_64-pc-linux-gnu when adding a print
> as in comment#1.
>
> valgrind complains about:
>
> Invalid free() / delete / delete[] / realloc()
>
> So I guess it is not (fully) fixed yet.
It's fixed on mainline now.
Cheers
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-08 13:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 22:08 [Bug libfortran/102111] New: Segfault with associate to derived type with allocatable component everythingfunctional at protonmail dot com
2021-08-27 22:39 ` [Bug libfortran/102111] " kargl at gcc dot gnu.org
2021-08-27 22:42 ` everythingfunctional at protonmail dot com
2021-09-06 20:04 ` anlauf at gcc dot gnu.org
2023-04-08 13:00 ` [Bug fortran/102111] " pault at gcc dot gnu.org
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).