This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/82496] 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 17:01:05 +0000
- Subject: [Bug c++/82496] Optimization breaks duration_cast
- Auto-submitted: auto-generated
- References: <bug-82496-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82496
Jeff Benshetler <jeff.benshetler at stackpath dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jeff.benshetler at stackpath dot c
| |om
--- Comment #1 from Jeff Benshetler <jeff.benshetler at stackpath dot com> ---
Created attachment 42332
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42332&action=edit
Preprocessed file that triggers the bug.
When compiled without optimization and run, running the executable produces the
following correct output:
deltaT=2.00275
When compiled with any level of optimization (-O1 or greater), running the
executable produces the following erroneous output:
deltaT=0