public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented
@ 2012-08-14 18:51 hp at gcc dot gnu.org
2012-08-14 19:55 ` [Bug middle-end/54261] " hp at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: hp at gcc dot gnu.org @ 2012-08-14 18:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54261
Bug #: 54261
Summary: reverse sync/atomic operators when only
sync_compare_and_swap_optab libfuncs implemented
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hp@gcc.gnu.org
Target: cris*-*-linux-gnu
If a target implements atomics by only setting sync_compare_and_swap_optab
libfuncs (see cris.c:cris_init_libfuncs), a path less travelled is used, on
which a bug lies, causing sync/atomic operators to be implemented with the
reverse operator, e.g. minus instead of plus. See test-case to be added and
patch to be posted and referenced.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/54261] reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented
2012-08-14 18:51 [Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented hp at gcc dot gnu.org
@ 2012-08-14 19:55 ` hp at gcc dot gnu.org
2012-08-14 23:07 ` hp at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hp at gcc dot gnu.org @ 2012-08-14 19:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54261
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-08-14
AssignedTo|unassigned at gcc dot |hp at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-08-14 19:55:02 UTC ---
Created attachment 28017
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28017
test-case suitable as gcc.dg/torture/pr54261-1.c
The lack of non-cas_int test-cases except in the libstdc++ testsuite helped
this trivial bug survive a test-run.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/54261] reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented
2012-08-14 18:51 [Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented hp at gcc dot gnu.org
2012-08-14 19:55 ` [Bug middle-end/54261] " hp at gcc dot gnu.org
@ 2012-08-14 23:07 ` hp at gcc dot gnu.org
2012-08-16 22:03 ` hp at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hp at gcc dot gnu.org @ 2012-08-14 23:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54261
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/54261] reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented
2012-08-14 18:51 [Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented hp at gcc dot gnu.org
2012-08-14 19:55 ` [Bug middle-end/54261] " hp at gcc dot gnu.org
2012-08-14 23:07 ` hp at gcc dot gnu.org
@ 2012-08-16 22:03 ` hp at gcc dot gnu.org
2012-08-16 22:05 ` hp at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hp at gcc dot gnu.org @ 2012-08-16 22:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54261
--- Comment #2 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-08-16 22:03:39 UTC ---
Author: hp
Date: Thu Aug 16 22:03:33 2012
New Revision: 190454
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190454
Log:
PR middle-end/54261
* optabs.c (expand_atomic_fetch_op): Save and restore code when
retrying after failed attempt.
Modified:
trunk/gcc/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/54261] reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented
2012-08-14 18:51 [Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented hp at gcc dot gnu.org
` (2 preceding siblings ...)
2012-08-16 22:03 ` hp at gcc dot gnu.org
@ 2012-08-16 22:05 ` hp at gcc dot gnu.org
2012-08-17 0:18 ` hp at gcc dot gnu.org
2012-08-17 0:20 ` hp at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hp at gcc dot gnu.org @ 2012-08-16 22:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54261
--- Comment #3 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-08-16 22:05:37 UTC ---
Author: hp
Date: Thu Aug 16 22:05:32 2012
New Revision: 190455
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190455
Log:
PR middle-end/54261
* gcc.dg/torture/pr54261-1.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr54261-1.c
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/54261] reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented
2012-08-14 18:51 [Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented hp at gcc dot gnu.org
` (3 preceding siblings ...)
2012-08-16 22:05 ` hp at gcc dot gnu.org
@ 2012-08-17 0:18 ` hp at gcc dot gnu.org
2012-08-17 0:20 ` hp at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hp at gcc dot gnu.org @ 2012-08-17 0:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54261
--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-08-17 00:18:42 UTC ---
Author: hp
Date: Fri Aug 17 00:18:35 2012
New Revision: 190463
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190463
Log:
PR middle-end/54261
* optabs.c (expand_atomic_fetch_op): Save and restore code when
retrying after failed attempt.
Modified:
trunk/gcc/optabs.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/54261] reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented
2012-08-14 18:51 [Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented hp at gcc dot gnu.org
` (4 preceding siblings ...)
2012-08-17 0:18 ` hp at gcc dot gnu.org
@ 2012-08-17 0:20 ` hp at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hp at gcc dot gnu.org @ 2012-08-17 0:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54261
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-08-17 00:19:57 UTC ---
fixed for 4.8
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-08-17 0:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14 18:51 [Bug middle-end/54261] New: reverse sync/atomic operators when only sync_compare_and_swap_optab libfuncs implemented hp at gcc dot gnu.org
2012-08-14 19:55 ` [Bug middle-end/54261] " hp at gcc dot gnu.org
2012-08-14 23:07 ` hp at gcc dot gnu.org
2012-08-16 22:03 ` hp at gcc dot gnu.org
2012-08-16 22:05 ` hp at gcc dot gnu.org
2012-08-17 0:18 ` hp at gcc dot gnu.org
2012-08-17 0:20 ` hp at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).