* 64 bit g++ 5.4.0 bug @ 2017-07-12 13:12 Takashi Yano 2017-07-12 13:33 ` Takashi Yano 0 siblings, 1 reply; 2+ messages in thread From: Takashi Yano @ 2017-07-12 13:12 UTC (permalink / raw) To: cygwin Hello. I have encountered a weird behaviour of g++ compiler. If the following code is compiled with -ansi -O flags, the resulting executable causes core dump. This is caused only in 64 bit environment. In 32 bit environment, it works as expected. $ cat str.cc #include <string> int main() { std::string s; s = "ABC"; return 0; } $ g++ -ansi -O str.cc -o str $ ./str Abort (core dumped) $ Is this known problem? My environment is as follows. uname -a CYGWIN_NT-10.0 Express5800-S70 2.8.1(0.312/5/3) 2017-07-03 14:11 x86_64 Cygwin g++ --version g++ (GCC) 5.4.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Thank you in advance. -- Takashi Yano <takashi.yano@nifty.ne.jp> -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 64 bit g++ 5.4.0 bug 2017-07-12 13:12 64 bit g++ 5.4.0 bug Takashi Yano @ 2017-07-12 13:33 ` Takashi Yano 0 siblings, 0 replies; 2+ messages in thread From: Takashi Yano @ 2017-07-12 13:33 UTC (permalink / raw) To: cygwin I have confirmed this problem disappears in Cygwin 2.8.2-1. Thanks. On Wed, 12 Jul 2017 22:12:12 +0900 Takashi Yano <takashi.yano@nifty.ne.jp> wrote: > Hello. > > I have encountered a weird behaviour of g++ compiler. > > If the following code is compiled with -ansi -O flags, > the resulting executable causes core dump. > > This is caused only in 64 bit environment. In 32 bit > environment, it works as expected. > > $ cat str.cc > #include <string> > int main() > { > std::string s; > s = "ABC"; > return 0; > } > $ g++ -ansi -O str.cc -o str > $ ./str > Abort (core dumped) > $ > > Is this known problem? > > My environment is as follows. > > uname -a > CYGWIN_NT-10.0 Express5800-S70 2.8.1(0.312/5/3) 2017-07-03 14:11 x86_64 Cygwin > > g++ --version > g++ (GCC) 5.4.0 > Copyright (C) 2015 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > Thank you in advance. > > -- > Takashi Yano <takashi.yano@nifty.ne.jp> > > -- > Problem reports: http://cygwin.com/problems.html > FAQ: http://cygwin.com/faq/ > Documentation: http://cygwin.com/docs.html > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > -- Takashi Yano <takashi.yano@nifty.ne.jp> -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-12 13:33 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-07-12 13:12 64 bit g++ 5.4.0 bug Takashi Yano 2017-07-12 13:33 ` Takashi Yano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).