From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 9FD483858D38 for ; Tue, 26 Mar 2024 07:49:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FD483858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9FD483858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::132 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711439358; cv=none; b=ooCdgCGotmgCod2XZSSUn9e2IqqrUP7OjEl9/IR+AU/YgsnJ7utIMiScUAWP51sOhmEc46QM4nbqOIqvQT/WInn9Wox0fjtsVj5prdhedqiG2kRv7lk3LS1IyeLxpx1DTfCMkxcTaLeLjqOzE9pJ6GZPkqlVbWuezW90vOiaCNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711439358; c=relaxed/simple; bh=b1iypePKhK2+tYfi9jZFohsoYaGxuwNmKA2WBr7t2OQ=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=TCLj8Ran3ErmEpleW2hSeR88C84babfZMU/M5GylNYVe07Mwgj+uBHeM38ZbBmg2eDydDtEDeHL742axWJGpC7UJ8JDuLUud5OxXKcX+9Bq+3H12V9jAG3bnAKnKUYoaUaIvomunb+Itlsg55VjAjGwADJ5lXxkQwjV9lHx+tGI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-515a81928a1so3376368e87.3 for ; Tue, 26 Mar 2024 00:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711439354; x=1712044154; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Cujr6+qSuibbnq21cotYmveOtEL9+ZnvAEGDc8sTXjw=; b=dkqJM0+zGiXqf5v3AYkYRBHIA3/uqnnWv8SXMUjxpYk2600XKYbI6f8/8ub77Ce7aU +zUY+qFIi71/TWbyMMbQAiMBQNsOL4p25DsVyyou06uBF66Re8V2mr9ikorAVUji7IZT jNFKYZK3BUybNH3jL51zIK/FA4ua/+YjpvPaYqJXA+lBi6kGynU+j3vDJJvbc6peYDnQ FDEM2u9YTSLuIC655jT7rSz5+L4+F3S03oEIjrwbib48N+hW/xrZzam6ZDrvCEbarkhc fqVtEY45kjqlrl/ZrbUZBV3LHbYZMjaHid4at5KopCGZCVCaZkmnMwOH5wFWtXIhqyKm SmGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711439354; x=1712044154; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cujr6+qSuibbnq21cotYmveOtEL9+ZnvAEGDc8sTXjw=; b=RsFqbtnDMonOl8K6ZGdMYpZN+8uNlcLEvlQqFaII8+Ydm/zd4xsiRuYhxnLkT7YhWA MLphu/l6Lpi9ke4m9bGmAYrDpEvO7JJMlCeV6n8m0dzijqfzEukgeR96LQNNFhwRmTdQ ZCsc3LPm5bBohiIKJdFNkV3wWwY03Xg4uCW7N22+oLY6ffqVbLw8TwfNJiPTCHbsZOTX nlhTzaxv8HRIezyyIS3L8FFQayEopmPjuquMZeIDsf3KVxiWhhqXheJU5Q3ktBdtZ9n8 PQ4HDILOLjPb2bitewFodE/kchuc5e7EtTloomAz3j4kWYOmPtNywwGG1J1Ykfp657Z9 T9mA== X-Forwarded-Encrypted: i=1; AJvYcCXjlRgg3F/Z/LEsZCvOQNx513XoPuqBFXzf1It0BEGoqD0GnRLu7R1tUQc6f/gchFd0EATA2L6E6ELcNu2JYxD69Up1 X-Gm-Message-State: AOJu0Yyd9IK2uTpOprOzdSNJJum1fsbmx+6iC525yoUQf1ZtM4Avahy8 rVCMsNafWJZIaCvD5bWBqaTcLBa7qjG19ZiUjA6uBAE71gxS8pbdveLaE81u1e1+56C9T9lVqYC mPzAb+rE1rWLpQyorbxn4/erIaE+i2tmE X-Google-Smtp-Source: AGHT+IEf6wUl7UNsR93PzXatNptw4pI+xLkSs2k73Wap6zz53tlofrstvXlwSjkaqmRizU/7+QfdYASc5Vv8X6BDxDQ= X-Received: by 2002:ac2:4841:0:b0:513:c50d:db59 with SMTP id 1-20020ac24841000000b00513c50ddb59mr7277525lfy.15.1711439353720; Tue, 26 Mar 2024 00:49:13 -0700 (PDT) MIME-Version: 1.0 References: <9f140118-0327-4d2b-aa07-12508263a1c7@gmail.com> <30b68ddc-3233-4ece-9df8-b2ad93800686@gmail.com> <6c39ede2-e275-49fd-82a1-5797117d9208@gmail.com> In-Reply-To: <6c39ede2-e275-49fd-82a1-5797117d9208@gmail.com> From: Richard Biener Date: Tue, 26 Mar 2024 08:49:02 +0100 Message-ID: Subject: Re: Aw: Re: Invalid "dg-do run" in the testsuite (with 2 blanks) To: Jerry D Cc: Harald Anlauf , gfortran Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Mar 26, 2024 at 2:24=E2=80=AFAM Jerry D wrot= e: > > On 3/25/24 3:30 PM, Harald Anlauf wrote: > >> On 3/25/24 12:53 PM, Harald Anlauf wrote: > >>>>>>> I noticed by chance that we have quite a lot of improperly specif= ied do-do > >>>>>>> directives in the testsuite. > >>>>>>> > >>>>>>> % grep "dg-do run" gcc/testsuite/gfortran.dg/ -rl|wc -l > >>>>>>> 83 > >>>>>>> > >>>>> > >>>>> I think this is on purpose. > >>>>> The idea to use a "feature" in dejagnu to only iterate once and not > >>>>> over all possible options. So execution time can be lowered a bit. > >>>>> > >>>>> But I don't know if this hack still works, it definitely did work s= ome years ago. > >>>>> > >>>>> Cheers, > >>>>> Manfred > >>> > >>> Is this "feature" documented somewhere? I don't see it on > >>> > >>> https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gccint/Directives.html > >>> > >>> Given that the dg-directives are important and possibly fragile, > >>> and since we had issues in the past, can we check that a test > >>> that was added works the way intended? > >>> > >>>>>>> Note that with two blanks instead of just one a testcase does not= get executed. > >>>>>>> > >>>>>>> Does anybody want to earn the honors to change the directives and > >>>>>>> check for "fallout" in the testsuite? > >>>>>>> > >>>>>>> Cheers, > >>>>>>> Harald > >>>>>>> > >>>>>> > >>>>>> One failure after fixing all the spaces ( sed is our friend ). > >>>>>> > >>>>>> FAIL: gfortran.dg/inline_matmul_1.f90 -O0 scan-tree-dump-times= optimized "_gfortran_matmul" 0 > >>> > >>> This does actually point to an issue with the testcase: > >>> it only works properly with optimization enabled. > >>> > >>> Manual inspection of this test and the expected dump suggests > >>> that e.g. -O1 could have been added to the dg-options directive. > >>> > >>> Shouldn't we fix at least the dg-options of that testcase? > >>> > >>> Cheers, > >>> Harald > >>> > >> > >> I restored the one test that appeared to fail so that it had the two > >> spaces 'trick'. When run in the test suite, it is compiled with -O > >> which does invoke the optimization. I manually checked the tree dump > >> with this option and it indeed has all the _gfortran_matmul calls remo= ved. > >> > >> I am inclined to leave these all untouched with the two spaces in plac= e. > >> > >> From the test log: > >> > >> PASS: gfortran.dg/inline_matmul_1.f90 -O execution test > >> PASS: gfortran.dg/inline_matmul_1.f90 -O scan-tree-dump-times > >> optimized "_gfortran_matmul" 0 > > > > Alright, then leave it that way. > > > > I find it somewhat unsatisfactory though, to have a behavior of the > > testsuite harness that is so intranparent. > > > > If it is a simple oversight that the behavior of double space was > > never documented, it could simply be fixed, for the sake of everybody. > > > > The take-home message for me is - whenever I write a testcase that > > relies on this behavior - to add a comment in the header that this > > is intended behavior, and set all compiler flags appropriately... > > > > Cheers, > > Harald > > > > > > With two spaces there are 9 tests run at -O, with one space there are 54 > variations executed. Specifying the optimization option in the > dg-options also runs 54 variations. It appears that the "feature" was > done on purpose, but it is frustrating that this is not documented anywhe= re. It would be nice to document it in sourcebuild.texi and to put a comment be= fore the dg-do with two spaces indicating that two spaces are on purpose. I also don't remember this being implemented ... Richard. > I do remember discussions way back about some tests taking a long time > to run and needing a way to speed up the overall testing. I will look > over the documentation and see if we can get this addressed. > > For my own test cases, I have always specified the options I want and > for front-end work, optimizations don't usually matter except in this > case. I don't have time to go through all 83 tests. > > From my system here: > > Testing of trunk complete..... one space > > real 4m56.294s > user 35m51.082s > sys 12m51.283s > > > Testing of trunk complete..... two spaces > > real 4m44.421s > user 34m3.215s > sys 12m38.778s > > Not a huge difference. > > Jerry > >