public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100501] New: ICE: segmentation fault on embedded asm code
@ 2021-05-10 12:09 cnsun at uwaterloo dot ca
2021-05-11 6:15 ` [Bug c/100501] " rguenth at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-05-10 12:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Bug ID: 100501
Summary: ICE: segmentation fault on embedded asm code
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: cnsun at uwaterloo dot ca
Target Milestone: ---
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210510 (experimental) [master revision
:fb3a8fb4a:25f9f35a85ffee808fc1482b14d91176df59751b] (GCC)
$
$ gcc-trunk mutant.c
mutant.c: In function ‘foo’:
mutant.c:5:16: internal compiler error: Segmentation fault
4 | : "m"(({
| ~~
5 | if (8)
| ~~~^~~
6 | ;
| ~
7 | })));
| ~~
0xef73e3 crash_signal
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/toplev.c:327
0xbead04 is_gimple_variable
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimple-expr.h:84
0xbead04 is_gimple_id
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimple-expr.h:95
0xbead04 is_gimple_addressable
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimple-expr.h:122
0xbead04 is_gimple_lvalue(tree_node*)
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimple-expr.c:595
0xc2742d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:15038
0xc30a7d gimplify_asm_expr
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:6506
0xc26765 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:14416
0xc28fca gimplify_stmt(tree_node**, gimple**)
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:6877
0xc297fe gimplify_bind_expr
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:1421
0xc25a33 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:14284
0xc28fca gimplify_stmt(tree_node**, gimple**)
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:6877
0xc2a5c3 gimplify_body(tree_node*, bool)
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:15328
0xc2aa11 gimplify_function_tree(tree_node*)
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/gimplify.c:15482
0xa7e737 cgraph_node::analyze()
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/cgraphunit.c:670
0xa81641 analyze_functions
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/cgraphunit.c:1234
0xa82111 symbol_table::finalize_compilation_unit()
/tmp/tmp.FRQzt2wMfl-gcc-builder/gcc/gcc/cgraphunit.c:2508
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.
$
$ cat mutant.c
void foo() {
__asm__(""
:
: "m"(({
if (8)
;
})));
}
$
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] ICE: segmentation fault on embedded asm code
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
@ 2021-05-11 6:15 ` rguenth at gcc dot gnu.org
2021-05-11 22:57 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-11 6:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |12.0
Target| |x86_64-*-*
Keywords| |accepts-invalid
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the asm input is a BIND_EXPR, that's not valid - ({ }) could be valid but
then
sth converted that to a BIND_EXPR. Note the specific ({ }) does not have a
value.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] ICE: segmentation fault on embedded asm code
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
2021-05-11 6:15 ` [Bug c/100501] " rguenth at gcc dot gnu.org
@ 2021-05-11 22:57 ` pinskia at gcc dot gnu.org
2021-05-13 4:15 ` cnsun at uwaterloo dot ca
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-11 22:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 100542 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] ICE: segmentation fault on embedded asm code
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
2021-05-11 6:15 ` [Bug c/100501] " rguenth at gcc dot gnu.org
2021-05-11 22:57 ` pinskia at gcc dot gnu.org
@ 2021-05-13 4:15 ` cnsun at uwaterloo dot ca
2021-07-19 23:20 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-05-13 4:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
--- Comment #3 from Chengnian Sun <cnsun at uwaterloo dot ca> ---
A duplicate.
foo() { __asm__("" : : "m"(({}))); }
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] ICE: segmentation fault on embedded asm code
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
` (2 preceding siblings ...)
2021-05-13 4:15 ` cnsun at uwaterloo dot ca
@ 2021-07-19 23:20 ` pinskia at gcc dot gnu.org
2021-07-22 23:19 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-19 23:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2021-07-19
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
C++ front-end rejects this:
t67.c:1:13: error: memory input 0 is not directly addressable
1 | int foo() { __asm__("" : : "m"(({}))); }
| ^~~~~~~
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] ICE: segmentation fault on embedded asm code
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
` (3 preceding siblings ...)
2021-07-19 23:20 ` pinskia at gcc dot gnu.org
@ 2021-07-22 23:19 ` pinskia at gcc dot gnu.org
2021-07-24 2:20 ` [Bug c/100501] ICE with inline-asm and void statement expression cnsun at uwaterloo dot ca
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-22 23:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vegard.nossum at gmail dot com
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 84728 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] ICE with inline-asm and void statement expression
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
` (4 preceding siblings ...)
2021-07-22 23:19 ` pinskia at gcc dot gnu.org
@ 2021-07-24 2:20 ` cnsun at uwaterloo dot ca
2021-12-26 10:44 ` [Bug c/100501] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-07-24 2:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
--- Comment #6 from Chengnian Sun <cnsun at uwaterloo dot ca> ---
Another duplicate.
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210723 (experimental) [master revision
:3eeaf64a5:01ac2f08b0105a1c85425d0e59216eb528c6d2ab] (GCC)
$ cat mutant.c
foo() { __asm__("" : : "m"(({}))); }
$ gcc-trunk -w mutant.c
mutant.c: In function ‘foo’:
mutant.c:1:29: internal compiler error: Segmentation fault
1 | foo() { __asm__("" : : "m"(({}))); }
| ~^~~
0xf28613 crash_signal
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/toplev.c:328
0xc0eb94 is_gimple_variable
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimple-expr.h:84
0xc0eb94 is_gimple_id
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimple-expr.h:95
0xc0eb94 is_gimple_addressable
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimple-expr.h:122
0xc0eb94 is_gimple_lvalue(tree_node*)
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimple-expr.c:595
0xc4c06d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:15179
0xc59038 gimplify_asm_expr
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:6497
0xc4bfb1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:14556
0xc4db2a gimplify_stmt(tree_node**, gimple**)
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:6869
0xc4e35e gimplify_bind_expr
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:1426
0xc4b33c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:14424
0xc4db2a gimplify_stmt(tree_node**, gimple**)
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:6869
0xc4f153 gimplify_body(tree_node*, bool)
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:15456
0xc4f5a1 gimplify_function_tree(tree_node*)
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:15610
0xaa2657 cgraph_node::analyze()
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cgraphunit.c:670
0xaa5531 analyze_functions
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cgraphunit.c:1234
0xaa6011 symbol_table::finalize_compilation_unit()
/tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cgraphunit.c:2508
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] [9/10/11/12 Regression] ICE with inline-asm and void statement expression
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
` (5 preceding siblings ...)
2021-07-24 2:20 ` [Bug c/100501] ICE with inline-asm and void statement expression cnsun at uwaterloo dot ca
@ 2021-12-26 10:44 ` pinskia at gcc dot gnu.org
2022-01-20 13:54 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-26 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.1.2
Summary|ICE with inline-asm and |[9/10/11/12 Regression] ICE
|void statement expression |with inline-asm and void
| |statement expression
Known to fail| |4.4.7
Keywords| |ice-on-invalid-code
Target Milestone|--- |9.5
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
4.1.2 used to error out:
<source>:3: error: memory input 0 is not directly addressable
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] [9/10/11/12 Regression] ICE with inline-asm and void statement expression
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
` (6 preceding siblings ...)
2021-12-26 10:44 ` [Bug c/100501] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
@ 2022-01-20 13:54 ` rguenth at gcc dot gnu.org
2022-05-27 9:45 ` [Bug c/100501] [10/11/12/13 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-20 13:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] [10/11/12/13 Regression] ICE with inline-asm and void statement expression
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
` (7 preceding siblings ...)
2022-01-20 13:54 ` rguenth at gcc dot gnu.org
@ 2022-05-27 9:45 ` rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug c/100501] [11/12/13/14 " rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] [10/11/12/13 Regression] ICE with inline-asm and void statement expression
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
` (8 preceding siblings ...)
2022-05-27 9:45 ` [Bug c/100501] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug c/100501] [11/12/13/14 " rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/100501] [11/12/13/14 Regression] ICE with inline-asm and void statement expression
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
` (9 preceding siblings ...)
2022-06-28 10:44 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:39 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-07-07 10:39 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 12:09 [Bug c/100501] New: ICE: segmentation fault on embedded asm code cnsun at uwaterloo dot ca
2021-05-11 6:15 ` [Bug c/100501] " rguenth at gcc dot gnu.org
2021-05-11 22:57 ` pinskia at gcc dot gnu.org
2021-05-13 4:15 ` cnsun at uwaterloo dot ca
2021-07-19 23:20 ` pinskia at gcc dot gnu.org
2021-07-22 23:19 ` pinskia at gcc dot gnu.org
2021-07-24 2:20 ` [Bug c/100501] ICE with inline-asm and void statement expression cnsun at uwaterloo dot ca
2021-12-26 10:44 ` [Bug c/100501] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-20 13:54 ` rguenth at gcc dot gnu.org
2022-05-27 9:45 ` [Bug c/100501] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug c/100501] [11/12/13/14 " 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).