https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86143

            Bug ID: 86143
           Summary: ICE capturing constexpr chrono duration
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aaron at aarongraham dot com
  Target Milestone: ---

The following test, compiled via 'g++ -c test.cc':

  #include <chrono>
  #include <thread>
  using namespace std::chrono_literals;
  extern void set_duration(std::chrono::nanoseconds);

  int main() {
    constexpr auto dur = 1ms;
    std::thread([]{ set_duration(dur); }).join();
  }

Result:
during RTL pass: expand
test.cc: In lambda function:
test.cc:9:32: internal compiler error: in make_decl_rtl, at varasm.c:1322
   std::thread([]{ set_duration(dur); }).join();
                                ^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

Compiler built for ARM (arm-unknown-linux-gnueabi)

Reply via email to