From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28346 invoked by alias); 12 Jul 2005 18:39:28 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 28334 invoked by uid 22791); 12 Jul 2005 18:39:25 -0000 Received: from yosemite.airs.com (HELO yosemite.airs.com) (205.217.158.180) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Tue, 12 Jul 2005 18:39:25 +0000 Received: (qmail 29746 invoked by uid 10); 12 Jul 2005 18:39:23 -0000 Received: (qmail 6250 invoked by uid 500); 12 Jul 2005 18:39:18 -0000 To: "Joseph S. Myers" Cc: gcc@gcc.gnu.org Subject: Re: Some tests in gcc.c-torture rely on undefined behaviour? References: From: Ian Lance Taylor Date: Tue, 12 Jul 2005 18:39:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-07/txt/msg00515.txt.bz2 "Joseph S. Myers" writes: > Such tests are in general bugs. You'd have to ask Torbjorn about what the > original purpose of the old parts of c-torture was, as that may have > differed from the current GCC testsuite, but invalid tests should be > removed (or, perhaps better, moved to gcc.c-torture/compile) or have > relevant options such as -fwrapv added. The original purpose was simply to collect programs which caused the compiler to fail. When he saw a bug report with a test case, he collected the test case, reduced it, and added it to the torture tests. The tests were simply run at various optimization levels. Tests which caused the compiler to crash were put in compile, tests which showed a miscompilation visible at run time were put in execute. I would guess that 920612-1.c, at least, could just be changed to use unsigned int, and it would continue to test whatever bug it was testing when it was originally added. Ian