From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B39BD3858C39 for ; Thu, 13 Oct 2022 17:08:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B39BD3858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665680931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hg8jZSZ0v1Fn4ofeXSJzlUdm5SBFiFoS9Hzbnn8LBO8=; b=U+WoMvt7GkfbTAYYAedC8xGoOgq2hL647gSky1+/2J0WIPj5SxN6G/TdJ7yneiG9KzvS5e ljxsUCpcVRLwUN685fSm4v9D2e34mCbDREw+MnNB7SksdueHbmH2wvVUml3DKaTPTI1GvV dqi5mWfyB7k+oDcpI8HzLTJ+FN0SW8w= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-186-g2bogyXiMvqhFMPOFu0bKA-1; Thu, 13 Oct 2022 13:08:50 -0400 X-MC-Unique: g2bogyXiMvqhFMPOFu0bKA-1 Received: by mail-qv1-f71.google.com with SMTP id y14-20020a0cf14e000000b004afb3c6984bso1918772qvl.21 for ; Thu, 13 Oct 2022 10:08:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Hg8jZSZ0v1Fn4ofeXSJzlUdm5SBFiFoS9Hzbnn8LBO8=; b=n4/lQ8GOr6Q2wbxvix0Wg5Lb6ymlMfwcbUQvx1t3zDkLwD/iTYqaKQTY6r76/mZ70Y LItaasTpE50eqgRdqNYMrIqKlHaTkYOMSySWHNxoSAjwze+O4BxnbwaI0kAQ6DpHkyom JMuy3f7Nkxj7CH5dK1WCs9KfJ0b90eQFd9ygBeDLa+n8FigRHEYUk2OpAV43ynAWpYfj SS7pDXrWHEBzC0FpAyrsPGws29quqd9MdoMR8zQylYnqIN5ZvSur9lF0CeEFgkueVJrr TjkEaBRAQASc9QgcW6IKXChjSQtnL0YlHGetAfSumJ/ORQHFDqqAJmXNrncKX4bRrZVQ JxFw== X-Gm-Message-State: ACrzQf1+Lg1kNncnWAp1h1uaPNIbSwXaz9Mr2N2ipM5JT+LQbYP9OeP/ NGVyZTcgkOw2/j8x6+6M0RuCqwkxxjhpU4VZ7o3d2zVYphw7+AOLNhJwDlBmAsbZ5z+UH2pb8Ui Gm+7zQovAGbBpaEQ2ww== X-Received: by 2002:a05:6214:d85:b0:4b1:8e37:902d with SMTP id e5-20020a0562140d8500b004b18e37902dmr563249qve.120.1665680928738; Thu, 13 Oct 2022 10:08:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7HleBaPF+ARCbgWU+92EY2FWdqmYvj+g45QTRqJuNXsBhJJN3HVZ15qt44kFMDdbQED14H8w== X-Received: by 2002:a05:6214:d85:b0:4b1:8e37:902d with SMTP id e5-20020a0562140d8500b004b18e37902dmr563218qve.120.1665680928466; Thu, 13 Oct 2022 10:08:48 -0700 (PDT) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id q18-20020a37f712000000b006ed519554cfsm183012qkj.61.2022.10.13.10.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 10:08:47 -0700 (PDT) Message-ID: <340d9872b51aebe8a7392b7122def32ed3ca279f.camel@redhat.com> Subject: Re: [PATCH RESEND 0/1] RFC: P1689R5 support From: David Malcolm To: Jason Merrill , Ben Boeckel , gcc-patches@gcc.gnu.org Cc: nathan@acm.org, fortran@gcc.gnu.org, gcc@gcc.gnu.org, brad.king@kitware.com, Ben Boeckel , Martin Liska Date: Thu, 13 Oct 2022 13:08:46 -0400 In-Reply-To: <3bfbf143-d85e-cb93-68eb-686262e2acc3@redhat.com> References: <20221004151200.1275636-1-ben.boeckel@kitware.com> <3bfbf143-d85e-cb93-68eb-686262e2acc3@redhat.com> User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable 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 Mon, 2022-10-10 at 16:21 -0400, Jason Merrill wrote: > On 10/4/22 11:11, Ben Boeckel wrote: > > This patch adds initial support for ISO C++'s [P1689R5][], a format > > for > > describing C++ module requirements and provisions based on the > > source > > code. This is required because compiling C++ with modules is not > > embarrassingly parallel and need to be ordered to ensure that > > `import > > some_module;` can be satisfied in time by making sure that the TU > > with > > `export import some_module;` is compiled first. > >=20 > > [P1689R5]: https://isocpp.org/files/papers/P1689R5.html > >=20 > > I'd like feedback on the approach taken here with respect to the > > user-visible flags. I'll also note that header units are not > > supported > > at this time because the current `-E` behavior with respect to > > `import > > ;` is to search for an appropriate `.gcm` file which > > is not > > something such a "scan" can support. A new mode will likely need to > > be > > created (e.g., replacing `-E` with `-fc++-module-scanning` or > > something) > > where headers are looked up "normally" and processed only as much > > as > > scanning requires. > >=20 > > Testing is currently happening in CMake's CI using a prior revision > > of > > this patch (the differences are basically the changelog, some > > style, and > > `trtbd` instead of `p1689r5` as the format name). > >=20 > > For testing within GCC, I'll work on the following: > >=20 > > - scanning non-module source > > - scanning module-importing source (`import X;`) > > - scanning module-exporting source (`export module X;`) > > - scanning module implementation unit (`module X;`) > > - flag combinations? > >=20 > > Are there existing tools for handling JSON output for testing > > purposes? >=20 > David Malcolm would probably know best about JSON wrangling. Unfortunately our JSON output doesn't make any guarantees about the ordering of keys within an object, so the precise textual output changes from run to run. I've coped with that in my test cases by limiting myself to simple regexes of fragments of the JSON output. Martin Liska [CCed] went much further in 4e275dccfc2467b3fe39012a3dd2a80bac257dd0 by adding a run-gcov-pytest DejaGnu directive, allowing for test cases for gcov to be written in Python, which can thus test much more interesting assertions about the generated JSON. Dave >=20 > > Basically, something that I can add to the test suite that doesn't > > care > > about whitespace, but checks the structure (with sensible > > replacements > > for absolute paths where relevant)? >=20 > Various tests in g++.dg/debug/dwarf2 handle that sort of thing with > regexps. >=20 > > For the record, Clang has patches with similar flags and behavior > > by > > Chuanqi Xu here: > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0 https://reviews.llvm.org/D134269 > >=20 > > with the same flags (though using my old `trtbd` spelling for the > > format name). > >=20 > > Thanks, > >=20 > > --Ben > >=20 > > Ben Boeckel (1): > > =C2=A0=C2=A0 p1689r5: initial support > >=20 > > =C2=A0 gcc/ChangeLog=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 |=C2=A0=C2=A0 9 ++ > > =C2=A0 gcc/c-family/ChangeLog=C2=A0 |=C2=A0=C2=A0 6 + > > =C2=A0 gcc/c-family/c-opts.cc=C2=A0 |=C2=A0 40 ++++++- > > =C2=A0 gcc/c-family/c.opt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 12 ++ > > =C2=A0 gcc/cp/ChangeLog=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2= =A0=C2=A0 5 + > > =C2=A0 gcc/cp/module.cc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2= =A0=C2=A0 3 +- > > =C2=A0 gcc/doc/invoke.texi=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 15 +++ > > =C2=A0 gcc/fortran/ChangeLog=C2=A0=C2=A0 |=C2=A0=C2=A0 5 + > > =C2=A0 gcc/fortran/cpp.cc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 4= +- > > =C2=A0 gcc/genmatch.cc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = |=C2=A0=C2=A0 2 +- > > =C2=A0 gcc/input.cc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0=C2=A0 4 +- > > =C2=A0 libcpp/ChangeLog=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2= =A0 11 ++ > > =C2=A0 libcpp/include/cpplib.h |=C2=A0 12 +- > > =C2=A0 libcpp/include/mkdeps.h |=C2=A0 17 ++- > > =C2=A0 libcpp/init.cc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0 14 ++- > > =C2=A0 libcpp/mkdeps.cc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 235 > > ++++++++++++++++++++++++++++++++++++++-- > > =C2=A0 16 files changed, 368 insertions(+), 26 deletions(-) > >=20 > >=20 > > base-commit: d812e8cb2a920fd75768e16ca8ded59ad93c172f >=20