This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/82496] New: Optimization breaks duration_cast


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

            Bug ID: 82496
           Summary: Optimization breaks duration_cast
           Product: gcc
           Version: 6.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jeff.benshetler at stackpath dot com
  Target Milestone: ---

Created attachment 42331
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42331&action=edit
Compiler output

duration_cast always returns zero when using any level of optimization.
duration_cast works properly when compiled without optimization

GCC Version: g++ (GCC) 6.3.0

System Type: Darwin Jeffs-MacBook-Pro.local 16.7.0 Darwin Kernel Version
16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
x86_64

Options when GCC was configured/built:
/Users/jbenshetler/build/gcc/objdir/../gcc-6.3.0/configure
--prefix=/opt/gcc-6.3.0 --enable-languages=c,c++,for    tran --disable-multilib

Exact command line passed to gcc triggering the bug: g++ -O1 -o
duration_cast_error -v -save-temps duration_cast_error.cpp 2>
duration_cast_error.log

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]