[Bug c++/92485] New: g++ ICE unexpected expression '<statement>' of kind asm_expr
adobriyan at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 12 21:00:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92485
Bug ID: 92485
Summary: g++ ICE unexpected expression '<statement>' of kind
asm_expr
Product: gcc
Version: 9.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: adobriyan at gmail dot com
Target Milestone: ---
Created attachment 47226
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47226&action=edit
trimmed down reproducer
int f()
{
return ({
int x = 1;
if (__builtin_expect((x), 0))
asm("");
__builtin_expect((x), 0);
});
}
$ g++ -x c++ -std=c++14 -c -o /dev/null idle.i
idle.i:8:10: internal compiler error: unexpected expression '<statement>' of
kind asm_expr
8 | });
-std=c++11 doesn't crash
-std=c++17 crashes
gcc doesn't crash
Parenthesis around (x) are important as does "1"
More information about the Gcc-bugs
mailing list