[LLVMbugs] [Bug 6841] New: Compiling a BLAS library causes ICE if optimization is used.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 14 21:48:32 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6841
Summary: Compiling a BLAS library causes ICE if optimization is
used.
Product: tools
Version: 2.6
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: gfortran
AssignedTo: unassignedbugs at nondot.org
ReportedBy: source at sharpsteen.net
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=4682)
--> (http://llvm.org/bugs/attachment.cgi?id=4682)
Fortran source code for R BLAS library. Causes ICE when compiled by
llvm-gfortran using any optimization level other than 0.
Hello,
This bug report regards llvm-gfortran version 4.2.1
I am running OS X 10.6.3 and compiled llvm version 2.6 using the sources
provided by:
http://www.llvm.org/releases/2.6/llvm-2.6.tar.gz
I then compiled llvm-gcc from the following source:
http://www.llvm.org/releases/2.6/llvm-gcc-4.2-2.6.source.tar.gz
The output of llvm-gfortran -v is as follows:
Using built-in specs.
Target: x86_64-apple-darwin10
Configured with: ../configure
--prefix=/Users/Sharpie/opt/brew/Cellar/llvm-gcc/4.2 --program-prefix=llvm-
--enable-llvm=/Users/Sharpie/opt/brew --enable-languages=c,c++,,fortran
--with-gmp=/Users/Sharpie/opt/brew/ --with-mpfr=/Users/Sharpie/opt/brew/
--with-gxx-include-dir=/usr/include/c++/4.2.1
--with-libiconv-prefix=/Users/Sharpie/opt/brew --build=x86_64-apple-darwin10
--host=x86_64-apple-darwin10 --target=x86_64-apple-darwin10 --with-arch=nocona
--with-tune=core2
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5649) (LLVM build)
I compiled a few test benchmarks and llvm-gfortran worked with optimization
levels O1, O2, O3 and O4. I then tried to test out the new compiler by using
it to build GNU R version 2.10. 1 at which point it fails with an ICE while
compiling the BLAS library contains in the R source.
The compilation of the file blas.f fails in isolation:
llvm-gfortran -O1 -c blas.f
Assertion failed: (Operands[i]->isLoopInvariant(l) && "Operands of AddRec must
be loop-invariant!"), function SCEVAddRecExpr, file
/Users/Sharpie/source/llvm-2.6/include/llvm/Analysis/ScalarEvolutionExpressions.h,
line 371.
blas.f:7125: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/> for instructions.
Optimization levels 2 through 4 fail with identical error messages. Disabling
optimization results in a successful compilation:
llvm-gfortran -O0 -c blas.f
gfortran 4.2.1 also succeeds:
gfortran -O3 -c blas.f
The file blas.f is attached. Let me know if I can provide any other details!
-Charlie
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list