From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 7B0353858D35 for ; Sat, 15 Jan 2022 14:19:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7B0353858D35 Received: by mail-wm1-x329.google.com with SMTP id ay4-20020a05600c1e0400b0034a81a94607so10378679wmb.1 for ; Sat, 15 Jan 2022 06:19:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6mpb8w6PjgrgrNX5oPY3+BT5vbJG7H3UbAerXB10lLs=; b=1jARtISOkmkysWboFVz3B9s9q5cYUw1sU9C/N6Gpk+eRvhBJyu8drufmyd1JqkFVfY 3T9AME0bV57p54KHygq3vjRMGofqOmhN4qq1TBGFXfPecj9T28gVWoy0qMeUhiPInyOT +gcsd7gl5lCZZ2J+nOX0EJvf8YOz/y+ZnuwJEMRSjC77NjCwhWQ3GBGX//co1CDBngWT OcdPA3F+FDZyugaP1pvfRgOGW89ht1Hm+lIGhRRGoF66HUJigcZWQrU7T8jADT9ceHhb KWGx8QH98J3LrfdnPmb+/3nMhpbVQVCcR/jGByjEQAnbYq4IkIQDxk7/LKWjjfOlydCg lbXA== X-Gm-Message-State: AOAM533qJSiVaXhh1rEZIGKklPkUzC5+QjJHoGgxKXAc3U72hjZ6AHTZ Vj/25Ii7DuOX5pDy3AfCJ00= X-Google-Smtp-Source: ABdhPJza2+Bi0lgD6LlvCmdUBH3uUK2EEcYsXSU6aU+heMXaD0BvmjNkYPahjWpGjLv8SLprhmG3tw== X-Received: by 2002:a05:600c:1c1a:: with SMTP id j26mr7071752wms.96.1642256354551; Sat, 15 Jan 2022 06:19:14 -0800 (PST) Received: from smtpclient.apple ([2a01:e34:ec28:8cb0:ed43:a0af:431b:e07d]) by smtp.gmail.com with ESMTPSA id f15sm5433900wmq.38.2022.01.15.06.19.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Jan 2022 06:19:14 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: Many analyzer failures on non-Linux system (x86_64-apple-darwin) From: FX In-Reply-To: Date: Sat, 15 Jan 2022 15:19:13 +0100 Cc: GCC Mailing List , Iain Sandoe Content-Transfer-Encoding: quoted-printable Message-Id: <650EE35B-A344-49B7-8361-303B88696A3F@gmail.com> References: <3BD093C3-178E-4B11-BDA1-9604ADCA4B04@gmail.com> <237CA1D3-29E0-4252-8EDC-DC562BA042A2@gmail.com> To: David Malcolm X-Mailer: Apple Mail (2.3693.40.0.1.81) 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jan 2022 14:19:16 -0000 Hi David, > The purpose of these asm tests is to verify that the analyzer doesn't > get confused by various inline assembler directives used in the source > of the Linux kernel. So in theory they ought to work on any host, = with > a gcc configured for a suitable target. >=20 > These tests are marked with "dg-do assemble" directives, which I'd > hoped would mean it uses -S for the tests (to make a .s file), but > looking at a log locally, it appears to be using -c (to make a .o > file), so maybe that's what's going wrong for you as well? The tests even compiled with -S still fail: spawn -ignore SIGHUP /Users/fx/ibin/gcc/xgcc -B/Users/fx/ibin/gcc/ = exceptions_enabled42475.cc -fdiagnostics-plain-output -S -o excep tions_enabled42475.s FAIL: gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c -O1 = (test for excess errors) Excess errors: = /Users/fx/gcc/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-pa= ravirt-1.c:27:3: warning: 'asm' operand 6 probably does not match = constraints = /Users/fx/gcc/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-pa= ravirt-1.c:27:3: error: impossible constraint in 'asm' It=E2=80=99s the same for the other four. gcc.dg/analyzer/asm-x86-lp64-1.c is slightly different, there it=E2=80=99s= an assembler error: /var/folders/_8/7ft0tbns6_l87s21n4s_1sc80000gn/T//cc4b3ybm.s:160:20: = error:unexpected token in '.section' directive .pushsection .text ^ /var/folders/_8/7ft0tbns6_l87s21n4s_1sc80000gn/T//cc4b3ybm.s:162:2: = error: unknown directive .type add_asm, @function ^ /var/folders/_8/7ft0tbns6_l87s21n4s_1sc80000gn/T//cc4b3ybm.s:167:13: = error: .popsection without corresponding .pushsection .popsection ^ >>> ## Builtin-related failures >>>=20 >>> Those four cases fail: >>>=20 >>> gcc.dg/analyzer/data-model-1.c >>> gcc.dg/analyzer/pr103526.c >>> gcc.dg/analyzer/taint-size-1.c >>> gcc.dg/analyzer/write-to-string-literal-1.c >=20 > Can you file a bug about this and attach the preprocessed source from > the test (using -E). Done, it is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104042 FX=