From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15085 invoked by alias); 25 Nov 2010 09:58:23 -0000 Received: (qmail 15038 invoked by uid 22791); 25 Nov 2010 09:58:17 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Thu, 25 Nov 2010 09:58:00 +0000 From: "patrick.marlier at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/45940] [trans-mem] Error of unsafe function even if annotated X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: trans-mem X-Bugzilla-Severity: normal X-Bugzilla-Who: patrick.marlier at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: aldyh 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" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Thu, 25 Nov 2010 10:02:00 -0000 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: 2010-11/txt/msg03088.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D45940 --- Comment #6 from Patrick Marlier 2010= -11-25 09:57:32 UTC --- Created attachment 22526 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D22526 another testcase It seems not completely solved. Here a another testcase. With -O0, it complains about unsafe function even if annotated as transaction_pure. gcc -Wall -c -O0 -fgnu-tm unsafe.cpp -o unsafe unsafe.cpp:38:54: error: unsafe function call =E2=80=98int atomic_exchange_and_add(int*, int)=E2=80=99 within =E2=80=98transaction_saf= e=E2=80=99 function With -O1, ICE in expand_block_tm(). gcc -Wall -c -O1 -fgnu-tm unsafe.cpp -o unsafe unsafe.cpp: In function =E2=80=98int main()=E2=80=99: unsafe.cpp:73:5: internal compiler error: in expand_block_tm, at trans-mem.c:2254 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Vincent, please reopen the bug and in the bug description set version to "trans-mem" (easier to find it). Patrick Marlier.