<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CodeSourcery fails again</title>
	<atom:link href="http://hardwarebug.org/2008/11/28/codesourcery-fails-again/feed/" rel="self" type="application/rss+xml" />
	<link>http://hardwarebug.org/2008/11/28/codesourcery-fails-again/</link>
	<description>Everything is broken</description>
	<lastBuildDate>Mon, 30 Aug 2010 09:33:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: mv daten /dev/null</title>
		<link>http://hardwarebug.org/2008/11/28/codesourcery-fails-again/comment-page-1/#comment-26</link>
		<dc:creator>mv daten /dev/null</dc:creator>
		<pubDate>Thu, 02 Apr 2009 13:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=83#comment-26</guid>
		<description>&lt;strong&gt;Fun with the Beagle Board, part 1...&lt;/strong&gt;

A while ago I ordered two Beagle boards to play with test and evaluate Qt on embedded hardware for KDAB, my part-time employer.

Hardware
The Beagle Board [let&#039;s call it BB] is a small single-board computer with an ARM CPU; keyboard, mouse, disk an...</description>
		<content:encoded><![CDATA[<p><strong>Fun with the Beagle Board, part 1&#8230;</strong></p>
<p>A while ago I ordered two Beagle boards to play with test and evaluate Qt on embedded hardware for KDAB, my part-time employer.</p>
<p>Hardware<br />
The Beagle Board [let's call it BB] is a small single-board computer with an ARM CPU; keyboard, mouse, disk an&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mans</title>
		<link>http://hardwarebug.org/2008/11/28/codesourcery-fails-again/comment-page-1/#comment-4</link>
		<dc:creator>Mans</dc:creator>
		<pubDate>Sun, 30 Nov 2008 02:10:07 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=83#comment-4</guid>
		<description>I accidentally pasted the code with &quot;unsigned short&quot; arrays; this has been corrected. That said, both fail in pretty much the same way, as I explain further on.

Regarding workarounds, I am well aware that -fno-tree-vectorize will disable the broken optimisation. However, having vectorisation with such severe bugs enabled by default at -O3 is not acceptable in my opinion.

The &quot;preview release&quot; of which you speak was nothing other than an evaluation download of the commercial package, and it is correct that I did not immediately find any errors in that release. As I said in the email you quoted above, my test case for the other bug passed, and FFmpeg worked correctly in a few simple tests. I have since added the ability to run the full FFmpeg regression test suite on the target board, which enabled me to find the latest bug.

As for testing, the number of tests, even if inflated into the millions (a number I simply do not believe), is irrelevant. What matters is coverage. In particular, every feature should be exercised at least once during testing. Specifically, if the right-shifting every element in an array is recognised as vectorisable, this should be tested. It is evident that this did not happen.

To the remainder of your game with test suite names and numbers, I can think of no response more appropriate than the words of the brilliant Dijkstra: Testing shows the presence, not the absence of bugs.</description>
		<content:encoded><![CDATA[<p>I accidentally pasted the code with &#8220;unsigned short&#8221; arrays; this has been corrected. That said, both fail in pretty much the same way, as I explain further on.</p>
<p>Regarding workarounds, I am well aware that -fno-tree-vectorize will disable the broken optimisation. However, having vectorisation with such severe bugs enabled by default at -O3 is not acceptable in my opinion.</p>
<p>The &#8220;preview release&#8221; of which you speak was nothing other than an evaluation download of the commercial package, and it is correct that I did not immediately find any errors in that release. As I said in the email you quoted above, my test case for the other bug passed, and FFmpeg worked correctly in a few simple tests. I have since added the ability to run the full FFmpeg regression test suite on the target board, which enabled me to find the latest bug.</p>
<p>As for testing, the number of tests, even if inflated into the millions (a number I simply do not believe), is irrelevant. What matters is coverage. In particular, every feature should be exercised at least once during testing. Specifically, if the right-shifting every element in an array is recognised as vectorisable, this should be tested. It is evident that this did not happen.</p>
<p>To the remainder of your game with test suite names and numbers, I can think of no response more appropriate than the words of the brilliant Dijkstra: Testing shows the presence, not the absence of bugs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Mitchell</title>
		<link>http://hardwarebug.org/2008/11/28/codesourcery-fails-again/comment-page-1/#comment-3</link>
		<dc:creator>Mark Mitchell</dc:creator>
		<pubDate>Sat, 29 Nov 2008 02:14:33 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=83#comment-3</guid>
		<description>Mans --

Thank you for continuing to exercise Sourcery G++ with FFMPEG.  

Of course, we&#039;re disappointed that you found a defect in the latest
release.  

(In the future, it would be helpful if you could post any defects to
our public mailing list here:

  http://www.codesourcery.com/archives/arm-gnu/maillist.html

so that we are sure to see them.  It&#039;s very helpful to have both
preprocessed source code and command-line options with defect
reports.)

We have been able to reproduce this bug, though not with the source
code you posted.  It looks like the case that triggers the defect uses
&quot;unsigned char&quot; rather than &quot;unsigned short&quot; as in your posting.  With
that change, and the options &quot;-mcpu=cortex-a8 -mfpu=neon -O3
-mfloat-abi=softfp&quot;, we do see the bug.  

You can work around this bug by using &quot;-fno-tree-vectorize&quot; or &quot;-O2&quot;,
both of which will disable automatic vectorization.  You can use those
options just on the affected kernels in FFMPEG, while still getting
the benefits of vectorization elsewhere.

As you know, we made available to you a preview version of this latest
release specifically so that you could test FFMPEG with it.  You
reported that:

&gt; I&#039;ve done some simple testing, and I&#039;m not finding any bugs this
&gt; time.  The test case from before works, and FFmpeg builds and runs
&gt; correctly.

We&#039;ve verified that the same bug that you reported here was indeed
present in that preview release.  It sounds like you&#039;ve broadened your
test coverage since then.  Obviously, we&#039;re sympathetic to the problem
of testing large, complex software packages; it&#039;s very difficult to
cover all possible cases.  We&#039;re continually expanding our test
coverage as well.

We run hundreds of thousands (or millions, depending how you count) of
test cases on every release, both on real hardware (including
Cortex-A8) and in simulation.  Those include the DejaGNU regression
testsuites that are part of the FSF sources for the tools, as well as
(depending on the exact release), testsuites and benchmarks like
Plum-Hall, Dhrystone, EEMBC, and SPEC.

We maintain a database of failures in these testsuites, and analyze
new failures to determine their origin.  We also do manual testing of
each release in order to provide a &quot;sanity check&quot;.  The pass rates in
our testing are generally 99.99% or higher, with the remainder of the
failures explained by vagaries of the test environment.

The vectorization testsuite in DejaGNU does test the compiler&#039;s
ability to vectorize a variety of loops, and, further, that the
vectorized loops run correctly.  We know that on NEON our releases
vectorize the same set of loops from these test cases that are
vectorized on other platforms with similar vector capabilities.  We
also know that the vectorized loops run correctly on Cortex-A8.
Unfortunately, the testsuites that we have do not cover the test case
which you posted here.  Therefore, when we fix this defect, we will
add a new test case to the DejaGNU testsuite, ensuring that the defect
does not reoccur in future releases.

Unfortunately, the GNU toolchain does have defects.  The tools
community (in which CodeSourcery is an active participant) attempts to
correct as many defects as possible -- both in the context of
volunteer and commercial development -- but, inevitably, every release
does have defects.  A quick search of the public GCC bug database
indicates 236 open wrong-code bugs; these are all cases where GCC is
known to generate incorrect code on a valid input program, as in your
test case here.

We will continue to do our best to improve the quality of GCC in
general, and our releases in particular.  We have entered the defect
you report into our internal defect tracker and expect that it will be
corrected in a future release.

Best regards,

-- 
Mark Mitchell
CodeSourcery</description>
		<content:encoded><![CDATA[<p>Mans &#8211;</p>
<p>Thank you for continuing to exercise Sourcery G++ with FFMPEG.  </p>
<p>Of course, we&#8217;re disappointed that you found a defect in the latest<br />
release.  </p>
<p>(In the future, it would be helpful if you could post any defects to<br />
our public mailing list here:</p>
<p>  <a href="http://www.codesourcery.com/archives/arm-gnu/maillist.html" rel="nofollow">http://www.codesourcery.com/archives/arm-gnu/maillist.html</a></p>
<p>so that we are sure to see them.  It&#8217;s very helpful to have both<br />
preprocessed source code and command-line options with defect<br />
reports.)</p>
<p>We have been able to reproduce this bug, though not with the source<br />
code you posted.  It looks like the case that triggers the defect uses<br />
&#8220;unsigned char&#8221; rather than &#8220;unsigned short&#8221; as in your posting.  With<br />
that change, and the options &#8220;-mcpu=cortex-a8 -mfpu=neon -O3<br />
-mfloat-abi=softfp&#8221;, we do see the bug.  </p>
<p>You can work around this bug by using &#8220;-fno-tree-vectorize&#8221; or &#8220;-O2&#8243;,<br />
both of which will disable automatic vectorization.  You can use those<br />
options just on the affected kernels in FFMPEG, while still getting<br />
the benefits of vectorization elsewhere.</p>
<p>As you know, we made available to you a preview version of this latest<br />
release specifically so that you could test FFMPEG with it.  You<br />
reported that:</p>
<p>&gt; I&#8217;ve done some simple testing, and I&#8217;m not finding any bugs this<br />
&gt; time.  The test case from before works, and FFmpeg builds and runs<br />
&gt; correctly.</p>
<p>We&#8217;ve verified that the same bug that you reported here was indeed<br />
present in that preview release.  It sounds like you&#8217;ve broadened your<br />
test coverage since then.  Obviously, we&#8217;re sympathetic to the problem<br />
of testing large, complex software packages; it&#8217;s very difficult to<br />
cover all possible cases.  We&#8217;re continually expanding our test<br />
coverage as well.</p>
<p>We run hundreds of thousands (or millions, depending how you count) of<br />
test cases on every release, both on real hardware (including<br />
Cortex-A8) and in simulation.  Those include the DejaGNU regression<br />
testsuites that are part of the FSF sources for the tools, as well as<br />
(depending on the exact release), testsuites and benchmarks like<br />
Plum-Hall, Dhrystone, EEMBC, and SPEC.</p>
<p>We maintain a database of failures in these testsuites, and analyze<br />
new failures to determine their origin.  We also do manual testing of<br />
each release in order to provide a &#8220;sanity check&#8221;.  The pass rates in<br />
our testing are generally 99.99% or higher, with the remainder of the<br />
failures explained by vagaries of the test environment.</p>
<p>The vectorization testsuite in DejaGNU does test the compiler&#8217;s<br />
ability to vectorize a variety of loops, and, further, that the<br />
vectorized loops run correctly.  We know that on NEON our releases<br />
vectorize the same set of loops from these test cases that are<br />
vectorized on other platforms with similar vector capabilities.  We<br />
also know that the vectorized loops run correctly on Cortex-A8.<br />
Unfortunately, the testsuites that we have do not cover the test case<br />
which you posted here.  Therefore, when we fix this defect, we will<br />
add a new test case to the DejaGNU testsuite, ensuring that the defect<br />
does not reoccur in future releases.</p>
<p>Unfortunately, the GNU toolchain does have defects.  The tools<br />
community (in which CodeSourcery is an active participant) attempts to<br />
correct as many defects as possible &#8212; both in the context of<br />
volunteer and commercial development &#8212; but, inevitably, every release<br />
does have defects.  A quick search of the public GCC bug database<br />
indicates 236 open wrong-code bugs; these are all cases where GCC is<br />
known to generate incorrect code on a valid input program, as in your<br />
test case here.</p>
<p>We will continue to do our best to improve the quality of GCC in<br />
general, and our releases in particular.  We have entered the defect<br />
you report into our internal defect tracker and expect that it will be<br />
corrected in a future release.</p>
<p>Best regards,</p>
<p>&#8211;<br />
Mark Mitchell<br />
CodeSourcery</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://hardwarebug.org/2008/11/28/codesourcery-fails-again/comment-page-1/#comment-2</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Fri, 28 Nov 2008 09:33:45 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=83#comment-2</guid>
		<description>That&#039;s disappointing, but expected since NEON support is not that old.

I wonder how the various buggy tests you find behave in qemu which has so many bugs in its NEON implementation.</description>
		<content:encoded><![CDATA[<p>That&#8217;s disappointing, but expected since NEON support is not that old.</p>
<p>I wonder how the various buggy tests you find behave in qemu which has so many bugs in its NEON implementation.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
