[Bug c/65345] New: ICE with _Generic selection on _Atomic int
tijl at coosemans dot org
gcc-bugzilla@gcc.gnu.org
Sat Mar 7 20:48:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65345
Bug ID: 65345
Summary: ICE with _Generic selection on _Atomic int
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tijl at coosemans dot org
gcc49 (FreeBSD Ports Collection) 4.9.3 20150218 (prerelease)
% cat test.c
_Atomic int i;
int j = _Generic( i+1, int: 1, default: 0 );
% gcc49 -c test.c
tmp.c:2:1: internal compiler error: Segmentation fault
int j = _Generic( i+1, int: 1, default: 0 );
^
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
The error only happens when "i" is part of an expression, so _Generic(i,...)
works correctly (it returns 1). Qualifiers like const and volatile instead of
_Atomic also work.
More information about the Gcc-bugs
mailing list