[Bug 1832132] Re: incorrect results for g++ -std=c++11 -O3 -DNDEBUG
Bradley Bell
1832132 at bugs.launchpad.net
Sat Dec 5 04:10:05 UTC 2020
It turns out it was an error in my test; see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98151
** Bug watch added: GCC Bugzilla #98151
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98151
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/1832132
Title:
incorrect results for g++ -std=c++11 -O3 -DNDEBUG
Status in gcc-defaults package in Ubuntu:
New
Bug description:
This bug report is a simplification of the following issue reported against CppAD:
https://github.com/coin-or/CppAD/issues/44
The attached file (to_string.sh) is a bash script that demonstrates
the problem.
In summary (of running to_string.sh) the following source code has a different result for ok
depending on if PRINT_BEFOR_CHECK is 0 or 1.
int max = std::numeric_limits<int>::max();
os << max;
std::string s = os.str();
int check = string2int(s);
# if PRINT_BEFORE_CHECK
std::cout << "max = " << max << ", check = " << check << "\n";
# endif
ok &= max == check;
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: g++ 4:7.4.0-1ubuntu2.2
ProcVersionSignature: Ubuntu 4.15.0-51.55-generic 4.15.18
Uname: Linux 4.15.0-51-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun Jun 9 07:58:29 2019
InstallationDate: Installed on 2018-10-24 (227 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1832132/+subscriptions
More information about the foundations-bugs
mailing list