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] Optimization breaks duration_cast


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

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