From 7a4217067df071eba42abdd0193c70aca8b9bff6 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Wed, 25 Jan 2012 00:06:27 +0000 Subject: [PATCH] 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 --- gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-common.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index c2045f940fe..373ad298186 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2012-01-24 Mike Stump + + * c-common.c (c_common_type_for_mode): Match signed/unsigned types + exactly. + 2012-01-18 Richard Guenther * 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 013c71a6420..8dbf6cc2d75 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;