From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id B64263858D32 for ; Fri, 10 Nov 2023 18:00:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B64263858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B64263858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699639220; cv=none; b=AxQko7ZfHvJ8rcQ6RGPFLBCbp9yBZpob06RxxXhXfSTTSPnUmLSHHE9PmCAwbMcSAbXTPGCDb5WjvRDogZLdARHzMT1T7ckHW0Xpf+vslC3JEIPNVpahWjoyQTgLGeu4Z2bI9+BZLjv3JEGpwhvgvuzXTghDfwpnlUboiznHNzI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699639220; c=relaxed/simple; bh=sqQiPn5hYk6Wn33u/jKtSVm66wJJeqlVJ8bbBJ+R8fU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=bakSIJiFL+oxJPlY+XM53wW2NrmqMWwJUsbifPCwmQx3CNNqosQpTSdQajMd57ia+LfvPKrsoYyF/5nTsMdvu0gCQnNHari8dsfAiOKL8F+7ojY4Cvr1ETG4ArfjydxIrPjcxiv6PEk4q0lhPFwfiiVJ6FScdCkojk22u13LgOM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6c4884521f6so2106785b3a.0 for ; Fri, 10 Nov 2023 10:00:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1699639217; x=1700244017; darn=gcc.gnu.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=0IOdVskpnGb9geq51wlsFEOpMtwl4pEMYsoiBDR7t+Y=; b=VMaCi7MhIAVRaWDObvtQ4eYdI+Ps45LkYwL+9xy6eTULmNnBmdMKwHR+uA/wl9EZMx 2oZHA2yXdHbIgKjdROqgcEGD6EKSoe7SBOnfZa1QBqwC2CVSzO4YRSHTU03ZRY6kx/Ch oNjL7IiblFsAf4np7VuhSq1tPIJ0SjcnGb/QAJp77dehVhdrjZi5APqZf84ddD+ZlaHV TDCNKP6u/SMW9iCWeEtJlQGqs9bBNo7v2kDErUbOIf3Mddr60tVa4hBcKM+xHmjVCASw Btr3/98V1iPsMfzHAmFqETQ2wrxmr49VlmHmUZeBp0zqExScQLJIsBO9eHxJtQn9ZsE5 2HnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699639218; x=1700244018; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=0IOdVskpnGb9geq51wlsFEOpMtwl4pEMYsoiBDR7t+Y=; b=RTjQa+1ApeDIGlX8BIlinThln22oVwcBuGmWUqUU3Bw16KCsaY/3q09sG6k7pCCtp+ Kki+Os8hJedPQCThx5MdOCkkckQWWKTUvav5cXDlniduJqKnIeivvL4pJR5Y77a121uu lK5PkCPS3OlDjIhGyszg3Ts86x/m0bplotaFO0kIsYxeoH26ta8VKN30Ui04RZCWTAkS pwBXnRJsInOJTji1o3P/xaGyV9xPjXNpbgReViOLZ0fdFS7mwIR+NjVjeMTbWPkKKUOJ Dk0Q99ZqwHPUYpHKkw0pQuByavu5Yt/eb05otaZalMXLg2MmgGQk7llvPbC/pBRei8En ZKjQ== X-Gm-Message-State: AOJu0Yyu/Rpsf70ko8atTCblDoGe8nXF1z8/y/kQSoBHgmgkgf8AVoi5 SRfU7RQHI3r/ux5qMWU3v56GPw== X-Google-Smtp-Source: AGHT+IGjE/4LK1jym5+qSu/bzoK0Czmmib+9svLsgSbNv067tVzMs1yRUVavA7ox1CwEdNtv7JslTg== X-Received: by 2002:a05:6a00:1595:b0:6c3:1b7d:dac9 with SMTP id u21-20020a056a00159500b006c31b7ddac9mr9575632pfk.34.1699639217598; Fri, 10 Nov 2023 10:00:17 -0800 (PST) Received: from [10.0.17.156] ([12.44.203.122]) by smtp.gmail.com with ESMTPSA id u202-20020a6279d3000000b006c4d86a259csm1743674pfc.28.2023.11.10.10.00.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Nov 2023 10:00:17 -0800 (PST) Content-Type: multipart/alternative; boundary="------------5eXYkbZ4jPJNhuZxmR80Wa0E" Message-ID: <7e78cd70-70c9-41b1-8a98-6977a103429e@rivosinc.com> Date: Fri, 10 Nov 2023 10:00:15 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] g++: Add require-effective-target to multi-input file testcase pr95401.cc Content-Language: en-US To: Jeff Law , gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com References: <20231103061849.79159-1-patrick@rivosinc.com> From: Patrick O'Neill In-Reply-To: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: This is a multi-part message in MIME format. --------------5eXYkbZ4jPJNhuZxmR80Wa0E Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/9/23 17:34, Jeff Law wrote: > > > On 11/3/23 00:18, Patrick O'Neill wrote: >> On non-vector targets dejagnu attempts dg-do compile for pr95401.cc. >> This produces a command like this: >> g++ pr95401.cc pr95401a.cc -S -o pr95401.s >> >> which isn't valid (gcc does not accept multiple input files when using >> -S with -o). >> >> This patch adds require-effective-target vect_int to avoid the case >> where the testcase is invoked with dg-do compile. >> >> gcc/testsuite/ChangeLog: >> >>     * g++.dg/vect/pr95401.cc: Add require-effective-target vect_int. > Sorry, I must be missing something here.  I fail to see how adding an > effective target check would/should impact the problem you've > described above with the dg-additional-sources interaction with -S. It's not intuitive (& probably not the cleanest way of solving it). pr95401.cc is an invalid testcase when run with dg-do compile (for the reasons above). pr95401.cc does not define a dg-do, which means it uses the testcase uses dg-do-what-default to determine what to do. dg-do-what-default is set by target-supports.exp . The two options here are set dg-do-what-default run or compile. On non-vector targets the pr95401 is set to compile (which is invalid). Ideally we would say if dg-do-what-default == compile don't run, but AFAIK that isn't possible. I didn't want to duplicate the check_vect_support_and_set_flags logic to return true/false since that'll probably get out of sync. I used require-effective-target vect_int as a proxy for check_vect_support_and_set_flags (also since the testcase only contains integer arrays). That way we do this now: dg-do-what-default run -> run dg-do-what-default compile -> skip test If there's a cleaner/better approach I'm happy to revise. Patrick > > Jeff >> --------------5eXYkbZ4jPJNhuZxmR80Wa0E--