From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by sourceware.org (Postfix) with ESMTPS id 831453858D3C for ; Thu, 2 Feb 2023 01:02:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 831453858D3C 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-oa1-x2f.google.com with SMTP id 586e51a60fabf-1636eae256cso700965fac.0 for ; Wed, 01 Feb 2023 17:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gAJqrgaN6DstFYrvmd2L4Mn5C76v1aJ4PVtgHmesxis=; b=nkQO/Fh88cLsNYSsDqc3SW2TLolIHluX8uG8kUKh6FzlziFfe0yL4b9RSPWEbX6IzN 0RclrglsZC08ZvCMgF/JPKl4M+YFXVI3NBDZCic8zWCkqSnlyMDPOBckyW1GRDap+xBZ pzTojdKF38/ODZtd3Ces2mokU9AiQM0Y0lAVvfAHi9ccDg4i2Mw/pujd85+7ETuN0w/b cvAKvZAuFZAPQX21uMTQnV1WbbN5Nj2kP+7XTQKM0wL4AWwmhrl4kuY9dhSWmX9zoDQ3 jbgK66FYgw1lbtyurPEgANeFj8l82Zqg0AorlypuxEZ4laNC028uv+LuTPsZmBs0PMIN B6Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=gAJqrgaN6DstFYrvmd2L4Mn5C76v1aJ4PVtgHmesxis=; b=W0VI9SSvlLPx8tXpyRZeuHxy8zAno9xrvbT2MLY42TEov1ixtYj0G+P6MCxqVNZQ2e rXqC1R3gnHyTwVey77WSKgtUjg0NmvjZcbhrJOHfqPETNLhiT3ir+M6WrRZJPF3d/iv7 7wgk2fQkGXq+PszbjmrXdtUUXvruI5b1+emZbJxPFc70xZQFF83ysosMKeSCbKt8ETbk QOTHaFUTuhhIkJqMTTvvi+cFMBF8MmXNsP3S7tPjTssHjzvrzhofO/4EN4lb0rmywqQG Mz1iBzudqWnjKZyz24qOskj45lLgJ8lfLg1vT+Zhf08iwNhiWhOGBk8PTryXB5Kain44 CNAg== X-Gm-Message-State: AO0yUKW0OOAgt+msbE/ZRCK2F2cV1duPhMwBsFLussURZfcFL1TQ1QE/ pz/PXOtwMM2qPFWJXFqUxKhwEgiEbcIls4M6ArE= X-Google-Smtp-Source: AK7set8EcP0cXjKXZA0EykvDFU+fvyaFsjVib7ZZVvFWLxpLcYLNxvObyyyGTHgFWF0Tu/GPbythBal/K7MqCRNDhQw= X-Received: by 2002:a05:6871:b14:b0:163:7911:57fa with SMTP id fq20-20020a0568710b1400b00163791157famr85706oab.112.1675299744496; Wed, 01 Feb 2023 17:02:24 -0800 (PST) MIME-Version: 1.0 References: <22c944dff18fc7afeb9c8acd1d1e5d05e2cc6312.camel@redhat.com> <20230201022755.825041-1-dmalcolm@redhat.com> In-Reply-To: <20230201022755.825041-1-dmalcolm@redhat.com> From: NightStrike Date: Wed, 1 Feb 2023 20:02:13 -0500 Message-ID: Subject: Re: [pushed] analyzer: fix uses of alloca in testsuite To: David Malcolm Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 Tue, Jan 31, 2023 at 9:27 PM David Malcolm wrote: > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > Pushed to trunk as r13-5615-gd03ae4be2c6d48. > > gcc/testsuite/ChangeLog: > * gcc.dg/analyzer/call-summaries-2.c: Add > dg-require-effective-target alloca. > * gcc.dg/analyzer/imprecise-floating-point-1.c: Likewise. > * gcc.dg/analyzer/infinite-recursion-alloca.c: Likewise. > * gcc.dg/analyzer/malloc-callbacks.c: Likewise. > * gcc.dg/analyzer/out-of-bounds-5.c: Likewise. Remove includes > of and . Use "__builtin_free" rather than > "free", to match uses of "__builtin_malloc". > * gcc.dg/analyzer/putenv-1.c: Add dg-require-effective-target > alloca. > * gcc.dg/analyzer/write-to-string-literal-5.c: Likewise. Thanks for this fix, these all pass now on Windows. I hope I'm not being pedantic, but there's still a remaining inconsistency in that some parts of the test use memcpy (like test6), and others use __builtin_memcpy (like test98). There isn't a call to __builtin_memset(), but there is a call to memset(). Maybe these differences are intentional, though. If they aren't, and you wanted to reduce it further, you could remove string.h and use the builtins. You could also include stddef.h instead of stdlib.h, if all you need is size_t.