* Jeff Law: > On 10/11/23 04:39, Florian Weimer wrote: >> I've started to look at what it is required to convert the testsuite to >> C99 (without implicit ints, without implicit function declarations, and >> a few other legacy language features).
> I bet those older tests originating from c-torture will be a bit > painful. Torbjorn liked having them minimized, to the point of > squashing out nearly everything he considered extraneous. I'd bet > many of those older tests are going to need lots of changes. We can use them to exercise the old C89 features and build with -std=gnu89. That may not have been the original intent, but I think it's what these tests are testing today (also noted by Richard Earnshaw). >> * Overly reduced test cases where I can verify that the less-reduced >> test case still reproduces the bug. Can be submitted early. > Seems like this could be a huge time sink, but that's your call. Well, if the verification means I can commit these fixes as obvious, it may be worth it … >> * Similar test cases where I cannot verify that the test case is >> still >> reproducing the bug, but where I assume that the unreduction is >> harmless as far as the test objective is concerned. Can be submitted >> early (but should be in a separate patch from the previous one). > I suspect many of the older tests will fall into this bucket. Yes, for the newer test cases, verification is generally possible. One ongoing issue is that gcc/testsuite/gcc.c-torture/ appears to be used for new tests, but this subtree (or at least parts of it) defaults to -w, so if you don't use dg-options, can easily check in something that has a lingering C99 compatibility issue today. Here's an example from a few weeks ago: diff --git a/gcc/testsuite/gcc.c-torture/execute/pr111331-1.c b/gcc/testsuite/gcc.c-torture/execute/pr111331-1.c index 4c7f4fdbaa9..05a6db6dce6 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr111331-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr111331-1.c @@ -10,7 +10,7 @@ int c(int d, int e, int f) { int main() { int g = -1; a = c(b + 30, 29, g + 29); - volatile t = a; + volatile int t = a; if (t != 28) __builtin_abort(); return 0; Thanks, Florian