public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107141] New: ICE: Segmentation fault (in contains_struct_check)
@ 2022-10-04 3:59 asolokha at gmx dot com
2022-10-04 8:39 ` [Bug fortran/107141] " marxin at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2022-10-04 3:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107141
Bug ID: 107141
Summary: ICE: Segmentation fault (in contains_struct_check)
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gcc 13.0.0 20220925 snapshot (g:77bbf69d2981dafc2ef3e59bfbefb645d88bab9d) ICEs
when compiling the following testcase, reduced from
test/Lower/host-associated-functions.f90 from the flang 15.0.1 test suite:
subroutine capture_char_func_dummy(char_func_dummy, n)
character(n),external :: char_func_dummy
contains
subroutine internal()
end subroutine
end subroutine
% gfortran-13.0.0 -c wo2sdzlo.f90
wo2sdzlo.f90:1:34:
1 | subroutine capture_char_func_dummy(char_func_dummy, n)
| ^
internal compiler error: Segmentation fault
0xf756bf crash_signal
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/toplev.cc:314
0x9bacd3 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree.h:3633
0x1027de2 convert_nonlocal_reference_op
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-nested.cc:1166
0x128c6b3 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree.cc:11249
0xc762e1 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/gimple-walk.cc:221
0xc7657d walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/gimple-walk.cc:620
0xc76788 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/gimple-walk.cc:51
0xc76629 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/gimple-walk.cc:711
0xc76788 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/gimple-walk.cc:51
0x1023588 walk_body
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-nested.cc:811
0x1023588 walk_function
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-nested.cc:822
0x1023588 walk_all_functions
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-nested.cc:887
0x102c721 lower_nested_functions(tree_node*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-nested.cc:3736
0xacb7c5 cgraph_node::analyze()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cgraphunit.cc:682
0xace547 analyze_functions
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cgraphunit.cc:1240
0xacf1ed symbol_table::finalize_compilation_unit()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cgraphunit.cc:2500
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/107141] ICE: Segmentation fault (in contains_struct_check)
2022-10-04 3:59 [Bug tree-optimization/107141] New: ICE: Segmentation fault (in contains_struct_check) asolokha at gmx dot com
@ 2022-10-04 8:39 ` marxin at gcc dot gnu.org
2022-10-15 14:47 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-04 8:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107141
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |marxin at gcc dot gnu.org
Last reconfirmed| |2022-10-04
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, it's old issue.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/107141] ICE: Segmentation fault (in contains_struct_check)
2022-10-04 3:59 [Bug tree-optimization/107141] New: ICE: Segmentation fault (in contains_struct_check) asolokha at gmx dot com
2022-10-04 8:39 ` [Bug fortran/107141] " marxin at gcc dot gnu.org
@ 2022-10-15 14:47 ` anlauf at gcc dot gnu.org
2022-10-15 15:17 ` anlauf at gcc dot gnu.org
2024-02-15 7:35 ` dcb314 at hotmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-10-15 14:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107141
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #2 from anlauf at gcc dot gnu.org ---
Interesting. Replacing the declaration of the external function by one
using either fixed length
character(2),external :: char_func_dummy
or of assumed length
character(*),external :: char_func_dummy
gets rid of the error.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/107141] ICE: Segmentation fault (in contains_struct_check)
2022-10-04 3:59 [Bug tree-optimization/107141] New: ICE: Segmentation fault (in contains_struct_check) asolokha at gmx dot com
2022-10-04 8:39 ` [Bug fortran/107141] " marxin at gcc dot gnu.org
2022-10-15 14:47 ` anlauf at gcc dot gnu.org
@ 2022-10-15 15:17 ` anlauf at gcc dot gnu.org
2024-02-15 7:35 ` dcb314 at hotmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-10-15 15:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107141
--- Comment #3 from anlauf at gcc dot gnu.org ---
Placing the subroutine into a module also avoids the error.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/107141] ICE: Segmentation fault (in contains_struct_check)
2022-10-04 3:59 [Bug tree-optimization/107141] New: ICE: Segmentation fault (in contains_struct_check) asolokha at gmx dot com
` (2 preceding siblings ...)
2022-10-15 15:17 ` anlauf at gcc dot gnu.org
@ 2024-02-15 7:35 ` dcb314 at hotmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2024-02-15 7:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107141
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
Similar thing happens with file ./Lower/derived-type-finalization.f90
from the same test suite:
test $ /home/dcb38/gcc/results.20240214.asan.ubsan/bin/gfortran -c -w
./Lower/derived-type-finalization.f90
./Lower/derived-type-finalization.f90:227:37:
227 | allocate(up(10), source=copy(10))
| 1
internal compiler error: Segmentation fault
0xf55039 crash_signal(int)
/home/dcb38/gcc/working/gcc/../../trunk.20210101/gcc/toplev.cc:317
0x87a0ab contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
../../trunk.20210101/gcc/tree.h:3757
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-15 7:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 3:59 [Bug tree-optimization/107141] New: ICE: Segmentation fault (in contains_struct_check) asolokha at gmx dot com
2022-10-04 8:39 ` [Bug fortran/107141] " marxin at gcc dot gnu.org
2022-10-15 14:47 ` anlauf at gcc dot gnu.org
2022-10-15 15:17 ` anlauf at gcc dot gnu.org
2024-02-15 7:35 ` dcb314 at hotmail dot com
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).