[Bug tree-optimization/59267] gcc 4.8.2 optimizes code with side-effects away

2013-11-25 Thread troomps01 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59267 --- Comment #3 from James --- Sorry about having a second comment in a row, but I was playing a bit more with this, and using a string stream as solely an output stream doesn't appear to update the stream pointer after outputting the value (should

[Bug tree-optimization/59267] gcc 4.8.2 optimizes code with side-effects away

2013-11-24 Thread troomps01 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59267 --- Comment #2 from James --- If that is the case, then I am also getting interesting behavior in another place. Once I read a value from the stream, the current location in said stream should be updated, correct? With the following program: #inc

[Bug tree-optimization/59267] gcc 4.8.2 optimizes code with side-effects away

2013-11-23 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59267 --- Comment #1 from Andrew Pinski --- I think you forgot to go back in the stream so is.str() returns the string from the current location. That is the stream current location is at the end of the input string and you should go back to start of t