public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94224] New: [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C
@ 2020-03-19 14:21 zsojka at seznam dot cz
2020-03-19 15:17 ` [Bug tree-optimization/94224] " jakub at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2020-03-19 14:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94224
Bug ID: 94224
Summary: [10 Regression] ICE: SIGSEGV in output_merged_store
(gimple-ssa-store-merging.c:4304) with -O2
-fnon-call-exceptions testcase.C
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Created attachment 48065
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48065&action=edit
reduced testcase (from OpenTTD sources)
Compiler output:
$ x86_64-pc-linux-gnu-g++ -O2 -fnon-call-exceptions testcase.C -wrapper
valgrind,-q
testcase.C: In function 'int operatorX(int&)':
testcase.C:7:1: warning: no return statement in function returning non-void
[-Wreturn-type]
7 | }
| ^
==21839== Invalid read of size 4
==21839== at 0x1C09F4A: (anonymous
namespace)::imm_store_chain_info::output_merged_store((anonymous
namespace)::merged_store_group*) (gimple-ssa-store-merging.c:4304)
==21839== by 0x1C0C7AA: output_merged_stores
(gimple-ssa-store-merging.c:4360)
==21839== by 0x1C0C7AA: terminate_and_process_chain
(gimple-ssa-store-merging.c:4404)
==21839== by 0x1C0C7AA: (anonymous
namespace)::pass_store_merging::terminate_and_process_chain((anonymous
namespace)::imm_store_chain_info*) (gimple-ssa-store-merging.c:2206)
==21839== by 0x1C0DD3F: terminate_and_process_all_chains
(gimple-ssa-store-merging.c:2141)
==21839== by 0x1C0DD3F: (anonymous
namespace)::pass_store_merging::execute(function*)
(gimple-ssa-store-merging.c:4950)
==21839== by 0x11447A7: execute_one_pass(opt_pass*) (passes.c:2502)
==21839== by 0x114511F: execute_pass_list_1(opt_pass*) (passes.c:2590)
==21839== by 0x1145131: execute_pass_list_1(opt_pass*) (passes.c:2591)
==21839== by 0x1145158: execute_pass_list(function*, opt_pass*)
(passes.c:2601)
==21839== by 0xDAB6DB: cgraph_node::expand() (cgraphunit.c:2292)
==21839== by 0xDAC8AF: expand_all_functions (cgraphunit.c:2463)
==21839== by 0xDAC8AF: symbol_table::compile() [clone .part.0]
(cgraphunit.c:2813)
==21839== by 0xDAEBAC: compile (cgraphunit.c:2726)
==21839== by 0xDAEBAC: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2993)
==21839== by 0x123052E: compile_file() (toplev.c:483)
==21839== by 0xA7E6B7: do_compile (toplev.c:2273)
==21839== by 0xA7E6B7: toplev::main(int, char**) (toplev.c:2412)
==21839== Address 0x24 is not stack'd, malloc'd or (recently) free'd
==21839==
during GIMPLE pass: store-merging
testcase.C: In function 'void x()':
testcase.C:40:1: internal compiler error: Segmentation fault
40 | x ()
| ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
The original testcase didn't have the missing return statement; adding it
prevents the ICE in the reduced testcase.
$ x86_64-pc-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-g++
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r10-7276-20200319122247-g02f7334ac93-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r10-7276-20200319122247-g02f7334ac93-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200319 (experimental) (GCC)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/94224] [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C
2020-03-19 14:21 [Bug tree-optimization/94224] New: [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C zsojka at seznam dot cz
@ 2020-03-19 15:17 ` jakub at gcc dot gnu.org
2020-03-19 16:41 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-19 15:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94224
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.0
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |jakub at gcc dot gnu.org
Last reconfirmed| |2020-03-19
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with my r10-6860-g4d213bf6011ed2b30b9d0ca70069a5dbc294b5d7 change.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/94224] [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C
2020-03-19 14:21 [Bug tree-optimization/94224] New: [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C zsojka at seznam dot cz
2020-03-19 15:17 ` [Bug tree-optimization/94224] " jakub at gcc dot gnu.org
@ 2020-03-19 16:41 ` jakub at gcc dot gnu.org
2020-03-19 16:58 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-19 16:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94224
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Priority|P3 |P1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/94224] [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C
2020-03-19 14:21 [Bug tree-optimization/94224] New: [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C zsojka at seznam dot cz
2020-03-19 15:17 ` [Bug tree-optimization/94224] " jakub at gcc dot gnu.org
2020-03-19 16:41 ` jakub at gcc dot gnu.org
@ 2020-03-19 16:58 ` jakub at gcc dot gnu.org
2020-03-20 8:34 ` cvs-commit at gcc dot gnu.org
2020-03-20 8:43 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-19 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94224
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48066
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48066&action=edit
gcc10-pr94224.patch
Untested fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/94224] [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C
2020-03-19 14:21 [Bug tree-optimization/94224] New: [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C zsojka at seznam dot cz
` (2 preceding siblings ...)
2020-03-19 16:58 ` jakub at gcc dot gnu.org
@ 2020-03-20 8:34 ` cvs-commit at gcc dot gnu.org
2020-03-20 8:43 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-20 8:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94224
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:4119cd693d27e9dd87c547de75283edd45bf6dce
commit r10-7287-g4119cd693d27e9dd87c547de75283edd45bf6dce
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Mar 20 09:33:38 2020 +0100
store-merging: Fix up -fnon-call-exceptions handling [PR94224]
When we are adding a single store into a store group, we are already
checking that store->lp_nr matches, but we have also code to add further
INTEGER_CST stores into the group right away if the ordering requires that
either we put there all or none from a certain set of stores. And in those
cases we weren't doing these lp_nr checks, which means we could end up with
stores with different lp_nr in the same group, which then ICEs during
output_merged_store.
2020-03-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94224
* gimple-ssa-store-merging.c
(imm_store_chain_info::coalesce_immediate): Don't consider
overlapping
or adjacent INTEGER_CST rhs_code stores as mergeable if they have
different lp_nr.
* g++.dg/tree-ssa/pr94224.C: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/94224] [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C
2020-03-19 14:21 [Bug tree-optimization/94224] New: [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C zsojka at seznam dot cz
` (3 preceding siblings ...)
2020-03-20 8:34 ` cvs-commit at gcc dot gnu.org
@ 2020-03-20 8:43 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-20 8:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94224
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-03-20 8:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 14:21 [Bug tree-optimization/94224] New: [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4304) with -O2 -fnon-call-exceptions testcase.C zsojka at seznam dot cz
2020-03-19 15:17 ` [Bug tree-optimization/94224] " jakub at gcc dot gnu.org
2020-03-19 16:41 ` jakub at gcc dot gnu.org
2020-03-19 16:58 ` jakub at gcc dot gnu.org
2020-03-20 8:34 ` cvs-commit at gcc dot gnu.org
2020-03-20 8:43 ` jakub 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).