[Bug driver/36081] gcc optimizations and threads (pthread)

2008-05-03 Thread rguenth at gcc dot gnu dot org
--- Comment #11 from rguenth at gcc dot gnu dot org 2008-05-03 11:03 --- No it must not. If your program is bogus then it is bogus. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-05-03 Thread snes2002 at freenet dot de
--- Comment #10 from snes2002 at freenet dot de 2008-05-03 10:26 --- This is definitely a bug. The same source-code must do the same thing, no matter what optimize-options are enabled or disabled. -- snes2002 at freenet dot de changed: What|Removed

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-30 Thread snes2002 at freenet dot de
dereference the actual pointer. It seems to be cached somehow in a register and not read realtime. If there are additional exit-conditions in loops (because of speed-optimization) they won't be recognized. - original Nachricht ---- Betreff: [Bug driver/36081] gcc optimiza

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread pinskia at gcc dot gnu dot org
--- Comment #8 from pinskia at gcc dot gnu dot org 2008-04-29 19:11 --- >And for syncing the threads, that's the easiest way. Use mutexes then, they are designed exactly for this. >I don't want so serialize the threads, I want to use all 2 processors of my dual-core. You are serializi

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de
don't want so serialize the threads, I want to use all 2 processors of my dual-core. And for syncing the threads, that's the easiest way. Works fine whithout optimizations and also works with borland c++-compiler with all optimizations. - original Nachricht ---- Betreff: [B

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de
--- Comment #6 from snes2002 at freenet dot de 2008-04-29 18:59 --- This c-code works with optimizations turned off. With borland compiler it also works with optimizations turned on. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de
--- Comment #5 from snes2002 at freenet dot de 2008-04-29 18:57 --- Created an attachment (id=15550) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15550&action=view) assembler listing -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de
--- Comment #4 from snes2002 at freenet dot de 2008-04-29 18:56 --- Created an attachment (id=15549) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15549&action=view) preprocessed file -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de
--- Comment #3 from snes2002 at freenet dot de 2008-04-29 18:55 --- Created an attachment (id=15548) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15548&action=view) c source -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-04-29 18:54 --- This is correct behavior, you need either use volatile or use locks. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de
--- Comment #1 from snes2002 at freenet dot de 2008-04-29 18:54 --- Created an attachment (id=15547) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15547&action=view) gcc output -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081