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.