public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1
@ 2020-08-28 9:28 duanbo3 at huawei dot com
2020-08-28 10:02 ` [Bug c/96834] " jakub at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: duanbo3 at huawei dot com @ 2020-08-28 9:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
Bug ID: 96834
Summary: ICE: Segmentation fault signal terminated program cc1
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: duanbo3 at huawei dot com
Target Milestone: ---
Hi,gcc-trunk ICEs when compiling the following testcase with -O3 on aarch64 or
x86:
Testcase:
extern int a[][1000000];
int b;
void c() {
for (int d = 2; d <= 9; d++)
for (int e = 32; e <= 41; e++)
b += a[d][5];
}
produces the error:
aarch64:
aarch64-linux-gnu-gcc: internal compiler error: Segmentation fault signal
terminated program cc1
Please submit a full bug report,
with preprocessed source if appropriate.
x86:
x86_64-pc-linux-gnu-gcc: internal compiler error: Segmentation fault signal
terminated program cc1
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
any suggestion
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/96834] ICE: Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
@ 2020-08-28 10:02 ` jakub at gcc dot gnu.org
2020-08-28 10:08 ` [Bug c/96834] [9/10/11 Regression] " jakub at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-08-28 10:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems the ICE is due to too deep recursion like
#76 0x00000000013ea04d in interpret_gimple_assign (loop=0x7ffff0dfc000,
stmt=0x7fffe4e807e8) at ../../gcc/tree-scalar-evolution.c:1918
#77 0x00000000013ea1c1 in analyze_scalar_evolution_1 (loop=0x7ffff0dfc000,
var=0x7fffe4e83000) at ../../gcc/tree-scalar-evolution.c:1969
#78 0x00000000013ea3cb in analyze_scalar_evolution (loop=0x7ffff0dfc000,
var=0x7fffe4e83000) at ../../gcc/tree-scalar-evolution.c:2038
#79 0x00000000013e8f1d in interpret_rhs_expr (loop=0x7ffff0dfc000,
at_stmt=0x7fffe4e80840, type=0x7ffff0dd9498, rhs1=0x7fffe4e83000,
code=POINTER_PLUS_EXPR, rhs2=0x7ffff0ca0d38) at
../../gcc/tree-scalar-evolution.c:1704
#80 0x00000000013ea04d in interpret_gimple_assign (loop=0x7ffff0dfc000,
stmt=0x7fffe4e80840) at ../../gcc/tree-scalar-evolution.c:1918
#81 0x00000000013ea1c1 in analyze_scalar_evolution_1 (loop=0x7ffff0dfc000,
var=0x7fffe4e83090) at ../../gcc/tree-scalar-evolution.c:1969
#82 0x00000000013ea3cb in analyze_scalar_evolution (loop=0x7ffff0dfc000,
var=0x7fffe4e83090) at ../../gcc/tree-scalar-evolution.c:2038
#83 0x00000000013e8f1d in interpret_rhs_expr (loop=0x7ffff0dfc000,
at_stmt=0x7fffe4e80898, type=0x7ffff0dd9498, rhs1=0x7fffe4e83090,
code=POINTER_PLUS_EXPR, rhs2=0x7ffff0ca0d38) at
../../gcc/tree-scalar-evolution.c:1704
#84 0x00000000013ea04d in interpret_gimple_assign (loop=0x7ffff0dfc000,
stmt=0x7fffe4e80898) at ../../gcc/tree-scalar-evolution.c:1918
#85 0x00000000013ea1c1 in analyze_scalar_evolution_1 (loop=0x7ffff0dfc000,
var=0x7fffe4e83120) at ../../gcc/tree-scalar-evolution.c:1969
#86 0x00000000013ea3cb in analyze_scalar_evolution (loop=0x7ffff0dfc000,
var=0x7fffe4e83120) at ../../gcc/tree-scalar-evolution.c:2038
#87 0x00000000013e8f1d in interpret_rhs_expr (loop=0x7ffff0dfc000,
at_stmt=0x7fffe4e808f0, type=0x7ffff0dd9498, rhs1=0x7fffe4e83120,
code=POINTER_PLUS_EXPR, rhs2=0x7ffff0ca0d38) at
../../gcc/tree-scalar-evolution.c:1704
#88 0x00000000013ea04d in interpret_gimple_assign (loop=0x7ffff0dfc000,
stmt=0x7fffe4e808f0) at ../../gcc/tree-scalar-evolution.c:1918
#89 0x00000000013ea1c1 in analyze_scalar_evolution_1 (loop=0x7ffff0dfc000,
var=0x7fffe4e831b0) at ../../gcc/tree-scalar-evolution.c:1969
#90 0x00000000013ea3cb in analyze_scalar_evolution (loop=0x7ffff0dfc000,
var=0x7fffe4e831b0) at ../../gcc/tree-scalar-evolution.c:2038
#91 0x00000000013e8f1d in interpret_rhs_expr (loop=0x7ffff0dfc000,
at_stmt=0x7fffe4e80948, type=0x7ffff0dd9498, rhs1=0x7fffe4e831b0,
code=POINTER_PLUS_EXPR, rhs2=0x7ffff0ca0d38) at
../../gcc/tree-scalar-evolution.c:1704
#92 0x00000000013ea04d in interpret_gimple_assign (loop=0x7ffff0dfc000,
stmt=0x7fffe4e80948) at ../../gcc/tree-scalar-evolution.c:1918
#93 0x00000000013ea1c1 in analyze_scalar_evolution_1 (loop=0x7ffff0dfc000,
var=0x7fffe4e83240) at ../../gcc/tree-scalar-evolution.c:1969
#94 0x00000000013ea3cb in analyze_scalar_evolution (loop=0x7ffff0dfc000,
var=0x7fffe4e83240) at ../../gcc/tree-scalar-evolution.c:2038
#95 0x00000000013e8f1d in interpret_rhs_expr (loop=0x7ffff0dfc000,
at_stmt=0x7fffe4e809a0, type=0x7ffff0dd9498, rhs1=0x7fffe4e83240,
code=POINTER_PLUS_EXPR, rhs2=0x7ffff0ca0d38) at
../../gcc/tree-scalar-evolution.c:1704
during scev inside predictive commoning.
This is on vectp_a.8_1000004 = vectp_a.8_1000002 + 16;
vectp_a.8_1000006 = vectp_a.8_1000004 + 16;
vectp_a.8_1000008 = vectp_a.8_1000006 + 16;
vectp_a.8_1000010 = vectp_a.8_1000008 + 16;
vectp_a.8_1000012 = vectp_a.8_1000010 + 16;
vectp_a.8_1000014 = vectp_a.8_1000012 + 16;
vectp_a.8_1000016 = vectp_a.8_1000014 + 16;
vectp_a.8_1000018 = vectp_a.8_1000016 + 16;
vectp_a.8_1000020 = vectp_a.8_1000018 + 16;
vectp_a.8_1000022 = vectp_a.8_1000020 + 16;
vectp_a.8_1000024 = vectp_a.8_1000022 + 16;
vectp_a.8_1000026 = vectp_a.8_1000024 + 16;
vectp_a.8_1000028 = vectp_a.8_1000026 + 16;
vectp_a.8_1000030 = vectp_a.8_1000028 + 16;
vectp_a.8_1000032 = vectp_a.8_1000030 + 16;
vectp_a.8_1000034 = vectp_a.8_1000032 + 16;
vectp_a.8_1000036 = vectp_a.8_1000034 + 16;
vectp_a.8_1000038 = vectp_a.8_1000036 + 16;
vectp_a.8_1000040 = vectp_a.8_1000038 + 16;
like IL, where nothing has really simplified those before predcom.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/96834] [9/10/11 Regression] Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
2020-08-28 10:02 ` [Bug c/96834] " jakub at gcc dot gnu.org
@ 2020-08-28 10:08 ` jakub at gcc dot gnu.org
2020-08-28 12:42 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-08-28 10:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Summary|ICE: Segmentation fault |[9/10/11 Regression]
|signal terminated program |Segmentation fault signal
|cc1 |terminated program cc1
Target Milestone|--- |9.4
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-08-28
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r9-360-g68435eb293a6b9c161936bccab66e4b1f702372b
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/96834] [9/10/11 Regression] Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
2020-08-28 10:02 ` [Bug c/96834] " jakub at gcc dot gnu.org
2020-08-28 10:08 ` [Bug c/96834] [9/10/11 Regression] " jakub at gcc dot gnu.org
@ 2020-08-28 12:42 ` rguenth at gcc dot gnu.org
2020-08-29 6:22 ` z.zhanghaijian at huawei dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-08-28 12:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |53947
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
Keywords| |compile-time-hog
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
There's some other bug about this kind of excessive vectorization where
load permutation ends up loading a lot of dead stmts. It's a bit awkward
to address though.
t.c:4:3: note: Detected single element interleaving a[d_69][5] step 4000000
...
t.c:4:3: note: node 0x3e2e450 (max_nunits=2, refcnt=2)
t.c:4:3: note: stmt 0 _14 = a[d_69][5];
t.c:4:3: note: stmt 1 _14 = a[d_69][5];
t.c:4:3: note: stmt 2 _14 = a[d_69][5];
t.c:4:3: note: stmt 3 _14 = a[d_69][5];
t.c:4:3: note: stmt 4 _14 = a[d_69][5];
t.c:4:3: note: stmt 5 _14 = a[d_69][5];
t.c:4:3: note: stmt 6 _14 = a[d_69][5];
t.c:4:3: note: stmt 7 _14 = a[d_69][5];
t.c:4:3: note: stmt 8 _14 = a[d_69][5];
t.c:4:3: note: stmt 9 _14 = a[d_69][5];
t.c:4:3: note: load permutation { 0 0 0 0 0 0 0 0 0 0 }
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/96834] [9/10/11 Regression] Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
` (2 preceding siblings ...)
2020-08-28 12:42 ` rguenth at gcc dot gnu.org
@ 2020-08-29 6:22 ` z.zhanghaijian at huawei dot com
2020-08-31 7:19 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: z.zhanghaijian at huawei dot com @ 2020-08-29 6:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
z.zhanghaijian at huawei dot com <z.zhanghaijian at huawei dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |z.zhanghaijian at huawei dot com
--- Comment #4 from z.zhanghaijian at huawei dot com <z.zhanghaijian at huawei dot com> ---
The case like:
test.c:
int f300001() { }
void f300000() { printf("300000\n"); f300001(); }
void f299999() { printf("299999\n"); f300000(); }
void f299998() { printf("299998\n"); f299999(); }
void f299997() { printf("299997\n"); f299998(); }
...
void f10() { printf("10\n"); f11(); }
void f9() { printf("9\n"); f10(); }
void f8() { printf("8\n"); f9(); }
void f7() { printf("7\n"); f8(); }
void f6() { printf("6\n"); f7(); }
void f5() { printf("5\n"); f6(); }
void f4() { printf("4\n"); f5(); }
void f3() { printf("3\n"); f4(); }
void f2() { printf("2\n"); f3(); }
void f1() { printf("1\n"); f2(); }
int main(int argc, char** argv){ f1(); }
This can also produces the error on aarch64:
gcc test.c -S
gcc: internal compiler error: Segmentation fault signal terminated program cc1
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/96834] [9/10/11 Regression] Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
` (3 preceding siblings ...)
2020-08-29 6:22 ` z.zhanghaijian at huawei dot com
@ 2020-08-31 7:19 ` rguenth at gcc dot gnu.org
2020-09-02 7:27 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-08-31 7:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to z.zhanghaijian@huawei.com from comment #4)
> The case like:
> test.c:
> int f300001() { }
> void f300000() { printf("300000\n"); f300001(); }
> void f299999() { printf("299999\n"); f300000(); }
> void f299998() { printf("299998\n"); f299999(); }
> void f299997() { printf("299997\n"); f299998(); }
> ...
> void f10() { printf("10\n"); f11(); }
> void f9() { printf("9\n"); f10(); }
> void f8() { printf("8\n"); f9(); }
> void f7() { printf("7\n"); f8(); }
> void f6() { printf("6\n"); f7(); }
> void f5() { printf("5\n"); f6(); }
> void f4() { printf("4\n"); f5(); }
> void f3() { printf("3\n"); f4(); }
> void f2() { printf("2\n"); f3(); }
> void f1() { printf("1\n"); f2(); }
> int main(int argc, char** argv){ f1(); }
>
> This can also produces the error on aarch64:
>
> gcc test.c -S
> gcc: internal compiler error: Segmentation fault signal terminated program
> cc1
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <https://gcc.gnu.org/bugs/> for instructions.
But that's sth entirely different and not vectorization triggered.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/96834] [9/10/11 Regression] Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
` (4 preceding siblings ...)
2020-08-31 7:19 ` rguenth at gcc dot gnu.org
@ 2020-09-02 7:27 ` rguenth at gcc dot gnu.org
2020-09-02 7:45 ` z.zhanghaijian at huawei dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-02 7:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=91403
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
PR91403 was that other similar bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/96834] [9/10/11 Regression] Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
` (5 preceding siblings ...)
2020-09-02 7:27 ` rguenth at gcc dot gnu.org
@ 2020-09-02 7:45 ` z.zhanghaijian at huawei dot com
2020-10-12 12:27 ` [Bug tree-optimization/96834] " rguenth at gcc dot gnu.org
2021-01-11 11:00 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: z.zhanghaijian at huawei dot com @ 2020-09-02 7:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
--- Comment #7 from z.zhanghaijian at huawei dot com <z.zhanghaijian at huawei dot com> ---
(In reply to Richard Biener from comment #5)
> (In reply to z.zhanghaijian@huawei.com from comment #4)
> > The case like:
> > test.c:
> > int f300001() { }
> > void f300000() { printf("300000\n"); f300001(); }
> > void f299999() { printf("299999\n"); f300000(); }
> > void f299998() { printf("299998\n"); f299999(); }
> > void f299997() { printf("299997\n"); f299998(); }
> > ...
> > void f10() { printf("10\n"); f11(); }
> > void f9() { printf("9\n"); f10(); }
> > void f8() { printf("8\n"); f9(); }
> > void f7() { printf("7\n"); f8(); }
> > void f6() { printf("6\n"); f7(); }
> > void f5() { printf("5\n"); f6(); }
> > void f4() { printf("4\n"); f5(); }
> > void f3() { printf("3\n"); f4(); }
> > void f2() { printf("2\n"); f3(); }
> > void f1() { printf("1\n"); f2(); }
> > int main(int argc, char** argv){ f1(); }
> >
> > This can also produces the error on aarch64:
> >
> > gcc test.c -S
> > gcc: internal compiler error: Segmentation fault signal terminated program
> > cc1
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <https://gcc.gnu.org/bugs/> for instructions.
>
> But that's sth entirely different and not vectorization triggered.
Yes, I'll re-submit a new PR.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/96834] [9/10/11 Regression] Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
` (6 preceding siblings ...)
2020-09-02 7:45 ` z.zhanghaijian at huawei dot com
@ 2020-10-12 12:27 ` rguenth at gcc dot gnu.org
2021-01-11 11:00 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-12 12:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Component|c |tree-optimization
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/96834] [9/10/11 Regression] Segmentation fault signal terminated program cc1
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
` (7 preceding siblings ...)
2020-10-12 12:27 ` [Bug tree-optimization/96834] " rguenth at gcc dot gnu.org
@ 2021-01-11 11:00 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-11 11:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96834
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
duplicate
*** This bug has been marked as a duplicate of bug 91403 ***
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-01-11 11:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 9:28 [Bug c/96834] New: ICE: Segmentation fault signal terminated program cc1 duanbo3 at huawei dot com
2020-08-28 10:02 ` [Bug c/96834] " jakub at gcc dot gnu.org
2020-08-28 10:08 ` [Bug c/96834] [9/10/11 Regression] " jakub at gcc dot gnu.org
2020-08-28 12:42 ` rguenth at gcc dot gnu.org
2020-08-29 6:22 ` z.zhanghaijian at huawei dot com
2020-08-31 7:19 ` rguenth at gcc dot gnu.org
2020-09-02 7:27 ` rguenth at gcc dot gnu.org
2020-09-02 7:45 ` z.zhanghaijian at huawei dot com
2020-10-12 12:27 ` [Bug tree-optimization/96834] " rguenth at gcc dot gnu.org
2021-01-11 11:00 ` rguenth 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).