[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc compiler bug (sparc, ppc)

Ralf Corsepius <ralf.corsepius at rtems.org> writes:

> On Wed, 2007-05-23 at 17:52 +0400, Sergei Organov wrote:
>> Joel Sherrill <joel.sherrill at oarcorp.com> writes:
>> > Ralf Corsepius wrote:
>> [...]
>> >> IMO, this is bad advice, these ain't no volatiles.
>> >>
>> > Not in the general sense but this looks remarkably like the RTEMS chain code
>> > and the intent there was very simple.  The code was originally in assembly
>> > language and we really meant each memory load or store to occur.
>> >
>> > I would go so far as to assert that most of the RTEMS SuperCore and
>> > APIs are written with this intent.  It was written as C that is just
>> > marginally above assembly language.  RTEMS generally has very simple C
>> > statements.
>> Do you suggest to declare all core RTEMS variables volatile? ;)
> I am asking myself what Joel might have had in his coffee this morning ;)
>> Anyway, how is it relevant provided this case is most probably just a
>> GCC bug?  Moreover, the bug apparently even does not bite in normal -O2
>> builds,
> Is it? I haven't tried to investigate.

That's how I've read what Till have posted, but now, after re-reading
his post, I fear I was wrong.

-- Sergei.