/* Subroutines shared by all languages that are variants of C.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GCC.
return false;
}
- /* 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)))
+ /* Only convert parameters if arg_type is unsigned integer type with
+ new format sync routines, i.e. don't attempt to convert pointer
+ arguments (e.g. EXPECTED argument of __atomic_compare_exchange_n),
+ bool arguments (e.g. WEAK argument) or signed int arguments (memmodel
+ kinds). */
+ if (TREE_CODE (arg_type) == INTEGER_TYPE && TYPE_UNSIGNED (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