I am getting an assertion firing while building TOT llvm-gcc on Cygwin in libgcc2.c :- /home/ang/build/llvm-gcc/./gcc/xgcc -B/home/ang/build/llvm-gcc/./gcc/ -B/home/an g/llvm-gcc/i686-pc-cygwin/bin/ -B/home/ang/llvm-gcc/i686-pc-cygwin/lib/ -isystem /home/ang/llvm-gcc/i686-pc-cygwin/include -isystem /home/ang/llvm-gcc/i686-pc-c ygwin/sys-include -O2 -I/home/ang/svn/llvm-gcc/gcc/../winsup/w32api/include -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prot otypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -D__GCC_FLO AT_NOT_NEEDED -I. -I. -I/home/ang/svn/llvm-gcc/gcc -I/home/ang/svn/llvm-gcc/gcc /. -I/home/ang/svn/llvm-gcc/gcc/../include -I/home/ang/svn/llvm-gcc/gcc/../libcp p/include -I/home/ang/svn/llvm-gcc/gcc/../libdecnumber -I../libdecnumber -I/hom e/ang/build/llvm/include -I/home/ang/svn/llvm/include -DL_powixf2 -c /home/ang/s vn/llvm-gcc/gcc/libgcc2.c -o libgcc/./_powixf2.o assertion "(!TYPE_SIZE(Tr) || !Ty->isSized() || !isInt64(TYPE_SIZE(Tr), true) || getInt64(TYPE_SIZE(Tr), true) =getTargetData().getTypeAllocSizeInBits(Ty)) && "LLVM type size doesn't match GCC type size!"" failed: file "/home/ang/svn/llvm -gcc/gcc/llvm-types.cpp", line 83 This assertion has not changed from the past and am not sure what is causing this. If someone more familiar with the code could have a look at this please. Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100108/9faffc34/attachment.html>
Hi Aaron,> assertion "(!TYPE_SIZE(Tr) || !Ty->isSized() || !isInt64(TYPE_SIZE(Tr), > true) || > getInt64(TYPE_SIZE(Tr), true) == > getTargetData().getTypeAllocSizeInBits(Ty)) && > "LLVM type size doesn't match GCC type size!"" failed: file > "/home/ang/svn/llvm > -gcc/gcc/llvm-types.cpp", line 83 > > This assertion has not changed from the past and am not sure what is > causing this.this means that gcc and llvm disagree about how big a type is. It is probably caused by llvm thinking long double has size 12 (or 16), while cygwin gcc thinks it is 16 (or 12). Ciao, Duncan.
2010/1/10 Aaron Gray <aaronngray.lists at googlemail.com>> 2010/1/10 Duncan Sands <baldrick at free.fr> > > Hi Aaron, >> >> >> Thanks, okay heres the results :- >>> >>> LLVM type size doesn't match GCC type size! >>> >>> <real_type 0x7ff80b40 long double sizes-gimplified XF size <integer_cst >>> 0x7ff010e0 type <integer_type 0x7ff80060 bit_size_type> constant invariant >>> 96> >>> unit size <integer_cst 0x7ff01100 type <integer_type 0x7ff80000 >>> unsigned int> constant invariant 12> >>> align 32 symtab 0 alias set -1 precision 80 >>> pointer_to_this <pointer_type 0x7ff80c60>> >>> >> >> as I thought, it's a problem with long double. GCC thinks it is 12 bytes >> long, LLVM presumably thinks it is 16 bytes long [in reality long double >> is 10 bytes long, but here sizes include alignment, and different OS's >> choose different alignments for it]. >> >> Does the following fix it for you? >> >> Index: X86Subtarget.h >> ==================================================================>> --- X86Subtarget.h (revision 93111) >> +++ X86Subtarget.h (working copy) >> @@ -169,7 +169,7 @@ >> p = "e-p:64:64-s:64-f64:64:64-i64:64:64-f80:128:128-n8:16:32:64"; >> else if (isTargetDarwin()) >> p = "e-p:32:32-f64:32:64-i64:32:64-f80:128:128-n8:16:32"; >> - else if (isTargetCygMing() || isTargetWindows()) >> + else if (isTargetWindows()) >> p = "e-p:32:32-f64:64:64-i64:64:64-f80:128:128-n8:16:32"; >> else >> p = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"; >> > > Yep ! Thanks a lot Duncan, obviously not doing my job properly. > > http://llvm.org/viewvc/llvm-project?view=rev&revision=91745 > * > * > "Bump alignment requirements for windows targets to achieve compartibility > with vcpp. Based on patch by Michael Beck!" > > Looks like there is an issue to resolve here. As Cygwin will never be VC++ > compatible its probably not a good idea to change Cygwin's DataLayout as > well as Ming's. >Now, I am getting another regression in stage 2 configure :- "checking whether the C compiler works... configure: error: cannot run C compiled programs." This one is strange, I have had it before but cannot remember what the cause is as it was along time ago. Its odd as xgcc was used to compile libgcc, and prev-gcc/xgcc compiles and executes a test c program, yet stage 2's configure is failing. Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100110/75ee0ef9/attachment.html>
Hi Aaron,> Now, I am getting another regression in stage 2 configure :- > > "checking whether the C compiler works... configure: error: cannot > run C compiled programs."check config.log to see what happened - probably the compiler crashed. Ciao, Duncan.
Reasonably Related Threads
- [LLVMdev] llvm-gcc 4.2 assertion failed on linux x86_64
- [LLVMdev] llvm-gcc 4.2 assertion failed on linux x86_64
- [LLVMdev] llvm-gcc 4.2 assertion failed on linux x86_64
- [LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
- [LLVMdev] trying to build llvm-gcc in linux/amd64