diff mbox

Warn on undefined loop exit

Message ID 20141120205503.GI29446@redhat.com
State New
Headers show

Commit Message

Marek Polacek Nov. 20, 2014, 8:55 p.m. UTC
On Thu, Nov 20, 2014 at 05:27:35PM +0100, Richard Biener wrote:
> +      if (exit_warned && problem_stmts != vNULL)
> +        {
> 
> !problem_stmts.empty ()

/home/marek/src/gcc/gcc/tree-ssa-loop-niter.c: In function ‘void maybe_lower_iteration_bound(loop*)’:
/home/marek/src/gcc/gcc/tree-ssa-loop-niter.c:3420:38: error: ‘struct vec<gimple_statement_base*>’ has no member named ‘empty’
    if (exit_warned && !problem_stmts.empty ())
                                      ^
make: *** [tree-ssa-loop-niter.o] Error 1

I'm applying the following.

2014-11-20  Marek Polacek  <polacek@redhat.com>

	* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Fix typo.


	Marek

Comments

Andrew Stubbs Nov. 21, 2014, 9:36 a.m. UTC | #1
On 20/11/14 20:55, Marek Polacek wrote:
> On Thu, Nov 20, 2014 at 05:27:35PM +0100, Richard Biener wrote:
>> +      if (exit_warned && problem_stmts != vNULL)
>> +        {
>>
>> !problem_stmts.empty ()
>
> /home/marek/src/gcc/gcc/tree-ssa-loop-niter.c: In function ‘void maybe_lower_iteration_bound(loop*)’:
> /home/marek/src/gcc/gcc/tree-ssa-loop-niter.c:3420:38: error: ‘struct vec<gimple_statement_base*>’ has no member named ‘empty’
>      if (exit_warned && !problem_stmts.empty ())
>                                        ^

Oops, I had spotted that, but somewhere in the "svn up" process I've 
reapplied the broken version. :-(

Sorry for the mistake. I must stop coding late at night ...

Andrew
diff mbox

Patch

diff --git gcc/tree-ssa-loop-niter.c gcc/tree-ssa-loop-niter.c
index 8ba365c..d17227f 100644
--- gcc/tree-ssa-loop-niter.c
+++ gcc/tree-ssa-loop-niter.c
@@ -3417,7 +3417,7 @@  maybe_lower_iteration_bound (struct loop *loop)
 		}
 	    }
 
-	  if (exit_warned && !problem_stmts.empty ())
+	  if (exit_warned && !problem_stmts.is_empty ())
 	    {
 	      gimple stmt;
 	      int index;