This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix some -Wunreachable-code issues


On Sat, Nov 02, 2002 at 08:10:19PM -0500, John David Anglin wrote:

 > > I wonder if PR 3846 is related?
 > 
 > I can't duplicate the PR on hppa2.0w-hp-hpux11.11 or hppa64-hp-hpux11.11.
 > Jakub's patch might have fixed this PR.

Here are 3 Duff's device tests:

	1. Loop start before first label, no comparison in for()
	   statement.  PR 3846.  This test no longer fails (guess
	   the PR should be closed).

	2. Loop start before first label, comparison in while()
	   statement.  PR 5230 (which was closed as a duplicate
	   of 3846, but I think I'll reopen, since this still
	   produces a bogus warning).  This test fails.  It is
	   a regression relative to 2.95.3, which does not produce
	   a warning for this code.  The warning is bogus; the
	   while() statement is clearly reachable, since the loop
	   eventually terminates.

	3. Loop start after first label.  This is basically the
	   code from Tom Duff's original usenet posting about it.
	   This test does not fail.

OK for mainline?

	* gcc.dg/duff-1.c: New test.
	* gcc.dg/duff-2.c: New test.
	* gcc.dg/duff-3.c: New test.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

Attachment: duff-test-patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]