Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483806 - sys-devel/llvm-9999 USE=clang with =sys-devel/clang-9999-r100 - fatal error: error in backend: Cannot select: 0x1ca97d0: i32 = sign_extend
Summary: sys-devel/llvm-9999 USE=clang with =sys-devel/clang-9999-r100 - fatal error: ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Clang Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-06 01:07 UTC by rafael castillo
Modified: 2015-09-03 13:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rafael castillo 2013-09-06 01:07:13 UTC
my useflags:

[ebuild   R   *] sys-devel/llvm-9999:0/9999  USE="clang gold libffi python static-analyzer -debug -doc -multitarget -ocaml {-test} -udis86" PYTHON_TARGETS="pypy2_0 python2_7 -python2_6 (-pypy1_9%) (-python2_5%)" VIDEO_CARDS="radeon" 0 kB
[ebuild  N    *] sys-devel/clang-9999-r100:0/9999  USE="python static-analyzer -debug -multitarget" 0 kB

emerge llvm-9999 clang-9999-r100 that since some days ago force +clang for build give this error:

fatal error: error in backend: Cannot select: 0x1ca97d0: i32 = sign_extend 0x1caabe0 [ORD=39] [ID=26]
  0x1caabe0: i64,ch,glue = CopyFromReg 0x1ca7690, 0x1ca6b90, 0x1ca7690:1 [ORD=38] [ID=25]
    0x1ca6b90: i64 = Register %RAX [ID=8]
    0x1ca7690: ch,glue = callseq_end 0x1ca8ed0, 0x1caa7e0, 0x1caa7e0, 0x1ca8ed0:1 [ORD=38] [ID=24]
      0x1caa7e0: i64 = TargetConstant<0> [ID=2]
      0x1caa7e0: i64 = TargetConstant<0> [ID=2]
      0x1ca8ed0: ch,glue = X86ISD::CALL 0x1caa1e0, 0x1ca6d90, 0x1cac9b0, 0x1caaae0, 0x1caa6e0, 0x1caa1e0:1 [ORD=38] [ID=23]
        0x1ca6d90: i64 = TargetGlobalAddress<i8* ()* @llvm.eh.sjlj.lsda.i64> 0 [TF=6] [ORD=36] [ID=6]
        0x1cac9b0: i64 = Register %RDI [ID=4]
        0x1caaae0: i32 = Register %ESI [ID=5]
        0x1caa6e0: Untyped = RegisterMask [ID=7]
        0x1caa1e0: ch,glue = CopyToReg 0x1ca6e90, 0x1caaae0, 0x1ca98d0, 0x1ca6e90:1 [ORD=38] [ID=22]
          0x1caaae0: i32 = Register %ESI [ID=5]
          0x1ca98d0: i32 = Constant<1> [ID=3]
          0x1ca6e90: ch,glue = CopyToReg 0x1ca6c90, 0x1cac9b0, 0x1ca6890 [ORD=38] [ID=21]
            0x1cac9b0: i64 = Register %RDI [ID=4]
            0x1ca6890: i64 = Constant<4503599627370496> [ID=9]
In function: __adddf3
  COMPILE:   clang_linux/full-x86_64/x86_64: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashldi3.c
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/bin/clang -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m64 --sysroot=/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/SDKs/linux -c -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/ashldi3.o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashldi3.c
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 3.4 (trunk)
Target: x86_64-pc-linux-gnu
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.
  COMPILE:   clang_linux/full-x86_64/x86_64: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashlti3.c
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/bin/clang -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m64 --sysroot=/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/SDKs/linux -c -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/ashlti3.o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashlti3.c
fatal error: error in backend: Cannot select: 0x28d2090: i32 = sign_extend 0x28d55e0 [ORD=37] [ID=26]
  0x28d55e0: i64,ch,glue = CopyFromReg 0x28d43d0, 0x28d1f90, 0x28d43d0:1 [ORD=36] [ID=25]
    0x28d1f90: i64 = Register %RAX [ID=8]
    0x28d43d0: ch,glue = callseq_end 0x28d5ce0, 0x28d57e0, 0x28d57e0, 0x28d5ce0:1 [ORD=36] [ID=24]
      0x28d57e0: i64 = TargetConstant<0> [ID=2]
      0x28d57e0: i64 = TargetConstant<0> [ID=2]
      0x28d5ce0: ch,glue = X86ISD::CALL 0x28d45d0, 0x28d1a90, 0x28d5ee0, 0x28d5be0, 0x28d51e0, 0x28d45d0:1 [ORD=36] [ID=23]
        0x28d1a90: i64 = TargetGlobalAddress<i8* ()* @llvm.eh.sjlj.lsda.i32> 0 [TF=6] [ORD=34] [ID=6]
        0x28d5ee0: i32 = Register %EDI [ID=4]
        0x28d5be0: i32 = Register %ESI [ID=5]
        0x28d51e0: Untyped = RegisterMask [ID=7]
        0x28d45d0: ch,glue = CopyToReg 0x28d2290, 0x28d5be0, 0x28d47d0, 0x28d2290:1 [ORD=36] [ID=22]
          0x28d5be0: i32 = Register %ESI [ID=5]
          0x28d47d0: i32 = Constant<1> [ID=3]
          0x28d2290: ch,glue = CopyToReg 0x28d52e0, 0x28d5ee0, 0x28d2190 [ORD=36] [ID=21]
            0x28d5ee0: i32 = Register %EDI [ID=4]
            0x28d2190: i32 = Constant<8388608> [ID=9]
In function: __addsf3
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 3.4 (trunk)
Target: x86_64-pc-linux-gnu
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: /var/tmp/portage/sys-devel/llvm-9999/temp/addsf3-c86e59.c
clang: note: diagnostic msg: /var/tmp/portage/sys-devel/llvm-9999/temp/addsf3-c86e59.sh
clang: note: diagnostic msg: 

********************
make[5]: *** [/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/addsf3.o] Error 70
make[5]: *** Waiting for unfinished jobs....
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: /var/tmp/portage/sys-devel/llvm-9999/temp/adddf3-6a306d.c
clang: note: diagnostic msg: /var/tmp/portage/sys-devel/llvm-9999/temp/adddf3-6a306d.sh
clang: note: diagnostic msg: 

********************
make[5]: *** [/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/adddf3.o] Error 70
  COMPILE:   clang_linux/full-x86_64/x86_64: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashrdi3.c
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/bin/clang -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m64 --sysroot=/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/SDKs/linux -c -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/ashrdi3.o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashrdi3.c
make[5]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt'
make[4]: *** [BuildRuntimeLibraries] Error 2
rm /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/lib/clang/3.4/lib/linux/.dir
make[4]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools'

Reproducible: Always

Steps to Reproduce:
1.emerge llvm clang
2.bang
3.boom
Actual Results:  
fatal error: error in backend: Cannot select: 0x1ca97d0: i32 = sign_extend 0x1caabe0 [ORD=39] [ID=26]
  0x1caabe0: i64,ch,glue = CopyFromReg 0x1ca7690, 0x1ca6b90, 0x1ca7690:1 [ORD=38] [ID=25]
    0x1ca6b90: i64 = Register %RAX [ID=8]
    0x1ca7690: ch,glue = callseq_end 0x1ca8ed0, 0x1caa7e0, 0x1caa7e0, 0x1ca8ed0:1 [ORD=38] [ID=24]
      0x1caa7e0: i64 = TargetConstant<0> [ID=2]
      0x1caa7e0: i64 = TargetConstant<0> [ID=2]
      0x1ca8ed0: ch,glue = X86ISD::CALL 0x1caa1e0, 0x1ca6d90, 0x1cac9b0, 0x1caaae0, 0x1caa6e0, 0x1caa1e0:1 [ORD=38] [ID=23]
        0x1ca6d90: i64 = TargetGlobalAddress<i8* ()* @llvm.eh.sjlj.lsda.i64> 0 [TF=6] [ORD=36] [ID=6]
        0x1cac9b0: i64 = Register %RDI [ID=4]
        0x1caaae0: i32 = Register %ESI [ID=5]
        0x1caa6e0: Untyped = RegisterMask [ID=7]
        0x1caa1e0: ch,glue = CopyToReg 0x1ca6e90, 0x1caaae0, 0x1ca98d0, 0x1ca6e90:1 [ORD=38] [ID=22]
          0x1caaae0: i32 = Register %ESI [ID=5]
          0x1ca98d0: i32 = Constant<1> [ID=3]
          0x1ca6e90: ch,glue = CopyToReg 0x1ca6c90, 0x1cac9b0, 0x1ca6890 [ORD=38] [ID=21]
            0x1cac9b0: i64 = Register %RDI [ID=4]
            0x1ca6890: i64 = Constant<4503599627370496> [ID=9]
In function: __adddf3
  COMPILE:   clang_linux/full-x86_64/x86_64: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashldi3.c
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/bin/clang -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m64 --sysroot=/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/SDKs/linux -c -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/ashldi3.o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashldi3.c
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 3.4 (trunk)
Target: x86_64-pc-linux-gnu
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.
  COMPILE:   clang_linux/full-x86_64/x86_64: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashlti3.c
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/bin/clang -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m64 --sysroot=/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/SDKs/linux -c -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/ashlti3.o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashlti3.c
fatal error: error in backend: Cannot select: 0x28d2090: i32 = sign_extend 0x28d55e0 [ORD=37] [ID=26]
  0x28d55e0: i64,ch,glue = CopyFromReg 0x28d43d0, 0x28d1f90, 0x28d43d0:1 [ORD=36] [ID=25]
    0x28d1f90: i64 = Register %RAX [ID=8]
    0x28d43d0: ch,glue = callseq_end 0x28d5ce0, 0x28d57e0, 0x28d57e0, 0x28d5ce0:1 [ORD=36] [ID=24]
      0x28d57e0: i64 = TargetConstant<0> [ID=2]
      0x28d57e0: i64 = TargetConstant<0> [ID=2]
      0x28d5ce0: ch,glue = X86ISD::CALL 0x28d45d0, 0x28d1a90, 0x28d5ee0, 0x28d5be0, 0x28d51e0, 0x28d45d0:1 [ORD=36] [ID=23]
        0x28d1a90: i64 = TargetGlobalAddress<i8* ()* @llvm.eh.sjlj.lsda.i32> 0 [TF=6] [ORD=34] [ID=6]
        0x28d5ee0: i32 = Register %EDI [ID=4]
        0x28d5be0: i32 = Register %ESI [ID=5]
        0x28d51e0: Untyped = RegisterMask [ID=7]
        0x28d45d0: ch,glue = CopyToReg 0x28d2290, 0x28d5be0, 0x28d47d0, 0x28d2290:1 [ORD=36] [ID=22]
          0x28d5be0: i32 = Register %ESI [ID=5]
          0x28d47d0: i32 = Constant<1> [ID=3]
          0x28d2290: ch,glue = CopyToReg 0x28d52e0, 0x28d5ee0, 0x28d2190 [ORD=36] [ID=21]
            0x28d5ee0: i32 = Register %EDI [ID=4]
            0x28d2190: i32 = Constant<8388608> [ID=9]
In function: __addsf3
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 3.4 (trunk)
Target: x86_64-pc-linux-gnu
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: /var/tmp/portage/sys-devel/llvm-9999/temp/addsf3-c86e59.c
clang: note: diagnostic msg: /var/tmp/portage/sys-devel/llvm-9999/temp/addsf3-c86e59.sh
clang: note: diagnostic msg: 

********************
make[5]: *** [/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/addsf3.o] Error 70
make[5]: *** Waiting for unfinished jobs....
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: /var/tmp/portage/sys-devel/llvm-9999/temp/adddf3-6a306d.c
clang: note: diagnostic msg: /var/tmp/portage/sys-devel/llvm-9999/temp/adddf3-6a306d.sh
clang: note: diagnostic msg: 

********************
make[5]: *** [/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/adddf3.o] Error 70
  COMPILE:   clang_linux/full-x86_64/x86_64: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashrdi3.c
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/bin/clang -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m64 --sysroot=/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/SDKs/linux -c -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/ashrdi3.o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/ashrdi3.c
make[5]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt'
make[4]: *** [BuildRuntimeLibraries] Error 2
rm /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/lib/clang/3.4/lib/linux/.dir
make[4]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang/runtime'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools'

Expected Results:  
build 

if i modify the llvm-9999 and remove all clang coincidences from everywhere compiles just fine and works as much a mesa care, not sure if clang and libclc works tho, since i don't use opencl part of mesa yet
Comment 1 Bernard Cafarelli gentoo-dev 2015-09-03 13:51:42 UTC
Cleaning old llvm/clang ebuilds, as this was about a problem in live ebuild 2 years ago.

Don't hesitate to reopen if you still have this problem!