[llvm-commits] [llvm-gcc-4-2] r39948 - in /llvm-gcc-4-2/trunk/gcc: fold-const.c gimplify.c
Scott Michel
scottm at rushg.aero.org
Mon Jul 16 18:34:15 PDT 2007
Chris Lattner wrote:
>> Log:
>> Fix null dereference and an obvious syntax error when llvm is not
>> enabled...
>
>> --- llvm-gcc-4-2/trunk/gcc/gimplify.c (original)
>> +++ llvm-gcc-4-2/trunk/gcc/gimplify.c Mon Jul 16 20:01:43 2007
>> @@ -179,8 +179,10 @@
>> /* LLVM LOCAL begin */
>> #ifndef ENABLE_LLVM
>> /* LLVM wants to know about gimple formal temps. */
>> - for (t = gimplify_ctxp->temps; t ; t = TREE_CHAIN (t))
>> - DECL_GIMPLE_FORMAL_TEMP_P (t) = 0;
>> + if (gimplify_ctxp != 0) {
>> + for (t = gimplify_ctxp->temps; t ; t = TREE_CHAIN (t))
>> + DECL_GIMPLE_FORMAL_TEMP_P (t) = 0;
>> + }
>> #else
>> t = 0;
>> #endif
>
> Hey Scott,
>
> Doesn't this patch change the behavior of the code when LLVM is *not*
> enabled? What am I missing here? Should the #ifndef ENABLE_LLVM
> really be #ifdef ENABLE_LLVM ?
Not sure what the original author intended here. I'm compiling the
spu-unknown-elf target _w/o_ llvm enabled, which is how I tripped the
null deref bug.
If this was supposed to be '#ifdef LLVM'... well, I'll check the file's
log to make sure.
-scooter
More information about the llvm-commits
mailing list