This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/82496] New: Optimization breaks duration_cast
- From: "jeff.benshetler at stackpath dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 Oct 2017 16:57:03 +0000
- Subject: [Bug c++/82496] New: Optimization breaks duration_cast
- Auto-submitted: auto-generated
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