From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id BE0343858D20 for ; Tue, 29 Aug 2023 13:22:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BE0343858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-68a3f1d8be2so3473902b3a.3 for ; Tue, 29 Aug 2023 06:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693315376; x=1693920176; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cSmOa05md27z1vcURCSXfEQ2Ey8KZsN4pDXuIYtNxNk=; b=QKWof3FQj9zwJo8q6XW6I1K9cnwy69ir6Hv2JUtSLxqVr3S754nWYiGAJE5EZygyaF pnDz2QjAeM4i5Oj379ndrw1zwb+b7T/JMObh9upxfZKcuNlc57yBmHPIafebf4TPrHmY W5lKDfmk3k0wyrwiRXuU2mWUbP5h2eFG1oa7NRxy/hNsrQLIGDigD7hr8Wt5hQq7XKgn T92x3+tjZPEjFQNNYccBL2rJxjuuu8po4QqYaxXbqpBGBmJmw/VqaN29y8K6dz6BGh0Y meIqBRDl/cCIE8OumFGfKNIHImz78akmK5/EKS2kccUTeh360fZAtX7hknGVK9Y9TUg+ NCBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693315376; x=1693920176; h=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=cSmOa05md27z1vcURCSXfEQ2Ey8KZsN4pDXuIYtNxNk=; b=LP8cO82sF5gt7JZ36K3hCj5yA/wFkozg3Pbh55JQepFi+OI4tQTzitKwgYIoK5ZnC9 wvVbFiJ9YBl+I7Z3Y+L/DXZg2IYtxKKLwfMTSLWAsheoRn/9vDgdAYYZmbWQXyPeVedi G6N/nMiODgTMi5PAuE13KBJ0jG9ca+t303j0df2pP/gWITO4fWnOVRwoa1rogQLyJgVF j7J7YxtsfW6PlIBawaUpZL7tuP7G4ydst5C8kJlPVLLzyCVNmLI+LQ2pCG0SVmJzwvIK GPEHnCpI+MjOJAvgFvWvd7q+so8ZQZ4Q+LCy3/AVbDzDwTPaR5Vbmue/G6E8N634eOY3 9pzg== X-Gm-Message-State: AOJu0YyghqKsAimn1Nr1Ifa14pWdK2rbyhUtHNdK3ZzjdTnEKOPyDYgR V6L4M+JVKYpEcie1m4mLX2+5mECRs4z6Zdmazw== X-Google-Smtp-Source: AGHT+IHa9SLSaqjM1h07+bwr/JmELiZXYNM/yFOo3ry/ADJLn0oLr/GI6yseNmsS6ollZVHY72MH7RtZSM6opj2YHZU= X-Received: by 2002:a05:6a00:1492:b0:68a:4312:e0d6 with SMTP id v18-20020a056a00149200b0068a4312e0d6mr29314894pfu.10.1693315376458; Tue, 29 Aug 2023 06:22:56 -0700 (PDT) MIME-Version: 1.0 References: <86149a0ec44a6d8d12d5dfa35c3561eb3efe14e5.camel@redhat.com> <20230826122219.2310080-1-vultkayn@gcc.gnu.org> In-Reply-To: From: Benjamin Priour Date: Tue, 29 Aug 2023 15:22:45 +0200 Message-ID: Subject: Re: [PATCH v2] analyzer: Move gcc.dg/analyzer tests to c-c++-common (1) [PR96395] To: Prathamesh Kulkarni Cc: gcc-patches@gcc.gnu.org, dmalcolm@redhat.com Content-Type: multipart/alternative; boundary="00000000000081b0ff06040fb5b5" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,KAM_LOTSOFHASH,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: --00000000000081b0ff06040fb5b5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Prathamesh, Thanks for the report, I am running on a x86_64_linux_gnu and never had to cross-compile before. I've tried to set it up and reproduce your errors, please tell me if I'm off the mark. I configured gcc as: ../gcc/configure --prefix $CONTROL_PFX --disable-bootstrap --host=3Dx86_64-linux-gnu --target=3Darm-eabi --enable-languages=3Dc --with= -newlib Then from the patch 7997f0d35efca8a24d1b0ceae5066b1019d633d7 prior to mine, *I ran the tests manually as arm-sim refused to work*: $GCC_SRC/control/eabi_arm_build/gcc/xgcc -B$GCC_SRC/control//eabi_arm_build/gcc \ ../../gcc/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_f= c_has_early.c \ -fanalyzer -Wanalyzer-too-complex -fanalyzer-call-summaries and $GCC_SRC/control/eabi_arm_build/gcc/xgcc -B$GCC_SRC/control//eabi_arm_build/gcc \ ../../gcc/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_f= c_has_early-O2.c \ -fanalyzer -Wanalyzer-too-complex -fanalyzer-call-summaries -O2 >From my patch, I ran similar commands, only s/gcc.dg/c-c++-common/ as the patch moved the tests there. The output were *identical*, for both pre/post-patched. I do agree with you that there is an excess error compared to x86_64-linux-gnu and the test expectations. ../../gcc/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_f= c_has_early.c:63:65: warning: converting a packed =E2=80=98enum obj_type=E2=80=99 pointer (align= ment 1) to a =E2=80=98struct connection=E2=80=99 pointer (alignment 4) may result in an = unaligned pointer value [-Waddress-of-packed-member] 63 | return ((struct connection *)(((void *)(t)) - ((long)&((struct connection *)0)->obj_type))); | ^~~~~~~~~~ ../../gcc/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_f= c_has_early.c:31:6: note: defined here 31 | enum obj_type { | ^~~~~~~~ ../../gcc/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_f= c_has_early.c:47:8: note: defined here 47 | struct connection { | ^~~~~~~~~~ Therefore I do also see a regression, but it does not come from 55f6a7d949abc708d1c6ebc01eb3053f96d1472b. It seems like an easy fix though and I will add it to the second part of this patch. However I did run the tests manually, rather than with make check-gcc as it failed to run - an issue with stdio not found. I'm attending this issue and will further update you in case the conclusion of this mail changes. Thanks again, Benjamin. On Tue, Aug 29, 2023 at 8:47=E2=80=AFAM Prathamesh Kulkarni < prathamesh.kulkarni@linaro.org> wrote: > On Sat, 26 Aug 2023 at 18:02, Benjamin Priour via Gcc-patches > wrote: > > > > From: benjamin priour > > > > Hi, > > > > Updated version of the patch, regstrapping the changes described in > > https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628455.html. > > > > Regstrapped off trunk 66be6ed81f369573824f1a8f5a3538a63472292f > > on x86_64-linux-gnu. > Hi Benjamin, > It seems your patch committed in 55f6a7d949abc708d1c6ebc01eb3053f96d1472b > caused following regressions on arm-eabi config: > Running gcc:gcc.dg/analyzer/analyzer.exp ... > FAIL: > c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c > (test for excess errors) > FAIL: > c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c > (test for excess errors) > > Please let me know if you need help to reproduce these failures. > > Thanks, > Prathamesh > > --00000000000081b0ff06040fb5b5--