* c-common,c (get_atomic_generic_size): Handle pointer to 0 size. Index: c-family/c-common.c =================================================================== *** c-family/c-common.c (revision 211758) --- c-family/c-common.c (working copy) *************** get_atomic_generic_size (location_t loc, *** 10462,10467 **** --- 10462,10468 ---- { int size; tree type = TREE_TYPE ((*params)[x]); + tree type_size; /* __atomic_compare_exchange has a bool in the 4th position, skip it. */ if (n_param == 6 && x == 3) continue; *************** get_atomic_generic_size (location_t loc, *** 10471,10477 **** function); return 0; } ! size = tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (type))); if (size != size_0) { error_at (loc, "size mismatch in argument %d of %qE", x + 1, --- 10472,10480 ---- function); return 0; } ! ! type_size = TYPE_SIZE_UNIT (TREE_TYPE (type)); ! size = type_size ? tree_to_uhwi (type_size) : 0; if (size != size_0) { error_at (loc, "size mismatch in argument %d of %qE", x + 1,