http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu.org
Target Milestone|--- |4.7.0
Summary|__atomic_compare_exchange_n |[4.7 Regression]
|for enumeration type |__atomic_compare_exchange_n
|changes signature with -m32 |for enumeration type
| |changes signature with -m32
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-13
11:28:04 UTC ---
DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_N,
"__atomic_compare_exchange_n",
BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST)
thus it is a variadic function. But sync_resolve_params () does
/* Only convert parameters if the size is appropriate with new format
sync routines. */
if (orig_format
|| tree_int_cst_equal (TYPE_SIZE (ptype), TYPE_SIZE (arg_type)))
{
/* Ideally for the first conversion we'd use convert_for_assignment
so that we get warnings for anything that doesn't match the
pointer
type. This isn't portable across the C and C++ front ends atm.
*/
val = VEC_index (tree, params, parmnum);
val = convert (ptype, val);
val = convert (arg_type, val);
VEC_replace (tree, params, parmnum, val);
where we probably should convert to an integer type of the same size as
arg_type first, before converting to a pointer?