This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/36081] gcc optimizations and threads (pthread)
- From: "snes2002 at freenet dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Apr 2008 19:06:08 -0000
- Subject: [Bug driver/36081] gcc optimizations and threads (pthread)
- References: <bug-36081-16127@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from snes2002 at freenet dot de 2008-04-29 19:06 -------
Subject: Re: gcc optimizations and threads (pthread)
thanks for the quick reply.
But this code works without opimizations. Even with complex constructs.
For the solution of my problem i can't use lock's.
I 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: [Bug driver/36081] gcc optimizations and threads (pthread)
Gesendet: Di 29 Apr 2008 20:55:20 CEST
Von: "pinskia at gcc dot gnu dot org"<gcc-bugzilla@gcc.gnu.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
> ----------------------------------------------------------------------------
>
> Status|UNCONFIRMED |RESOLVED
> Resolution| |INVALID
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
--- original Nachricht Ende ----
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081