<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>The OsX build is slightly different than the linux build as I didn't see this error.  However, when I tried those functions on a program which used those intrinsics, I got a similar error.  To debug it, I tried rebuilding at -O0 but the problem went away.   We are failing in sync_resolve_size.  The original code was</div><div><font class="Apple-style-span" face="'Courier New'">  if (TREE_CODE (type) != POINTER_TYPE)</font></div><div><font class="Apple-style-span" face="'Courier New'">    goto incompatible;</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">  type = TREE_TYPE (type);</font></div><div><font class="Apple-style-span" face="'Courier New'">  if (!INTEGRAL_TYPE_P (type) && !POINTER_TYPE_P (type))</font></div><div><font class="Apple-style-span" face="'Courier New'">    goto incompatible;</font></div><div><br></div><div>We failed on the second if and jumped to incompatible, which doesn't make sense since type is an integral type.  When I removed the  !POINTER_TYPE_P, it worked.  When I rewrote the expression to be</div><div><div><span class="Apple-style-span" style="font-family: 'Courier New'; ">  if (!INTEGRAL_TYPE_P (type))</span></div><div><font class="Apple-style-span" face="'Courier New'">    if (!POINTER_TYPE_P (type))</font></div><div><font class="Apple-style-span" face="'Courier New'">      goto incompatible;</font></div></div><div><br></div><div>It worked as well.  The two pieces of code should be semantically equivalent.  I don't know if the linux build has this same issue or not as I don't have linux machine near me right now (if i get time, I'll try it at home).  I checked the above change in <span class="Apple-style-span" style="font-weight: bold; "> r54261.<span class="Apple-style-span" style="font-weight: normal; ">  If the linux build still doesn't work, please let me know.</span></span></div><div><br></div><div>Thanks,</div><div>  -- Mon Ping</div><div><br></div><div><br></div><div><br><div><div>On Jul 31, 2008, at 5:20 AM, Matthijs Kooijman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Mon Ping,<br><br><blockquote type="cite">I'm currently testing the one-line change above, if it works I'll commit it.<br></blockquote>The fix worked to fix the problem at hand (I can now succesfully do stage1 and<br>stage2), but compilation breaks in stage3.<br><br>I get the following error:<br><br>/home/kooijman/src/llvm-gcc/obj/./gcc/xgcc -B/home/kooijman/src/llvm-gcc/obj/./gcc/ -B/home/kooijman/src/llvm-gcc/obj/../install/i686-pc-linux-gnu/bin/ -B/home/kooijman/src/llvm-gcc/obj/../install/i686-pc-linux-gnu/lib/ -isystem /home/kooijman/src/llvm-gcc/obj/../install/i686-pc-linux-gnu/include -isystem /home/kooijman/src/llvm-gcc/obj/../install/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc-4.2-trunk/libgomp -I. -I../../../llvm-gcc-4.2-trunk/libgomp/config/linux/x86 -I../../../llvm-gcc-4.2-trunk/libgomp/config/linux -I../../../llvm-gcc-4.2-trunk/libgomp/config/posix -I../../../llvm-gcc-4.2-trunk/libgomp -Wall -Werror -ftls-model=initial-exec -march=i486 -pthread -mtune=i686 -O2 -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c ../../../llvm-gcc-4.2-trunk/libgomp/alloc.c  -fPIC -DPIC -o .libs/alloc.o<br>In file included from ../../../llvm-gcc-4.2-trunk/libgomp/libgomp.h:50,<br>                 from ../../../llvm-gcc-4.2-trunk/libgomp/alloc.c:32:<br>../../../llvm-gcc-4.2-trunk/libgomp/config/linux/sem.h: In function 'gomp_sem_wait':<br>../../../llvm-gcc-4.2-trunk/libgomp/config/linux/sem.h:45: error: incompatible type for argument 1 of '__sync_bool_compare_and_swap'<br>../../../llvm-gcc-4.2-trunk/libgomp/config/linux/sem.h: In function 'gomp_sem_post':<br>../../../llvm-gcc-4.2-trunk/libgomp/config/linux/sem.h:52: error: incompatible type for argument 1 of '__sync_bool_compare_and_swap'<br>In file included from ../../../llvm-gcc-4.2-trunk/libgomp/libgomp.h:51,<br>                 from ../../../llvm-gcc-4.2-trunk/libgomp/alloc.c:32:<br>../../../llvm-gcc-4.2-trunk/libgomp/config/linux/mutex.h: In function 'gomp_mutex_lock':<br>../../../llvm-gcc-4.2-trunk/libgomp/config/linux/mutex.h:47: error: incompatible type for argument 1 of '__sync_bool_compare_and_swap'<br>../../../llvm-gcc-4.2-trunk/libgomp/config/linux/mutex.h: In function 'gomp_mutex_unlock':<br>../../../llvm-gcc-4.2-trunk/libgomp/config/linux/mutex.h:54: error: incompatible type for argument 1 of '__sync_lock_test_and_set'<br><br>This seems terribly related to the other error, but I can't really tell where<br>this comes from (my gcc-fu is quite lacking in this respect).<br><br>Gr.<br><br>Matthijs<br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></div></blockquote></div><br></div></body></html>