public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/97530] New: Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single})
@ 2020-10-22 15:13 toon at moene dot org
2020-10-24 8:13 ` [Bug fortran/97530] " toon at moene dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: toon at moene dot org @ 2020-10-22 15:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
Bug ID: 97530
Summary: Segmentation fault compiling coarray program with
option -fcoarray=shared (not with
-fcoarray={lib,single})
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: toon at moene dot org
Target Milestone: ---
Created attachment 49424
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49424&action=edit
Source code of the of the full program reported on.
This is actually using the compiler from the devel/coarray_native branch (built
today), but I couldn't select that with the "version" option.
I get the following Segmentation fault when compiling the attached program, as
follows:
~/compilers/install/devel/coarray_native/bin/gfortran -S -fcoarray=shared
random-weather.f90
random-weather.f90:236:0:
236 | int_mult % ps = ms % ps * ifactor
|
internal compiler error: Segmentation fault
0xe61e3f crash_signal
/home/toon/compilers/coarray_native/gcc/toplev.c:327
0x92954d gfc_conv_ss_descriptor
/home/toon/compilers/coarray_native/gcc/fortran/trans-array.c:3044
0x92c380 gfc_conv_ss_startstride(gfc_loopinfo*)
/home/toon/compilers/coarray_native/gcc/fortran/trans-array.c:4433
0x961ba9 gfc_trans_assignment_1
/home/toon/compilers/coarray_native/gcc/fortran/trans-expr.c:10858
0x920a82 trans_code
/home/toon/compilers/coarray_native/gcc/fortran/trans.c:1899
0x94ff8e gfc_generate_function_code(gfc_namespace*)
/home/toon/compilers/coarray_native/gcc/fortran/trans-decl.c:7067
0x924f61 gfc_generate_module_code(gfc_namespace*)
/home/toon/compilers/coarray_native/gcc/fortran/trans.c:2299
0x8cc28d translate_all_program_units
/home/toon/compilers/coarray_native/gcc/fortran/parse.c:6334
0x8cc28d gfc_parse_file()
/home/toon/compilers/coarray_native/gcc/fortran/parse.c:6616
0x91da6f gfc_be_parse_file
/home/toon/compilers/coarray_native/gcc/fortran/f95-lang.c:212
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Doesn't happen with -fcoarray={lib,single}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/97530] Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single})
2020-10-22 15:13 [Bug fortran/97530] New: Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single}) toon at moene dot org
@ 2020-10-24 8:13 ` toon at moene dot org
2020-10-24 19:05 ` tkoenig at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: toon at moene dot org @ 2020-10-24 8:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
--- Comment #1 from Toon Moene <toon at moene dot org> ---
Created attachment 49437
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49437&action=edit
Reduced test case.
I managed to reduce the failing program.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/97530] Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single})
2020-10-22 15:13 [Bug fortran/97530] New: Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single}) toon at moene dot org
2020-10-24 8:13 ` [Bug fortran/97530] " toon at moene dot org
@ 2020-10-24 19:05 ` tkoenig at gcc dot gnu.org
2020-10-24 19:08 ` tkoenig at gcc dot gnu.org
2020-10-25 10:43 ` tkoenig at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-24 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-10-24
Ever confirmed|0 |1
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Here's a reduced version of the reduced version.
module types
type local_model_state
real, allocatable :: ps(:,:) ! Surface pressure
real, allocatable :: t(:,:,:) ! Temperature
end type local_model_state
contains
function int_mult(ms, ifactor)
type(local_model_state) :: int_mult
type(local_model_state), intent(in) :: ms
integer, intent(in) :: ifactor
int_mult % ps = ms % ps * ifactor
end function int_mult
end module types
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/97530] Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single})
2020-10-22 15:13 [Bug fortran/97530] New: Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single}) toon at moene dot org
2020-10-24 8:13 ` [Bug fortran/97530] " toon at moene dot org
2020-10-24 19:05 ` tkoenig at gcc dot gnu.org
@ 2020-10-24 19:08 ` tkoenig at gcc dot gnu.org
2020-10-25 10:43 ` tkoenig at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-24 19:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
A little bit more reduced.
module types
type local_model_state
real, allocatable :: ps(:,:) ! Surface pressure
end type local_model_state
contains
function int_mult(ms, ifactor)
type(local_model_state) :: int_mult
type(local_model_state), intent(in) :: ms
integer, intent(in) :: ifactor
int_mult % ps = ms % ps * ifactor
end function int_mult
end module types
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/97530] Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single})
2020-10-22 15:13 [Bug fortran/97530] New: Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single}) toon at moene dot org
` (2 preceding siblings ...)
2020-10-24 19:08 ` tkoenig at gcc dot gnu.org
@ 2020-10-25 10:43 ` tkoenig at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-25 10:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Fixed by
https://gcc.gnu.org/g:9dca1f29608df4bda70b33be735373ac18b8714b
Thanks a lot for the bug report!
I think we need a way to run the whole testsuite with -fcoarray=shared
to spot any other issues like this.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-25 10:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 15:13 [Bug fortran/97530] New: Segmentation fault compiling coarray program with option -fcoarray=shared (not with -fcoarray={lib,single}) toon at moene dot org
2020-10-24 8:13 ` [Bug fortran/97530] " toon at moene dot org
2020-10-24 19:05 ` tkoenig at gcc dot gnu.org
2020-10-24 19:08 ` tkoenig at gcc dot gnu.org
2020-10-25 10:43 ` tkoenig 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).