BZ #183: make check fails with clang (3.0) + optimizations

Status fields:

creation_ts:2013-03-13 21:19
component:unspecified
version:unspecified
rep_platform:All
op_sys:Linux
bug_status:RESOLVED
resolution:INVALID
reporter:zapster@complang.tuwien.ac.at
make check fails if cacao is configured with CC=clang CXX=clang++ on Ubuntu 12.04
(precise). Steps to reproduce:

On a (fresh) Ubuntu 12.04 install clang and all other dependencies. Build and install
GNU classpath (gcc). Configure cacao as follows:

$ clang --version
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

$ CC=clang CXX=clang++ ../configure --prefix=$HOME/cacao/install/cacao --with-java-
runtime-library-prefix=$CLASSPATHPREFIX

$ make
$ make check

(error.log attached)

However if --disable-optimizations is added everything is fine.

$ CC=clang CXX=clang++ ../configure --prefix=$HOME/cacao/install/cacao --with-java-
runtime-library-prefix=$CLASSPATHPREFIX --disable-optimizations

Also tried other clang version (>3.0) on Ubuntu with the same result. Had no problems
with clang 2.9 on Debian.

Comment #1 by zapster@complang.tuwien.ac.at on 2013-03-13 21:20:38

Created an attachment (id=83)
make check error log

Comment #2 by zapster@complang.tuwien.ac.at on 2013-08-22 15:20:08

Update: It seems that the problem is cause by some optimization applied to
src/vm/jit/builtin.cpp (and src/vm/jit/builtintable.inc). If this file is compiled with
-O0 everything is fine. Further investigation is required...

Comment #3 by zapster@complang.tuwien.ac.at on 2013-08-24 11:10:40

Another update: the issue does not occur when using the current trunk version of
clang/llvm. The question is due to a bug fixed in clang/llvm or by accident which would
imply that there is still a bug CACAO.

Comment #4 by zapster@complang.tuwien.ac.at on 2014-01-28 16:12:24

The issue does not occur in clang/llvm 3.4. Lets assume it was an llvm bug and close
this one.

Attachment id=83

date:2013-03-13 21:20
desc:make check error log
type:text/x-log
download:error.log