[Bug c/42126] gcc optimizes line away/optimizes to an endless loop

2009-11-21 Thread codemasterhs at yahoo dot de
--- Comment #5 from codemasterhs at yahoo dot de 2009-11-21 09:02 --- (In reply to comment #4) > The pointer is not declared volatile. > > static struct smpMsg_t * volatile freeList; > > would be a volatile pointer. > Ok, this worked. So where has to be the volatile keyword, so that

[Bug c/42126] gcc optimizes line away/optimizes to an endless loop

2009-11-20 Thread rguenth at gcc dot gnu dot org
--- Comment #4 from rguenth at gcc dot gnu dot org 2009-11-20 23:53 --- The pointer is not declared volatile. static struct smpMsg_t * volatile freeList; would be a volatile pointer. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added

[Bug c/42126] gcc optimizes line away/optimizes to an endless loop

2009-11-20 Thread codemasterhs at yahoo dot de
--- Comment #3 from codemasterhs at yahoo dot de 2009-11-20 22:50 --- (In reply to comment #2) > Neither freeList nor serviceMsg are volatile. Thus freeList can never change > and serviceMsg = msg is a dead assignment. > But they are, or is my syntax wrong? static volatile struct smp

[Bug c/42126] gcc optimizes line away/optimizes to an endless loop

2009-11-20 Thread schwab at linux-m68k dot org
--- Comment #2 from schwab at linux-m68k dot org 2009-11-20 22:45 --- Neither freeList nor serviceMsg are volatile. Thus freeList can never change and serviceMsg = msg is a dead assignment. -- schwab at linux-m68k dot org changed: What|Removed |Ad

[Bug c/42126] gcc optimizes line away/optimizes to an endless loop

2009-11-20 Thread codemasterhs at yahoo dot de
--- Comment #1 from codemasterhs at yahoo dot de 2009-11-20 22:28 --- Created an attachment (id=19070) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19070&action=view) the out from gcc with -v -save-temps -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42126