[LLVMbugs] [Bug 14988] New: r171325 & r172363 caused a failure with self-hosting LTO

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 17 13:38:05 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=14988

             Bug #: 14988
           Summary: r171325 & r172363 caused a failure with self-hosting
                    LTO
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: wendling at apple.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Okay, here's how to reproduce the problem:

1) Build a Release (or Release+Asserts) version of clang in the normal way.

2) Using the clang & clang++ binaries from (1), build a Release (or
  Release+Asserts) version of the same sources, but this time enable LTO ---
  specify the `-flto' flag on the command line.

3) Run the ARC migrator tests:

   $ arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x
objective-c++ ./src/tools/clang/test/ARCMT/cxx-rewrite.mm

You'll see that the output isn't correct (the whitespace is off).

The mis-compile is in the function `RewriteBuffer::RemoveText' in the
clang/lib/Rewrite/Core/Rewriter.cpp file. When that function and
RewriteRope.cpp
are compiled with LTO and the `arcmt-test' executable is regenerated, you'll
see
the error. When those files are not LTO'ed, then the output of the `arcmt-test'
is fine.

>From what I could tell, it looks like GVN.cpp is getting something wrong.

It is *really* hard to get a testcase out of this. I have some files attached
that should help, though:

* Rewriter.1.cpp: The Rewriter.cpp file without `RewriteBuffer::RemoveText'
* Rewriter.2.cpp: The `RewriteBuffer::RemoveText' function
* good.ll: The output of the "bad" function before GVN processes it.
* bad.ll: The output of the "bad" function after GVN processes it.
* b.sh: The script I used to test this (it will need to be heavily modified for
your use).

-- 
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