c-common.c (c_common_type_for_mode): Match signed/unsigned types exactly.

* c-common.c (c_common_type_for_mode): Match signed/unsigned types
	exactly.

From-SVN: r183503
This commit is contained in:
Mike Stump 2012-01-25 00:06:27 +00:00 committed by Mike Stump
parent efcf639fab
commit 7a4217067d
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-01-24 Mike Stump <mikestump@comcast.net>
* c-common.c (c_common_type_for_mode): Match signed/unsigned types
exactly.
2012-01-18 Richard Guenther <rguenther@suse.de>
* c-opts.c (c_common_post_options): Reset LTO flags if

View File

@ -3089,7 +3089,8 @@ c_common_type_for_mode (enum machine_mode mode, int unsignedp)
}
for (t = registered_builtin_types; t; t = TREE_CHAIN (t))
if (TYPE_MODE (TREE_VALUE (t)) == mode)
if (TYPE_MODE (TREE_VALUE (t)) == mode
&& !!unsignedp == !!TYPE_UNSIGNED (TREE_VALUE (t)))
return TREE_VALUE (t);
return 0;