[Bug c++/61769] const reference value is changed to random by a range-for loop

2014-07-10 Thread theemathas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61769 --- Comment #8 from theemathas at hotmail dot com --- (In reply to Jonathan Wakely from comment #7) > If you change it to: > > const int& aa = std::abs(a); > const int& foo=std::max(aa, aa); > > You'll

[Bug c++/61769] const reference value is changed to random by a range-for loop

2014-07-10 Thread theemathas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61769 --- Comment #5 from theemathas at hotmail dot com --- Created attachment 33100 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33100&action=edit "main.ii.gz" preprocessed and compressed code Since the "main.ii&quo

[Bug c++/61769] const reference value is changed to random by a range-for loop

2014-07-10 Thread theemathas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61769 theemathas at hotmail dot com changed: What|Removed |Added CC||redi at gcc dot gnu.org

[Bug c++/61769] const reference value is changed to random by a range-for loop

2014-07-10 Thread theemathas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61769 theemathas at hotmail dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug c++/61769] const reference value is changed to random by a range-for loop

2014-07-10 Thread theemathas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61769 theemathas at hotmail dot com changed: What|Removed |Added CC||theemathas at hotmail dot

[Bug c++/61769] New: const reference value is changed to random by a range-for loop

2014-07-10 Thread theemathas at hotmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: theemathas at hotmail dot com I previously thought that the g++ compiler should not contain bugs when compiling valid code without using very strange tricks. However, the bug I found can be