From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id 748563858D38 for ; Tue, 26 Mar 2024 01:24:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 748563858D38 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 748563858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1031 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711416274; cv=none; b=gte6BGBiRr6eYBCevCY1YYvtmev4QV1aHiT4v8ASCTpNv1cMHCHTIcBBKgKZFSjBg8/V/BnHGQetqHni5lB+msQ+Dpy+Tzn+eorS6JylXpm+A2IGmMF9BWLTdIJ7QUr2gLFk7I9Q3hXGOKipjhxgmQ65SSEjPL4SpPOWEAVy6Hg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711416274; c=relaxed/simple; bh=f2JpOiQbfkezawbjwKgEelIVMi/XBpwsG0UgOHu5c1I=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=dAtbaMEGmIciyjnwhMSW7xaLYuV6xDQJ5B3IDtOY6LKX/COMCSXV+UPsqL2QV4hGEpXCwf0Ksu//EpglnfsaI0os2qMjR31oioYSKistVF0WEFfmCgZi0k0d6C/J9hwWm0J6OrFwELBjm1sUw0z70bIJv7s9eP8Lk/qEq2588BQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-29f8ae4eae5so960350a91.0 for ; Mon, 25 Mar 2024 18:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711416267; x=1712021067; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=MBGEfdGLNrzEsDW2kYFOSxvXDFieVDDyhizeXGR9SCU=; b=aNF6nc3Nbc33m80OtkR+4t+cEPle4DSYYsoCwIt19mft2N/fAzyIpv+1tbeMkZHR6f M9GKGF78P78QhmJRZ0giRw7aB7Ou9OjRhh4yDqA4Gr4vlnxyhBqMuyKEqYDLfyd064bt PE9pXdOkXzQSxNXHN9YoHJEoM4RYmqo13d1ib9o+Jmkp4XtOBAtm7D7z7ZEaGkSfOv8j S2ToOQDlkq9KlN7IZv2kmyeeFWKCgEtRmA9zpvRTe7svfWNDnSvjPBmZQvdu+YDdVU0b ltWfjIZAT29rPBv+n06BHR/fzUZOFFTlZqZYXWwWScTFHUVykgmgvnWWqM0iMwHIo21U AzDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711416267; x=1712021067; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MBGEfdGLNrzEsDW2kYFOSxvXDFieVDDyhizeXGR9SCU=; b=ioO+Q9I9nMn8zqB+csVFE24b9pq+B1QJBlLwBB2bDXYEmNXz5i4KaZRuTKgHwV04dr /SnXrM+/MpCAX0GvCnT1ch6JttBFATGXbA4fzjjXGtS9j6E+u8PkqEtpISjS4WUBhskR D6QH12SRjwsJ09UE8h08hHjt58oZYIdxjxME0UQkI9wErdYtOha+jwx8nQlKwAY+sKju i1oUgevkEoo4L4jxMPxA31TC63TgIQfji4ba+/s/W6rzfOtqnUTgTXXHEUFh5gcpSf4k Q7G1BFrsl5LV4UDEUH0jUEvCjHgpGXT6noIGHD99vT0C+GzBs+nI2W9ykZpihHnFGAkk OhDQ== X-Forwarded-Encrypted: i=1; AJvYcCUvlRZWKqU9ji5lFADItuson7CAsfLdgHIsbKsUbIeJ2IOtkEjwPxrUYf/DZ8GsMEQcmuxy9Oy/TAZV4r0MhmmD/cbr X-Gm-Message-State: AOJu0YxUxGX6FFRl73Lh3VbFcM/RWwfHMLbey/yZkmLPM+8/gvMiZfTl F2XEamiDdiBrpRmGKtv4ZNLXGCUMmENh7GdhpXtxWSbaBHWcBUb/fUwVdoLa X-Google-Smtp-Source: AGHT+IHr3nCNPnHP26Us8RjbTbhVjOaqc6iUWfJgJ/40u21RDVSs/NrEKKGBZbCT7HRUDM54EItVnQ== X-Received: by 2002:aa7:888f:0:b0:6ea:6f18:887a with SMTP id z15-20020aa7888f000000b006ea6f18887amr11226021pfe.1.1711416267284; Mon, 25 Mar 2024 18:24:27 -0700 (PDT) Received: from [192.168.1.20] ([50.37.177.113]) by smtp.gmail.com with ESMTPSA id p66-20020a625b45000000b006e6be504b0bsm5027838pfb.168.2024.03.25.18.24.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Mar 2024 18:24:26 -0700 (PDT) Message-ID: <6c39ede2-e275-49fd-82a1-5797117d9208@gmail.com> Date: Mon, 25 Mar 2024 18:24:25 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Aw: Re: Invalid "dg-do run" in the testsuite (with 2 blanks) To: Harald Anlauf , gfortran References: <9f140118-0327-4d2b-aa07-12508263a1c7@gmail.com> <30b68ddc-3233-4ece-9df8-b2ad93800686@gmail.com> Content-Language: en-US From: Jerry D Autocrypt: addr=jvdelisle2@gmail.com; keydata= xjMEY5TlkxYJKwYBBAHaRw8BAQdAyrkRDhmJhSTTlV/50gJLlvliU6/Lm5C9ViKV8T9y1GnN HkplcnJ5IEQgPGp2ZGVsaXNsZTJAZ21haWwuY29tPsKJBBMWCAAxFiEEOFR0TS0390uh8dRV uWXAJaWpwWoFAmOU5ZMCGwMECwkIBwUVCAkKCwUWAgMBAAAKCRC5ZcAlpanBalsJAP4wdCiH 2Of9oZv1QWgZ/AVdbWFM3Fv47/WZQHOXfoZ9HgD6AkXrKeJ+6usST7PEaDJjptaViT1fLiYY V/6XaOKSsgLOOARjlOWTEgorBgEEAZdVAQUBAQdAdA7PczYnl07vnOT9oP/wvvMDd4HP09Zl g3LzwXQJWT8DAQgHwngEGBYIACAWIQQ4VHRNLTf3S6Hx1FW5ZcAlpanBagUCY5TlkwIbDAAK CRC5ZcAlpanBasF/AQCa5WjlsVpLsEiggZyT18MOJNAdeRd7wkGDUrwedHrvawD/cE1H+/Ms L1ZwvQiLfGdx8crigQqWTQyos4kH8Wx82wc= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,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 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 specified 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 some 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 removed. >> >> I am inclined to leave these all untouched with the two spaces in place. >> >> 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 anywhere. 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