[Bug ada/60078] acats c761007 fails on ARM
bernd.edlinger at hotmail dot de
gcc-bugzilla@gcc.gnu.org
Thu Feb 6 14:03:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60078
--- Comment #13 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to charlet@adacore.com from comment #12)
> > could you explain, why the test fails when the delay is added to the
> > unmodified test case?
>
> Sorry, I'm not following you here, I do not know which delay you would
> add where (and why).
>
> Arno
I am here, because this test seems to fail on a Dual-Core ARM
running Linux version 3.7.0.
What it looks like for me, is this is executed on two cores in parallel:
-- look to see if this character has been finalized yet
for SEI in 1..Side_Effect_Finger loop
Previous_Side_Effect := Previous_Side_Effect
or Side_Effect(Side_Effect_Finger) = I.Effect;
end loop;
-- if not, then tack it on to the string, and touch the character
if not Previous_Side_Effect then
Side_Effect_Finger := Side_Effect_Finger +1;
Side_Effect(Side_Effect_Finger) := I.Effect;
TCTouch.Touch(I.Effect);
end if;
and both try to add "G" to Side_Effect. Both execute the for loop,
and both don't see each other, thus Previous_Side_Effect := False.
Then both enter the if statement, and end up with GGHIJ => test FAILED.
To make it reproducible, I added a delay 0.01 between for and if statement
and this made the test fail every time, even on X86_64.
If the test is OK as it is, then it is probably the responsibility
of the runtime to ony execute one Finalize method at the time?
So is it a bug in the Test Case or in the GNAT or on my hardware?
Bernd.
More information about the Gcc-bugs
mailing list