|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction |
Date: | Tue, 28 Aug 2018 17:01:02 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 |
Follow-up Comment #22, bug #54572 (project octave): The second sample code from comment #16 works for me regardless of optimization level. I'm attaching a modified version of the original called tst-overflow.rik.cc. It fails for me at the addition operator. ~/code/cppsrc: g++ -O2 --std=c++11 int-overflow.rik.cc ~/code/cppsrc: a.out -9223372036854775808 + -2 branch 1: -9223372036854775808 + -2 TMP START 9223372036854775807 + 1 9223372036854775807 TMP END 9223372036854775807 ~/code/cppsrc: g++ -O1 --std=c++11 int-overflow.rik.cc -o a.out2 ~/code/cppsrc: a.out2 -9223372036854775808 + -2 branch 1: -9223372036854775808 + -2 TMP START 9223372036854775807 + 1 -9223372036854775808 TMP END -9223372036854775808 (file #44892) _______________________________________________________ Additional Item Attachment: File name: int-overflow.rik.cc Size:6 KB _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?54572> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |