Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Assertion `begin() + idx < end()` failed #16568

Closed Quuxplusone closed 6 years ago

Quuxplusone commented 11 years ago
Bugzilla Link PR16569
Status RESOLVED FIXED
Importance P normal
Reported by Bernhard Rosenkraenzer (bero@lindev.ch)
Reported on 2013-07-09 04:21:20 -0700
Last modified on 2018-08-20 14:23:13 -0700
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org, rafael@espindo.la, rnk@google.com
Fixed by commit(s)
Attachments vfpdouble-40abcb.c (224132 bytes, application/octet-stream)
vfpdouble-40abcb.sh (1487 bytes, application/octet-stream)
vfpdouble-f540ac.c (224132 bytes, application/octet-stream)
vfpdouble-f540ac.sh (1487 bytes, application/octet-stream)
Blocks
Blocked by
See also
I'm getting the following while trying to build the Nexus 10 kernel with clang
(after fixing some other issues):

  CC      arch/arm/vfp/vfpdouble.o
/opt/llvm-toolchain/bin/clang -target arm-linux-androideabi -fno-short-enums -
mfloat-abi=softfp -Wp,-MD,arch/arm/vfp/.vfpdouble.o.d -nostdinc -isystem
/opt/llvm-toolchain/bin/../lib/clang/3.4/include -I/mnt/disk/linaro-
builds/manta-4.2.2/kernel/samsung/manta/arch/arm/include -
Iarch/arm/include/generated -Iinclude -I/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/include -include /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/include/linux/kconfig.h -I/mnt/disk/linaro-
builds/manta-4.2.2/kernel/samsung/manta/arch/arm/vfp -Iarch/arm/vfp -
D__KERNEL__ -mlittle-endian -I/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/mach-exynos/include -I/mnt/disk/linaro-
builds/manta-4.2.2/kernel/samsung/manta/arch/arm/plat-s5p/include -
I/mnt/disk/linaro-builds/manta-4.2.2/kernel/samsung/manta/arch/arm/plat-
samsung/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-
aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -O2 -marm -fno-dwarf2-cfi-asm -fno-omit-frame-
pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -
D__LINUX_ARM_ARCH__=7 -march=armv7-a -mshort-load-bytes -msoft-float -Uarm -
Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fno-
omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack -mtune=cortex-a15 -fno-
pic -mno-unaligned-access -DKBUILD_STR(s)=#s -
DKBUILD_BASENAME=KBUILD_STR(vfpdouble) -DKBUILD_MODNAME=KBUILD_STR(vfp) -c -o
arch/arm/vfp/vfpdouble.o /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c -Wno-error=unknown-warning-
option -Wno-error=unused-parameter -Wno-error=gnu-static-float-init -Wno-
error=unused-private-field -Wno-error=mismatched-tags -Wno-error=ignored-
attributes -Wno-error=gnu-designator -Wno-error=gnu -Wno-error=duplicate-decl-
specifier -Wno-error=tautological-constant-out-of-range-compare -Wno-
error=unsequenced -Wno-error=return-type-c-linkage
clang: warning: argument unused during compilation: '-mlittle-endian'
clang: warning: argument unused during compilation: '-fno-delete-null-pointer-
checks'
clang: warning: argument unused during compilation: '-mapcs'
clang: warning: argument unused during compilation: '-mno-sched-prolog'
clang: warning: argument unused during compilation: '-mno-thumb-interwork'
clang: warning: argument unused during compilation: '-mshort-load-bytes'
clang: warning: argument unused during compilation: '-fconserve-stack'
clang: warning: argument unused during compilation: '-mno-unaligned-access'
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean
      '-Wno-unused-variable'? [-Wunknown-warning-option]
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:42:20: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
        : "=r" (v) : "r" (val) : "cc");
                          ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:42:20: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:42:20: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:54:33: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
            : "0" (nl), "1" (nh), "r" (ml), "r" (mh)
                                       ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:54:33: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:54:43: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
            : "0" (nl), "1" (nh), "r" (ml), "r" (mh)
                                                 ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:54:43: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:67:33: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
            : "0" (nl), "1" (nh), "r" (ml), "r" (mh)
                                       ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:67:33: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:67:43: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
            : "0" (nl), "1" (nh), "r" (ml), "r" (mh)
                                                 ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:67:43: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
                do_div(z, mh);
                ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:79:9: note:
      expanded from macro 'do_div'
                __r = __do_div_asm(n, __b);                             \
                      ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:43:10: note:
      expanded from macro '__do_div_asm'
                : "r" (__n), "r" (__base)                       \
                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:162:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:162:23: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                                  ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:169:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:177:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n), "r" (__z)       \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:177:23: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n), "r" (__z)       \
                                                  ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:177:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n), "r" (__z)       \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:177:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n), "r" (__z)       \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:186:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:186:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:186:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
                do_div(remh, mh);
                ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:79:9: note:
      expanded from macro 'do_div'
                __r = __do_div_asm(n, __b);                             \
                      ^
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:43:10: note:
      expanded from macro '__do_div_asm'
                : "r" (__n), "r" (__base)                       \
                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:162:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:162:23: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                                  ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:169:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:177:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n), "r" (__z)       \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:177:23: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n), "r" (__z)       \
                                                  ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:177:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n), "r" (__z)       \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:177:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n), "r" (__z)       \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:186:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:186:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
In file included from /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c:40:
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:138:3: warning:
      value size does not match register size specified by the constraint and
      modifier [-Wasm-operand-widths]
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/include/asm/div64.h:186:12: note:
      expanded from macro 'do_div'
                                : "r" (__m), "r" (__n)                  \
                                       ^
clang: /mnt/disk/repos/toolchain-build-
llvm/llvm/include/llvm/ADT/SmallVector.h:144: const_reference
llvm::SmallVectorTemplateCommon<llvm::MCOperand, void>::operator[](unsigned
int) const [T = llvm::MCOperand]: Assertion `begin() + idx < end()' failed.
0  libLLVM-3.4svn.so 0x00002aaaab6b42c5 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1  libLLVM-3.4svn.so 0x00002aaaab6b47b3
2  libpthread.so.0   0x00002aaaac57e050
3  libc.so.6         0x00002aaaac7c0e67 gsignal + 55
4  libc.so.6         0x00002aaaac7c44c8 abort + 328
5  libc.so.6         0x00002aaaac7b9cb3
6  libc.so.6         0x00002aaaac7b9d62
7  libLLVM-3.4svn.so 0x00002aaaab20934b
llvm::ARMInstPrinter::printSBitModifierOperand(llvm::MCInst const*, unsigned
int, llvm::raw_ostream&) + 107
8  libLLVM-3.4svn.so 0x00002aaaab2051ca
llvm::ARMInstPrinter::printInstruction(llvm::MCInst const*, llvm::raw_ostream&)
+ 554
9  libLLVM-3.4svn.so 0x00002aaaab211630
llvm::ARMInstPrinter::printInst(llvm::MCInst const*, llvm::raw_ostream&,
llvm::StringRef) + 4096
10 libLLVM-3.4svn.so 0x00002aaaab09fd3e
11 libLLVM-3.4svn.so 0x00002aaaabc0daef
12 libLLVM-3.4svn.so 0x00002aaaab3b5c6b llvm::AsmPrinter::EmitFunctionBody() +
3963
13 libLLVM-3.4svn.so 0x00002aaaabbffcd7
14 libLLVM-3.4svn.so 0x00002aaaab54da8d
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 125
15 libLLVM-3.4svn.so 0x00002aaaab1df9ec
llvm::FPPassManager::runOnFunction(llvm::Function&) + 364
16 libLLVM-3.4svn.so 0x00002aaaab1dfc6b
llvm::FPPassManager::runOnModule(llvm::Module&) + 59
17 libLLVM-3.4svn.so 0x00002aaaab1dffbe
llvm::MPPassManager::runOnModule(llvm::Module&) + 430
18 libLLVM-3.4svn.so 0x00002aaaab1e065b
llvm::PassManagerImpl::run(llvm::Module&) + 539
19 libLLVM-3.4svn.so 0x00002aaaab1e07ca llvm::PassManager::run(llvm::Module&) +
10
20 clang             0x00000000006df857
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 6151
21 clang             0x00000000006dd423
22 clang             0x00000000008353a3 clang::ParseAST(clang::Sema&, bool,
bool) + 515
23 clang             0x00000000006dc832 clang::CodeGenAction::ExecuteAction() +
530
24 clang             0x00000000005690a1 clang::FrontendAction::Execute() + 113
25 clang             0x0000000000548e5d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 957
26 clang             0x000000000052fc8c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3820
27 clang             0x000000000052676a cc1_main(char const**, char const**,
char const*, void*) + 778
28 clang             0x000000000052cb8a main + 7530
29 libc.so.6         0x00002aaaac7acc35 __libc_start_main + 245
30 clang             0x0000000000526391
Stack dump:
0.      Program arguments: /opt/llvm-toolchain/bin/clang -cc1 -triple armv7--
linux-androideabi -S -disable-free -main-file-name vfpdouble.c -mrelocation-
model static -mdisable-fp-elim -relaxed-aliasing -mdisable-tail-calls -fmath-
errno -mconstructor-aliases -fuse-init-array -target-abi aapcs-linux -target-
cpu cortex-a8 -msoft-float -mfloat-abi soft -target-feature +soft-float -target-
feature +soft-float-abi -target-feature -neon -target-linker-version
2.23.52.0.2.20130423 -g -coverage-file /tmp/vfpdouble-1ab64a.s -nostdsysteminc -
nobuiltininc -resource-dir /opt/llvm-toolchain/bin/../lib/clang/3.4 -dependency-
file arch/arm/vfp/.vfpdouble.o.d -MT arch/arm/vfp/vfpdouble.o -sys-header-deps -
isystem /opt/llvm-toolchain/bin/../lib/clang/3.4/include -include
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/include/linux/kconfig.h -D __KERNEL__ -D
__LINUX_ARM_ARCH__=7 -U arm -D KBUILD_STR(s)=#s -D
KBUILD_BASENAME=KBUILD_STR(vfpdouble) -D KBUILD_MODNAME=KBUILD_STR(vfp) -I
/mnt/disk/linaro-builds/manta-4.2.2/kernel/samsung/manta/arch/arm/include -I
arch/arm/include/generated -I include -I /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/include -I /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp -I arch/arm/vfp -I /mnt/disk/linaro-
builds/manta-4.2.2/kernel/samsung/manta/arch/arm/mach-exynos/include -I
/mnt/disk/linaro-builds/manta-4.2.2/kernel/samsung/manta/arch/arm/plat-
s5p/include -I /mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/plat-samsung/include -O2 -Wall -Wundef -
Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-
format-security -Wno-unused-but-set-variable -Wdeclaration-after-statement -Wno-
pointer-sign -Wno-error=unknown-warning-option -Wno-error=unused-parameter -Wno-
error=gnu-static-float-init -Wno-error=unused-private-field -Wno-
error=mismatched-tags -Wno-error=ignored-attributes -Wno-error=gnu-designator -
Wno-error=gnu -Wno-error=duplicate-decl-specifier -Wno-error=tautological-
constant-out-of-range-compare -Wno-error=unsequenced -Wno-error=return-type-c-
linkage -fno-dwarf2-cfi-asm -fno-dwarf-directory-asm -fdebug-compilation-dir
/mnt/disk/linaro-builds/manta-4.2.2/out/target/product/manta/obj/kernel -ferror-
limit 19 -fmessage-length 80 -fwrapv -mstackrealign -fno-signed-char -fobjc-
runtime=gcc -fobjc-default-synthesize-properties -fno-common -fdiagnostics-show-
option -fcolor-diagnostics -vectorize-loops -o /tmp/vfpdouble-1ab64a.s -x c
/mnt/disk/linaro-builds/manta-4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '/mnt/disk/linaro-
builds/manta-4.2.2/kernel/samsung/manta/arch/arm/vfp/vfpdouble.c'.
4.      Running pass 'ARM Assembly / Object Emitter' on function
'@vfp_double_fdiv'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (trunk 185768)
Target: arm--linux-androideabi
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/vfpdouble-40abcb.c
clang: note: diagnostic msg: /tmp/vfpdouble-40abcb.sh
clang: note: diagnostic msg:

********************
make[3]: *** [arch/arm/vfp/vfpdouble.o] Error 254
make[2]: *** [arch/arm/vfp] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta'
make: *** [android_kernel] Error 2
[bero@localhost manta-4.2.2]$ sh /tmp/vfpdouble-40abcb.sh
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean
      '-Wno-unused-variable'? [-Wunknown-warning-option]
error: error reading 'vfpdouble-40abcb.c'
1 warning and 1 error generated.

The same problem does not happen when running vfpdouble-40abcb.sh - instead, I
get
/mnt/disk/linaro-builds/manta-
4.2.2/kernel/samsung/manta/arch/arm/vfp/vfp.h:124:3: error:
      implicit declaration of function 'do_div' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
                do_div(z, mh);
                ^

Apparently the header defininig the do_div macro is being kicked out by the
preprocessor?
Quuxplusone commented 11 years ago
If I move stuff around in the code a little, making sure the header defining
do_div is included before the first header trying to invoke it, the problem
becomes reproducible with the generated /tmp/vfpdouble* files.
Quuxplusone commented 11 years ago

Attached vfpdouble-40abcb.c (224132 bytes, application/octet-stream): vfpdouble-40abcb.c

Quuxplusone commented 11 years ago

Attached vfpdouble-f540ac.c (224132 bytes, application/octet-stream): vfpdouble-f540ac.c

Quuxplusone commented 11 years ago

Attached vfpdouble-40abcb.sh (1487 bytes, application/octet-stream): vfpdouble-40abcb.sh

Quuxplusone commented 11 years ago

Attached vfpdouble-f540ac.sh (1487 bytes, application/octet-stream): vfpdouble-f540ac.sh

Quuxplusone commented 6 years ago

The pre-processed source compiles today.