GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works

2015-01-06 Thread Paul Smith
Hi all. It's possible my code is doing something illegal, but it's also possible I've found a problem with -O3 optimization in GCC 4.9.2. I've built this same code with GCC 4.8.2 -O3 on GNU/Linux and it works fine. It also works with GCC 4.9.2 with lower -O (-O2 for example). When I try a build

Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works

2015-01-06 Thread Markus Trippelsdorf
On 2015.01.06 at 03:18 -0500, Paul Smith wrote: > Hi all. It's possible my code is doing something illegal, but it's also > possible I've found a problem with -O3 optimization in GCC 4.9.2. I've > built this same code with GCC 4.8.2 -O3 on GNU/Linux and it works fine. > It also works with GCC 4.9

Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works

2015-01-06 Thread Jakub Jelinek
On Tue, Jan 06, 2015 at 03:18:48AM -0500, Paul Smith wrote: > Hi all. It's possible my code is doing something illegal, but it's also > possible I've found a problem with -O3 optimization in GCC 4.9.2. I've > built this same code with GCC 4.8.2 -O3 on GNU/Linux and it works fine. > It also works

Bad link on gcc.gnu.org front page

2015-01-06 Thread tomaspartl
  Hello! There's a link to "GCC5" right on top of the News section on the home page of gcc.gnu.org that takes me to a 403 forbidden access page: https://gcc.gnu.org/gcc-5/ . I think it's a bug.   Bye! Tomas  

Re: Bad link on gcc.gnu.org front page

2015-01-06 Thread Jonathan Wakely
On 6 January 2015 at 09:34, wrote: > > Hello! > There's a link to "GCC5" right on top of the News section on the home page of > gcc.gnu.org that takes me to a 403 forbidden access page: > https://gcc.gnu.org/gcc-5/ . > I think it's a bug. Yes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64469

Re: Bad link on gcc.gnu.org front page

2015-01-06 Thread Jakub Jelinek
On Tue, Jan 06, 2015 at 10:27:29AM +, Jonathan Wakely wrote: > On 6 January 2015 at 09:34, wrote: > > > > Hello! > > There's a link to "GCC5" right on top of the News section on the home page > > of gcc.gnu.org that takes me to a 403 forbidden access page: > > https://gcc.gnu.org/gcc-5/ . >

Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works

2015-01-06 Thread Paul Smith
On Tue, 2015-01-06 at 09:43 +0100, Jakub Jelinek wrote: > On Tue, Jan 06, 2015 at 03:18:48AM -0500, Paul Smith wrote: > > Hi all. It's possible my code is doing something illegal, but it's also > > possible I've found a problem with -O3 optimization in GCC 4.9.2. I've > > built this same code wit

Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works

2015-01-06 Thread Jakub Jelinek
On Tue, Jan 06, 2015 at 08:50:58AM -0500, Paul Smith wrote: > On Tue, 2015-01-06 at 09:43 +0100, Jakub Jelinek wrote: > > On Tue, Jan 06, 2015 at 03:18:48AM -0500, Paul Smith wrote: > > > Hi all. It's possible my code is doing something illegal, but it's also > > > possible I've found a problem wi

Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works

2015-01-06 Thread Paul Smith
On Tue, 2015-01-06 at 09:43 +0100, Jakub Jelinek wrote: > GCC trunk -fsanitize=undefined (in particular > -fsanitize=nonnull-attribute) > diagnoses it: > /tmp/mystring.cpp:103:26: runtime error: null pointer passed as > argument 2, which is declared to never be null Unfortunately adding -fsanitize

Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works

2015-01-06 Thread Marek Polacek
On Tue, Jan 06, 2015 at 11:28:52AM -0500, Paul Smith wrote: > On Tue, 2015-01-06 at 09:43 +0100, Jakub Jelinek wrote: > > GCC trunk -fsanitize=undefined (in particular > > -fsanitize=nonnull-attribute) > > diagnoses it: > > /tmp/mystring.cpp:103:26: runtime error: null pointer passed as > > argumen