This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50005] [4.7 Regression] ipa-inline-analysis.c:1876:41: error: comparison between signed an d unsigned integer expressions
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 7 Aug 2011 20:26:52 +0000
- Subject: [Bug tree-optimization/50005] [4.7 Regression] ipa-inline-analysis.c:1876:41: error: comparison between signed an d unsigned integer expressions
- Auto-submitted: auto-generated
- References: <bug-50005-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50005
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2011-08-07 20:26:31 UTC ---
Casting the VEC_length call to (int) fixes the problem, and is consistent with
several other comparisons involving VEC_int in this file:
--- gcc-4.7-20110806/gcc/ipa-inline-analysis.c.~1~ 2011-08-05
22:56:05.000000000 +0200
+++ gcc-4.7-20110806/gcc/ipa-inline-analysis.c 2011-08-07 12:15:46.000000000
+0200
@@ -1873,7 +1873,7 @@ remap_predicate (struct inline_summary *
/* See if we can remap condition operand to caller's operand.
Otherwise give up. */
if (!operand_map
- || VEC_length (int, operand_map) <= c->operand_num
+ || (int)VEC_length (int, operand_map) <= c->operand_num
|| VEC_index (int, operand_map, c->operand_num) == -1)
cond_predicate = true_predicate ();
else
You need --disable-build-poststage1-with-cxx to trigger the problem. The C++
FE fails to diagnose this signed/unsigned comparison due to PR50012.