[Bug c++/45940] [trans-mem] Error of unsafe function even if annotated

patrick.marlier at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 25 10:02:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45940

--- Comment #6 from Patrick Marlier <patrick.marlier at gmail dot com> 2010-11-25 09:57:32 UTC ---
Created attachment 22526
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22526
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 ‘int
atomic_exchange_and_add(int*, int)’ within ‘transaction_safe’ function

With -O1, ICE in expand_block_tm().

gcc -Wall -c -O1 -fgnu-tm unsafe.cpp -o unsafe
unsafe.cpp: In function ‘int main()’:
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 <http://gcc.gnu.org/bugs.html> for instructions.

Vincent, please reopen the bug and in the bug description set version to
"trans-mem" (easier to find it).

Patrick Marlier.



More information about the Gcc-bugs mailing list