This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: linux says it is a bug
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Hannes Frederic Sowa <hannes at stressinduktion dot org>, Andrew Haley <aph at redhat dot com>, Jonathan Wakely <jwakely dot gcc at gmail dot com>, lin zuojian <manjian2006 at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 4 Mar 2014 07:01:48 -0500 (EST)
- Subject: Re: linux says it is a bug
- Authentication-results: sourceware.org; auth=none
- References: <20140304064026 dot GE8019 at ubuntu> <CAFiYyc3bVGgG=dmozPG5m4Vx_oJbR=rR=TsZfj+01dvXmWiJmw at mail dot gmail dot com> <20140304091703 dot GE17043 at order dot stressinduktion dot org> <CAH6eHdQ2mrDYm5s2FiGWdQnp7V_cV0JdwGA381SXzp3D79j+=Q at mail dot gmail dot com> <20140304092420 dot GF17043 at order dot stressinduktion dot org> <53159C47 dot 5040901 at redhat dot com> <20140304093337 dot GG17043 at order dot stressinduktion dot org> <CAFiYyc0qdhHp+nV1qSy4X48yGo4nojrbAF7fgvW3sJf0pO_zxg at mail dot gmail dot com> <5315BF28 dot 9000103 at samsung dot com>
On Tue, 4 Mar 2014, Yury Gribov wrote:
> Richard wrote:
> > volatile __asm__("":::"memory")
> >
> > is a memory barrier and a barrier for other volatile instructions.
>
> AFAIK asm without output arguments is implicitly marked as volatile. So it may
> not be needed in barrier() at all.
Yes, exactly. Had it at some time been needed, that'd be a bug.
(I have a faint recollection of that, faint enough to be a false
memory.)
brgds, H-P