Approved!

Sent from my iPhone

On Apr 29, 2012, at 5:45 PM, Richard Smith <[email protected]> wrote:

> Requesting a port to the branch: this was breaking bootstrap from recent 
> versions of gcc.
> 
> On Sun, Apr 29, 2012 at 5:16 PM, Richard Smith <[email protected]> 
> wrote:
> Author: rsmith
> Date: Sun Apr 29 19:16:51 2012
> New Revision: 155803
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=155803&view=rev
> Log:
> PR11926 + duplicates: Fix crash in -Wuninitialized when using a compiler like
> g++4.7, which reuses stack space allocated for temporaries. CFGElement::getAs
> returns a suitably-cast version of 'this'. Patch by Markus Trippelsdorf!
> 
> No test: this code has the same observable behavior as the old code when built
> with most compilers, and the tests were already failing when built with a
> compiler for which this produced a broken binary.
> 
> Modified:
>    cfe/trunk/lib/Analysis/UninitializedValues.cpp
> 
> Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/UninitializedValues.cpp?rev=155803&r1=155802&r2=155803&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Analysis/UninitializedValues.cpp (original)
> +++ cfe/trunk/lib/Analysis/UninitializedValues.cpp Sun Apr 29 19:16:51 2012
> @@ -168,7 +168,8 @@
>   if (block->empty())
>     return 0;
> 
> -  const CFGStmt *cstmt = block->front().getAs<CFGStmt>();
> +  CFGElement front = block->front();
> +  const CFGStmt *cstmt = front.getAs<CFGStmt>();
>   if (!cstmt)
>     return 0;
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to