[Bug c/84563] GCC interpretation of C11 atomics (DR 459)

2018-02-27 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84563 torvald at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution

[Bug c/84563] GCC interpretation of C11 atomics (DR 459)

2018-02-27 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84563 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug target/70490] __atomic_load_n(const __int128 *, ...) generates CMPXCHG16B with no warning

2018-02-27 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70490 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug target/80640] Missing memory side effect with __atomic_thread_fence (2)

2017-10-20 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80640 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug middle-end/26461] liveness of thread local references across function calls

2017-03-31 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26461 --- Comment #15 from torvald at gcc dot gnu.org --- From a ISO C/C++ conformance perspective, this is not a bug: * Pre-C11/C++11, threading was basically undefined. * Starting with C11 and C++11, "threads of execution" (as they're c

[Bug sanitizer/78158] Strange data race detection with thread sanitizer

2017-03-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78158 --- Comment #19 from torvald at gcc dot gnu.org --- (In reply to Dmitry Vyukov from comment #8) > We need to modify tsan runtime to ignore (zero) __ATOMIC_HLE_ACQUIRE/RELEASE > bits, right? It's only an optimization and we can p

[Bug tree-optimization/53991] _mm_popcnt_u64 fails with -O3 -fgnu-tm

2016-09-22 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53991 --- Comment #12 from torvald at gcc dot gnu.org --- Thanks for reporting that you are affected as well. Regarding your question about bumping the priority, one problem for the TM support in general has been to be able to judge how many users

[Bug libgcc/71744] Concurrently throwing exceptions is not scalable

2016-09-14 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71744 --- Comment #28 from torvald at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #20) > (In reply to Gleb Natapov from comment #19) > > (In reply to Jakub Jelinek from comment #18) > > > (In reply to Gleb Natapo

[Bug libgcc/71744] Concurrently throwing exceptions is not scalable

2016-09-14 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71744 --- Comment #21 from torvald at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #17) > (In reply to torvald from comment #15) > > > Similarly, the 64 recursive locks in libc, again, significant amount of > > > mem

[Bug libgcc/71744] Concurrently throwing exceptions is not scalable

2016-09-14 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71744 --- Comment #15 from torvald at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #14) > Looking at that patchset, I just want to say that the use of TLS in libgcc > is very much undesirable, it affects every program even when not

[Bug libstdc++/65033] C++11 atomics: is_lock_free result does not always match the real lock-free property

2016-08-03 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65033 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug libstdc++/71133] msp430-elf -mlarge FTBFS in libstdc++-v3

2016-05-17 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71133 --- Comment #2 from torvald at gcc dot gnu.org --- I think it's easiest to disable the TM support on less-than-32b targets.

[Bug middle-end/70638] transaction_wrap: too strict compatibility check and transaction_pure wrappers fail to wrap

2016-04-13 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70638 --- Comment #3 from torvald at gcc dot gnu.org --- (In reply to Hillel Avni from comment #2) > On gcc-linaro-4.9-2014.11, I must declare the wrapper as pure. But using that version the wrapper was indeed used and not the original funct

[Bug middle-end/70638] transaction_wrap: too strict compatibility check and transaction_pure wrappers fail to wrap

2016-04-12 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70638 --- Comment #1 from torvald at gcc dot gnu.org --- Created attachment 38244 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38244=edit test case

[Bug middle-end/70638] New: transaction_wrap: too strict compatibility check and transaction_pure wrappers fail to wrap

2016-04-12 Thread torvald at gcc dot gnu.org
Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: torvald at gcc dot gnu.org Target Milestone: --- The attached test case shows two issues with transaction_wrap: 1) If the original function

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 torvald at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution

[Bug c/59218] atomic transactions: accesses to volatiles not disallowed in transaction_safe code

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59218 torvald at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution

[Bug c++/63472] transaction_atomic within while loop causes ICE

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63472 torvald at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution

[Bug c++/60908] compiler bug related to trans-mem.c

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60908 torvald at gcc dot gnu.org changed: What|Removed |Added CC||spear at cse dot lehigh.edu

[Bug c++/63550] Multiple definition errors occur only with -fgnu-tm

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63550 --- Comment #2 from torvald at gcc dot gnu.org --- Created attachment 37422 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37422=edit Test case part 2/3

[Bug libitm/69018] libitm/testsuite/libitm.c++/c++.exp: libstdc++ include paths don't work if tests set options

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69018 torvald at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 Status

[Bug c++/60908] compiler bug related to trans-mem.c

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60908 --- Comment #4 from torvald at gcc dot gnu.org --- Still happens with r232693.

[Bug c++/63550] Multiple definition errors occur only with -fgnu-tm

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63550 --- Comment #3 from torvald at gcc dot gnu.org --- Created attachment 37423 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37423=edit Test case part 3/3

[Bug tree-optimization/53991] _mm_popcnt_u64 fails with -O3 -fgnu-tm

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53991 --- Comment #9 from torvald at gcc dot gnu.org --- Still fails with r232693. This seems to be another case of difficult ordering between TM passes and other passes. It makes sense that we don't inline tm_pure because we must not loose

[Bug c/57855] passing unsafe function as transaction_safe function pointer does not generate error

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57855 torvald at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 Status

[Bug c++/63550] Multiple definition errors occur only with -fgnu-tm

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63550 --- Comment #1 from torvald at gcc dot gnu.org --- Created attachment 37421 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37421=edit Test case part 1/3

[Bug middle-end/57348] [TM] ICE for transaction expression in gimplify_expr

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57348 torvald at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution

[Bug c++/63550] Multiple definition errors occur only with -fgnu-tm

2016-01-21 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63550 torvald at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed

[Bug libstdc++/69310] [6 Regression] Revision r232454 breaks bootstrap on x86_64-apple-darwin15

2016-01-20 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310 --- Comment #14 from torvald at gcc dot gnu.org --- Author: torvald Date: Wed Jan 20 17:47:03 2016 New Revision: 232628 URL: https://gcc.gnu.org/viewcvs?rev=232628=gcc=rev Log: libstdc++: Darwin does not support weak refs without definition

[Bug libstdc++/69310] [6 Regression] Revision r232454 breaks bootstrap on x86_64-apple-darwin15

2016-01-20 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310 torvald at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution

[Bug libstdc++/69310] [6 Regression] Revision r232454 breaks bootstrap on x86_64-apple-darwin15

2016-01-20 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310 --- Comment #11 from torvald at gcc dot gnu.org --- (In reply to Jack Howarth from comment #10) > It is unclear if the changes in r232454, to avoid the explicit linkage on > libitm, can ever be made darwin-friendly. On darwin, every

[Bug libstdc++/69310] [6 Regression] Revision r232454 breaks bootstrap on x86_64-apple-darwin15

2016-01-19 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310 --- Comment #7 from torvald at gcc dot gnu.org --- Does this patch fix the issue on Darwin? https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01452.html

[Bug libstdc++/69310] [6 Regression] Revision r232454 breaks bootstrap on x86_64-apple-darwin15

2016-01-19 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310 --- Comment #6 from torvald at gcc dot gnu.org --- (In reply to Jack Howarth from comment #5) > (In reply to torvald from comment #4) > > > See https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01203.html > > (Not linked to this bu

[Bug bootstrap/69312] [6 Regression] libstdc++ unconditionally refers to TM symbols

2016-01-19 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69312 torvald at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution

[Bug bootstrap/69310] [6 Regression] Revision r232454 breaks bootstrap on x86_64-apple-darwin15

2016-01-16 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310 --- Comment #2 from torvald at gcc dot gnu.org --- (In reply to İsmail Dönmez from comment #1) > r232454 also breaks bootstrap for mingw-w64: > > libtool: compile: x86_64-w64-mingw32-c++ > -L/havana/mingw-w64-6.0.0/x86_64-w64-ming

[Bug middle-end/61199] [trans-mem] _cxa_free_exception is not transaction safe

2016-01-16 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61199 torvald at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |6.0

[Bug middle-end/61199] [trans-mem] _cxa_free_exception is not transaction safe

2016-01-16 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61199 torvald at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution

[Bug bootstrap/69310] [6 Regression] Revision r232454 breaks bootstrap on x86_64-apple-darwin15

2016-01-16 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310 --- Comment #4 from torvald at gcc dot gnu.org --- (In reply to İsmail Dönmez from comment #3) > (In reply to torvald from comment #2) > > (In reply to İsmail Dönmez from comment #1) > > > r232454 also breaks boots

[Bug libitm/69018] New: libitm/testsuite/libitm.c++/c++.exp: libstdc++ include paths don't work if tests set options

2015-12-22 Thread torvald at gcc dot gnu.org
Severity: normal Priority: P3 Component: libitm Assignee: unassigned at gcc dot gnu.org Reporter: torvald at gcc dot gnu.org Target Milestone: --- If a tests sets an option (eg, // { dg-options "-fgnu-tm" }), then the include paths for C++ std h

[Bug libstdc++/68921] [5/6 Regression] std::future::wait() makes invalid futex calls and spins

2015-12-15 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68921 --- Comment #3 from torvald at gcc dot gnu.org --- LGTM, thanks. Would be nice to backport this.

[Bug libitm/68591] trans-mem: missing transactional read in transaction when using -O1

2015-12-15 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68591 --- Comment #3 from torvald at gcc dot gnu.org --- This might be related to bug 68616.

[Bug middle-end/68616] miscompilation in multi-threaded code

2015-12-01 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68616 --- Comment #2 from torvald at gcc dot gnu.org --- I basically don't know anything about IPA, so I'll just assume that by "barrier" you mean conditions prohibiting transformations. I'm also not sure whether just CSE is a problem her

[Bug middle-end/68122] ICE in gcc/toplev.c:353 with -fsanitize=undefined and -fgnu-tm

2015-12-01 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68122 --- Comment #11 from torvald at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #10) > There are lots of internal functions in GCC 6 (older versions had fewer). > Many of them are ECF_CONST, which is also treated like txn_pure,

[Bug middle-end/68122] ICE in gcc/toplev.c:353 with -fsanitize=undefined and -fgnu-tm

2015-12-01 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68122 --- Comment #9 from torvald at gcc dot gnu.org --- Marek, just skipping handling of internal functions is not correct I think. In the worst case, it should treat them as txn-unsafe, unless they are considered txn-pure. Do we have some idea

[Bug other/68616] New: miscompilation in multi-threaded code

2015-11-30 Thread torvald at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: torvald at gcc dot gnu.org Target Milestone: --- Created attachment 36871 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36871=edit test case In the attached case, the compiler seems to assume that in main_thread, ptr st

[Bug libitm/68591] trans-mem: missing transactional read in transaction when using -O1

2015-11-27 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68591 torvald at gcc dot gnu.org changed: What|Removed |Added CC||rth at gcc dot gnu.org

[Bug libitm/68591] New: trans-mem: missing transactional read in transaction when using -O1

2015-11-27 Thread torvald at gcc dot gnu.org
Priority: P3 Component: libitm Assignee: unassigned at gcc dot gnu.org Reporter: torvald at gcc dot gnu.org Target Milestone: --- Created attachment 36860 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36860=edit test case The attached test c

[Bug libitm/66453] In a deadlock libitm allocates all available RAM until oom is called

2015-11-26 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66453 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug libitm/66453] In a deadlock libitm allocates all available RAM until oom is called

2015-11-26 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66453 torvald at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution

[Bug target/67281] HTM builtins aren't treated as compiler barriers on powerpc

2015-08-23 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67281 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-06 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-05-01 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #49 from torvald at gcc dot gnu.org --- (In reply to James Greenhalgh from comment #43) (In reply to torvald from comment #37) (In reply to James Greenhalgh from comment #35) So by the strict letter of the specification

[Bug libstdc++/51617] [C++0x] async(f) isn't.

2015-04-27 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51617 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-04-17 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #38 from torvald at gcc dot gnu.org --- (In reply to Andrew Macleod from comment #34) However, I guess some people relying on data races in their programs could (mis?)understand the __sync_lock_release semantics to mean

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-04-17 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #37 from torvald at gcc dot gnu.org --- (In reply to James Greenhalgh from comment #35) (In reply to torvald from comment #32) (In reply to James Greenhalgh from comment #28) This also gives us an easier route to fixing any

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-04-16 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #32 from torvald at gcc dot gnu.org --- (In reply to James Greenhalgh from comment #28) (In reply to torvald from comment #24) 3) We could do something just on ARM (and scan other arcs for similar issues). That's perhaps

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-04-15 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #21 from torvald at gcc dot gnu.org --- (In reply to Andrew Haley from comment #20) (In reply to mwahab from comment #19) (In reply to Andrew Haley from comment #18) It looks inconsistent with C11 S7.17.7.4-2 (C++11 S29.6.4-21

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-04-15 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #22 from torvald at gcc dot gnu.org --- (In reply to James Greenhalgh from comment #12) There are two problems here, one of which concerns me more in the real world, and both of which rely on races if you are in the C/C++11 model

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-04-15 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #24 from torvald at gcc dot gnu.org --- I think we need to at least clarify the documentation of __atomic, probably also of __sync; we might also have to change the implementation of __sync builtins on some archs. First, I think

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-04-09 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #6 from torvald at gcc dot gnu.org --- (In reply to torvald from comment #5) (In reply to Matthew Wahab from comment #0) while a __sync full barrier should block all movement (https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync

[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-04-09 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #5 from torvald at gcc dot gnu.org --- (In reply to Matthew Wahab from comment #0) The __sync builtins are implemented by expanding them to the equivalent __atomic builtins, using MEMMODEL_SEQ_CST for those that are full barriers

[Bug testsuite/64930] [5 regression] FAIL: gcc.target/powerpc/atomic-p7.c scan-assembler-times isync 12

2015-02-12 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64930 --- Comment #12 from torvald at gcc dot gnu.org --- (In reply to Alan Modra from comment #9) My point was that if you write a testcase that specifically tests for consume and get acquire code then that is a fail. The code generated is using

[Bug testsuite/64930] [5 regression] FAIL: gcc.target/powerpc/atomic-p7.c scan-assembler-times isync 12

2015-02-11 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64930 --- Comment #5 from torvald at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #3) Created attachment 34731 [details] gcc5-pr64930.patch Thus I'm proposing this untested patch. I think expecting the consume-to-acquire promotion

[Bug c++/63472] transaction_atomic within while loop causes ICE

2015-01-30 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63472 --- Comment #6 from torvald at gcc dot gnu.org --- (In reply to ak from comment #4) copy_bbs: (illegal code due to goto into transaction?) g_56[]; fn1() { int *p_79; if (g_56[7]) __transaction_atomic { lbl_196

[Bug libitm/61594] ICE (assertion failure) in trans-mem.c

2015-01-26 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61594 --- Comment #6 from torvald at gcc dot gnu.org --- We can keep it open, but my guess is that it would need some volunteer to actively drive the backporting process. I.e., with a patch and testing. Given that TM is experimental, I think

[Bug libitm/52482] libitm INVALID MNEMONIC in .S (powerpc asm)

2015-01-26 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52482 --- Comment #11 from torvald at gcc dot gnu.org --- Thanks for confirming. However, that fails before libitm, for which you should file a separate bug report. Thanks.

[Bug libitm/61594] ICE (assertion failure) in trans-mem.c

2015-01-26 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61594 torvald at gcc dot gnu.org changed: What|Removed |Added Version|5.0 |4.9.1 --- Comment #7 from

[Bug libitm/52482] libitm INVALID MNEMONIC in .S (powerpc asm)

2015-01-23 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52482 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug libitm/61594] ICE (assertion failure) in trans-mem.c

2015-01-23 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61594 torvald at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC

[Bug libitm/52695] libitm/config/x86/cacheline.h: '__m64' does not name a type

2015-01-23 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52695 --- Comment #8 from torvald at gcc dot gnu.org --- Can this bug be closed? It sounds as if this has been fixed in 4.8 already; given that TM is experimental, backporting the fix is probably not worth it.

[Bug libitm/56801] Internal Compiler Error when compiling relaxed transaction

2015-01-23 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56801 torvald at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC

[Bug libitm/53113] Build fails in x86_avx.cc if AVX disabled by -mno-avx but supported by as

2015-01-23 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53113 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-10-30 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #21 from torvald at gcc dot gnu.org --- (In reply to torvald from comment #17) (In reply to Andrew Macleod from comment #15) So have we concluded that we should promote memory_order_consume to memory_order_acquire for now? I

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-10-29 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #20 from torvald at gcc dot gnu.org --- (In reply to jos...@codesourcery.com from comment #19) * carries_dependency is about increasing optimization, not decreasing it. If it affects when barriers are added, it does so by allowing

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-10-28 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #17 from torvald at gcc dot gnu.org --- (In reply to Andrew Macleod from comment #15) So have we concluded that we should promote memory_order_consume to memory_order_acquire for now? I also think that this is the best way

[Bug ipa/61393] [trans-mem] O3 optimization level constant propagation problem

2014-08-06 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61393 --- Comment #9 from torvald at gcc dot gnu.org --- Alex, can you confirm that this is fixed?

[Bug middle-end/61199] New: [trans-mem] _cxa_free_exception is not transaction safe

2014-05-16 Thread torvald at gcc dot gnu.org
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: torvald at gcc dot gnu.org Created attachment 32804 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32804action=edit test case See attached test case. I'm not quite sure how we need

[Bug middle-end/61199] [trans-mem] _cxa_free_exception is not transaction safe

2014-05-16 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61199 torvald at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed

[Bug c++/60272] atomic::compare_exchange_weak has spurious store and can cause race conditions

2014-02-19 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60272 --- Comment #2 from torvald at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #1) So, either we'd need to change this function, so that it sets oldval to NULL_RTX first, and passes ..., oldval, mem, expected, ... and needs to also

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-02-17 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #12 from torvald at gcc dot gnu.org --- (In reply to algrant from comment #11) Where do you get that this is racy if the access to data is not atomic? In threadB(), you do: f = flag.load(std::memory_order_consume

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-01-23 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 torvald at gcc dot gnu.org changed: What|Removed |Added CC||rth at gcc dot gnu.org

[Bug c/59218] New: atomic transactions: accesses to volatiles not disallowed in transaction_safe code

2013-11-20 Thread torvald at gcc dot gnu.org
Severity: minor Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: torvald at gcc dot gnu.org CC: aldyh at gcc dot gnu.org Accesses to volatiles are disallowed in transaction-safe code. The following should produce an error

[Bug c/59218] atomic transactions: accesses to volatiles not disallowed in transaction_safe code

2013-11-20 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59218 torvald at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4

[Bug libitm/57643] libitm.c/reentrant.c hangs on POWER8 with HTM

2013-06-19 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57643 torvald at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed

[Bug tree-optimization/53991] _mm_popcnt_u64 fails with -O3 -fgnu-tm

2013-05-21 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53991 --- Comment #7 from torvald at gcc dot gnu.org --- A piece of code is tm_pure if, roughly, it doesn't need any instrumentation (e.g., in contrast to memory loads/stores). In the test case, I suppose that the compiler detects that it is tm_pure

[Bug c++/56419] New: [4.8 regression] transactions in for-loops disappear

2013-02-21 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56419 Bug #: 56419 Summary: [4.8 regression] transactions in for-loops disappear Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity:

[Bug libitm/55693] [4.8 Regression] libitm.c++/eh-1.C execution test fails on darwin from r193271

2013-01-11 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55693 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot

[Bug rtl-optimization/51771] trans-mem: abnormal edges get lost or corrupted

2012-12-05 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51771 torvald at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |RESOLVED

[Bug sanitizer/48076] Unsafe double checked locking in __emutls_get_address

2012-11-28 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076 --- Comment #7 from torvald at gcc dot gnu.org 2012-11-28 14:29:47 UTC --- (In reply to comment #6) There seems to be a similar bug in code generated for function static variables. The fast-path load is a plain load rather than atomic

[Bug c++/54893] unable to access volatile variable within relaxed transaction

2012-10-11 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54893 --- Comment #3 from torvald at gcc dot gnu.org 2012-10-11 19:54:11 UTC --- I agree with Michael. Accesses to volative vars are disallowed in safe code, but relaxed transactions can run unsafe code (after going irrevocable). The test case

[Bug tree-optimization/52558] write introduction incorrect wrt the C++11 memory model

2012-05-31 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52558 --- Comment #20 from torvald at gcc dot gnu.org 2012-05-31 20:23:51 UTC --- (In reply to comment #19) Fixed on mainline. I doubt this will be fixed on 4.7, as this is too intrusive-- unless one of the RMs really wants it on 4.7. OTOH, it would

[Bug libitm/53008] abort in _ITM_getTMCloneSafe

2012-05-15 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53008 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug libstdc++/52839] double free or corruption running tr1/.../default_weaktoshared.exe

2012-04-12 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52839 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug c++/52558] write introduction incorrect wrt the C++11 memory model

2012-03-13 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52558 torvald at gcc dot gnu.org changed: What|Removed |Added Component|tree-optimization |c++ --- Comment #12 from

[Bug libitm/52526] libitm: stuck in futex_wait

2012-03-13 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526 --- Comment #3 from torvald at gcc dot gnu.org 2012-03-13 22:01:41 UTC --- Author: torvald Date: Tue Mar 13 22:01:34 2012 New Revision: 185358 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=185358 Log: libitm: Fix lost wake-up in serial lock

[Bug libitm/52526] libitm: stuck in futex_wait

2012-03-13 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526 --- Comment #4 from torvald at gcc dot gnu.org 2012-03-13 22:11:52 UTC --- Author: torvald Date: Tue Mar 13 22:11:46 2012 New Revision: 185360 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=185360 Log: libitm: Fix lost wake-up in serial lock

[Bug libitm/52526] libitm: stuck in futex_wait

2012-03-13 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526 torvald at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution

[Bug libitm/52526] libitm: stuck in futex_wait

2012-03-10 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526 --- Comment #1 from torvald at gcc dot gnu.org 2012-03-10 17:46:12 UTC --- Patrick, I posted a fix to gcc-patches. Please have a look if you can.

[Bug libitm/52526] libitm: stuck in futex_wait

2012-03-08 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526 torvald at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed

[Bug middle-end/51752] trans-mem: publication safety violated

2012-02-09 Thread torvald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51752 --- Comment #6 from torvald at gcc dot gnu.org 2012-02-09 18:40:49 UTC --- (In reply to comment #4) But isn't with __transaction_atomic { for (i = 0; i 10; i++) if (x[i]) x[i] += data

  1   2   >