From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19574 invoked by alias); 28 Nov 2011 14:22:47 -0000 Received: (qmail 19560 invoked by uid 22791); 28 Nov 2011 14:22:46 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Nov 2011 14:22:34 +0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/51296] Several 30_threads tests FAIL on Tru64 UNIX Date: Mon, 28 Nov 2011 14:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg02654.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51296 --- Comment #15 from Jonathan Wakely 2011-11-28 14:22:24 UTC --- (In reply to comment #14) > > --- Comment #13 from Jonathan Wakely 2011-11-26 15:18:40 UTC --- > > Does this reduced test work with -std=gnu++11 -pthread ? > > Unfortunately not, I still get > > 22 : Invalid argument IMHO it's fortunate since it's not just problem in the std::mutex code ;) > Only if I add an explicit call to pthread_mutex_init does the testcase > work. Very strange, especially since the definitions you gave in comment 9 don't seem to do anything complicated. Does this work? #include #include #include struct M { pthread_mutex_t m; M() noexcept { pthread_mutex_t tmp = PTHREAD_MUTEX_INITIALIZER; m = tmp; } }; int main() { M m; int e = pthread_mutex_lock(&m.m); if (e) printf("%d : %s\n", e, strerror(e)); return e; } If that works, we might be able to fix it using fixincludes (similar to PR 50982 comment 32) Otherwise I suppose we must not define __GTHREAD_MUTEX_INIT on Tru64, causing std::mutex to use the init function instead.