[cfe-dev] mpfr 3.1.0 vs clang 3.0svn

Jack Howarth howarth at bromo.med.uc.edu
Sat Oct 15 12:59:18 PDT 2011


On Fri, Oct 14, 2011 at 06:17:48PM -0700, Eric Christopher wrote:
> > 
> >   I'll see if I can get the mpfr developer to attempt to create a test case from his code.
> > So far, the only insight I have is that the issue is entirely suppressed if clang builds
> > mpfr 3.1.0 at -O0. This is required for both the libmpfr shared library build as well as
> > the test cases linked against it. Using -O1 triggers the testsuite failures. Interestingly
> > the exact test cases that fail and the way they crash seems to vary with the optimization
> > level (ie -O1 crashes the test cases differently than -O2). This does seem to suggest a
> > devtool bug. The mpfr author has seen a similar issues with other compilers...
> > 
> > http://www.loria.fr/~zimmerma/software/compilerbugs.html
> > 
> >                       Jack
> > ps As I mentioned before this problem doesn't exist with clang svn under x86_64 Fedora 15
> > so it appears to be entirely darwin11 specific.
> 
> That sounds totally reasonable. It could be a bug anywhere really :)
> 
> Thanks!
> 
> -eric

Eric,
    I uploaded darwin11_clang_tls_bug2.tar.bz2 to radar Problem ID: 10291355,"Xcode 4.2 miscompiles tls support in MPFR 3.1.0".
The new tarball provides an additional 11 testcases which fail when compiled at -O2 but not -O0 with clang's tls support.
Hopefully these will provide enough context to identify the origin of the problem and exhaustively test any fix.
         Jack



More information about the cfe-dev mailing list