[llvm-commits] [llvm-gcc-4.2] r54240 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Mon P Wang
wangmp at apple.com
Thu Jul 31 21:31:27 PDT 2008
Hi,
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
if (TREE_CODE (type) != POINTER_TYPE)
goto incompatible;
type = TREE_TYPE (type);
if (!INTEGRAL_TYPE_P (type) && !POINTER_TYPE_P (type))
goto incompatible;
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
if (!INTEGRAL_TYPE_P (type))
if (!POINTER_TYPE_P (type))
goto incompatible;
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 r54261. If the
linux build still doesn't work, please let me know.
Thanks,
-- Mon Ping
On Jul 31, 2008, at 5:20 AM, Matthijs Kooijman wrote:
> Hi Mon Ping,
>
>> I'm currently testing the one-line change above, if it works I'll
>> commit it.
> The fix worked to fix the problem at hand (I can now succesfully do
> stage1 and
> stage2), but compilation breaks in stage3.
>
> I get the following error:
>
> /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
> In file included from ../../../llvm-gcc-4.2-trunk/libgomp/libgomp.h:
> 50,
> from ../../../llvm-gcc-4.2-trunk/libgomp/alloc.c:32:
> ../../../llvm-gcc-4.2-trunk/libgomp/config/linux/sem.h: In function
> 'gomp_sem_wait':
> ../../../llvm-gcc-4.2-trunk/libgomp/config/linux/sem.h:45: error:
> incompatible type for argument 1 of '__sync_bool_compare_and_swap'
> ../../../llvm-gcc-4.2-trunk/libgomp/config/linux/sem.h: In function
> 'gomp_sem_post':
> ../../../llvm-gcc-4.2-trunk/libgomp/config/linux/sem.h:52: error:
> incompatible type for argument 1 of '__sync_bool_compare_and_swap'
> In file included from ../../../llvm-gcc-4.2-trunk/libgomp/libgomp.h:
> 51,
> from ../../../llvm-gcc-4.2-trunk/libgomp/alloc.c:32:
> ../../../llvm-gcc-4.2-trunk/libgomp/config/linux/mutex.h: In
> function 'gomp_mutex_lock':
> ../../../llvm-gcc-4.2-trunk/libgomp/config/linux/mutex.h:47: error:
> incompatible type for argument 1 of '__sync_bool_compare_and_swap'
> ../../../llvm-gcc-4.2-trunk/libgomp/config/linux/mutex.h: In
> function 'gomp_mutex_unlock':
> ../../../llvm-gcc-4.2-trunk/libgomp/config/linux/mutex.h:54: error:
> incompatible type for argument 1 of '__sync_lock_test_and_set'
>
> This seems terribly related to the other error, but I can't really
> tell where
> this comes from (my gcc-fu is quite lacking in this respect).
>
> Gr.
>
> Matthijs
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080731/160b80d7/attachment.html>
More information about the llvm-commits
mailing list