public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/112700] New: Segmentation fault with list of characters and types
@ 2023-11-24 13:59 alexandre.poux at coria dot fr
2023-11-24 19:31 ` [Bug fortran/112700] " anlauf at gcc dot gnu.org
2023-11-27 8:59 ` alexandre.poux at coria dot fr
0 siblings, 2 replies; 3+ messages in thread
From: alexandre.poux at coria dot fr @ 2023-11-24 13:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112700
Bug ID: 112700
Summary: Segmentation fault with list of characters and types
Product: gcc
Version: 13.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: alexandre.poux at coria dot fr
Target Milestone: ---
Created attachment 56679
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56679&action=edit
a module triggerring a segmentation fault
The attached source code for a fortran module triggers a segmentation fault
when compiling
```
bug_mod.f90:24:39:
24 | list_char = obj%get_char_list()
| 1
internal compiler error: Segmentation fault
0xd432a1 internal_error(char const*, ...)
???:0
0xe409f5 fold_convert_loc(unsigned int, tree_node*, tree_node*)
???:0
0x15e8f14 gfc_trans_create_temp_array(stmtblock_t*, stmtblock_t*, gfc_ss*,
tree_node*, tree_node*, bool, bool, bool, locus*)
???:0
0x1631d79 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
???:0
0x15f5151 gfc_conv_loop_setup(gfc_loopinfo*, locus*)
???:0
0x161d4f8 gfc_generate_function_code(gfc_namespace*)
???:0
0x15e7f29 gfc_generate_module_code(gfc_namespace*)
???:0
0x157973b gfc_parse_file()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
```
I've been able to reproduce it with
- latest version of gfortran from the archlinux repository: core/gcc-fortran
13.2.1-3
- older version from ubuntu 22.04 : Ubuntu 11.4.0-1ubuntu1~22.04
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/112700] Segmentation fault with list of characters and types
2023-11-24 13:59 [Bug fortran/112700] New: Segmentation fault with list of characters and types alexandre.poux at coria dot fr
@ 2023-11-24 19:31 ` anlauf at gcc dot gnu.org
2023-11-27 8:59 ` alexandre.poux at coria dot fr
1 sibling, 0 replies; 3+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-11-24 19:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112700
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2023-11-24
Status|UNCONFIRMED |NEW
Keywords| |ice-on-valid-code
--- Comment #1 from anlauf at gcc dot gnu.org ---
The testcase has some similarity with reduced versions of pr93678
and also the same traceback. Thus likely related.
Note: replacing the rank-1 result variable
character(len=1) :: list(1)
by a scalar
character(len=1) :: list !(1)
avoids the ICE.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/112700] Segmentation fault with list of characters and types
2023-11-24 13:59 [Bug fortran/112700] New: Segmentation fault with list of characters and types alexandre.poux at coria dot fr
2023-11-24 19:31 ` [Bug fortran/112700] " anlauf at gcc dot gnu.org
@ 2023-11-27 8:59 ` alexandre.poux at coria dot fr
1 sibling, 0 replies; 3+ messages in thread
From: alexandre.poux at coria dot fr @ 2023-11-27 8:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112700
--- Comment #2 from Alexandre Poux <alexandre.poux at coria dot fr> ---
Among the things that avoid the ICE:
- Using a subroutine instead of a function
- not using a type procedure but a regular function
- wrapping the list of char in a custom type
- returning a list of a real numbers
Among the things that do not avoid the ICE:
- replacing the fixed length array with a pointer or an allocatable
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-27 8:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-24 13:59 [Bug fortran/112700] New: Segmentation fault with list of characters and types alexandre.poux at coria dot fr
2023-11-24 19:31 ` [Bug fortran/112700] " anlauf at gcc dot gnu.org
2023-11-27 8:59 ` alexandre.poux at coria dot fr
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).