New issue
Advanced search Search tips

Issue 640650 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Clang dies with "Module contains invalid debug info" with constexpr global variable

Project Member Reported by sdy@chromium.org, Aug 24 2016

Issue description

This code:

    template <int I>
    constexpr int some_int() {
      return I;
    }
    
    constexpr auto five = some_int<5>;
    
    int main() {
      return five();
    }

Makes our clang throw an assertion:

    Assertion failed: (!V->hasBrokenDebugInfo() && "Module contains invalid debug info"), function doFinalization, file /b/build/slave/mac_upload_clang/build/src/third_party/llvm/lib/IR/Verifier.cpp, line 4435.

When run like this:

    ~/src/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++ -gdwarf-2 -std=c++11 invalid_debug_info_test.cc

Attached is the error output and the two files it references.
 
clang_stderr.txt
2.4 KB View Download
invalid_global_variable_ref-dc8c95.cpp
181 bytes View Download
invalid_global_variable_ref-dc8c95.sh
2.2 KB View Download

Comment 1 by thakis@chromium.org, Aug 24 2016

Still happens at trunk; filed https://llvm.org/bugs/show_bug.cgi?id=29122

Sign in to add a comment