aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Stump <mikestump@comcast.net>2012-01-25 00:06:27 +0000
committerMike Stump <mrs@gcc.gnu.org>2012-01-25 00:06:27 +0000
commit7a4217067df071eba42abdd0193c70aca8b9bff6 (patch)
tree92cbb3990b9d8309ce036b45faef5bda11889b86
parentefcf639fab17cac5437f70e3a59795ac320ddc37 (diff)
downloadgcc-7a4217067df071eba42abdd0193c70aca8b9bff6.zip
gcc-7a4217067df071eba42abdd0193c70aca8b9bff6.tar.gz
gcc-7a4217067df071eba42abdd0193c70aca8b9bff6.tar.bz2
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
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-common.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index c2045f9..373ad29 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -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
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 013c71a..8dbf6cc 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -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;