[Bug c++/61597] Unexpected behavior at runtime
adrien.hamelin+gcc at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 25 08:22:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Adrien Hamelin <adrien.hamelin+gcc at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #33000|0 |1
is obsolete| |
--- Comment #8 from Adrien Hamelin <adrien.hamelin+gcc at gmail dot com> ---
Created attachment 33002
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33002&action=edit
Preprocessed file
Effectively the problem can be showed with much less code lines. I just did a
custom iterator to show the problem (and removed my own array).
The problem comes from line 45. If the function takes a copy, it does not work
but if it takes a reference and do the copy inside (as shown line 52) it does
work.
Once again it works fine with Visual 2013.
The new code : http://coliru.stacked-crooked.com/a/e33afe532e7f1e55
More information about the Gcc-bugs
mailing list