This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66603] using std::cout causes segfault with unrelated array declaration


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66603

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to gunney1 from comment #3)
> Because of the effects of the stream insertion.  But maybe I don't
> understand very well their relationship.

First, I guess it does not crash with icpc because icpc optimizes by default.
g++ -O also optimizes 'a' away.

Simply mentioning a huge stack array does not produce the crash. The issue is
when something (anything, in this case placing the arguments for the function
call) tries to use the stack after that array (outside of the stack, since the
array is so large).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]