llvm-gcc 4.2 building failed on x86-64

Current llvm-gcc 4.2 building failed on X86-64, here is the dump information:

xgcc -B/home/zsth/projects/llvm.org/build/cfe4.2obj/./prev-gcc/ -B/home/zsth/projects/llvm.org/install/x86_64-unknown-linux-gnu/bin/ -I…/…/…/cfe4.2/libcpp -I. -I…/…/…/cfe4.2/libcpp/…/include -I…/…/…/cfe4.2/libcpp/include -DENABLE_LLVM -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -I…/…/…/cfe4.2/libcpp -I. -I…/…/…/cfe4.2/libcpp/…/include -I…/…/…/cfe4.2/libcpp/include -DENABLE_LLVM -c -o directives.o -MT directives.o -MMD -MP -MF .deps/directives.Po …/…/…/cfe4.2/libcpp/directives.c
…/…/…/cfe4.2/libcpp/directives.c: In function ‘do_pragma’:
…/…/…/cfe4.2/libcpp/directives.c:1376: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:[http://developer.apple.com/bugreporter](http://developer.apple.com/bugreporter) for instructions

Any ideas?

My gcc version:
gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: …/gcc-4.0.4/configure --prefix=/home/toolman/gcc4.0.4-x86_64 --enable-languages=c,c++ --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.0.4

Thanks,
Sheng.

Hi Sheng

Current llvm-gcc 4.2 building failed on X86-64, here is the dump

I am not followng head closely but may it be that the current head still
doesn't support amd64 proper:

gcc README.LLVM:
"When targeting non-darwin X86-64/AMD-64/EM64-T, configure with
--disable-shared. The LLVM X86-64 backend doesn't support PIC codegen on
non-darwin systems yet. If you get a build error, try configuring with
--disable-multilib."

Best regards
ST

I encountered this bug intermittently using llvm Release, but cannot reproduce it when using llvm Debug. But the failure occurs inside of llvm.

Consequently, your suggestion won't work.

Also, the build is broken on x86_64 because somehow references to alloca() turned into an unresolved extern.

-scooter

Hi Sheng,

If you’re still seeing this, try getting a .ll file from the code and then running bugpoint on it. If you’re unable to get the .ll file (it still crashes when using -S -emit-llvm), then try running “delta” on the pre-processed file. See this webpage for details on how to run delta:

http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction

This will at least give us a starting point. :slight_smile:

-bw