From patchwork Mon Oct 7 15:51:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1172884 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-510404-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ptmxuOVm"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46n4jh4M3xz9s7T for ; Tue, 8 Oct 2019 02:52:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=yYF0tjwoFbdUAq1p8Zxq5Sdsop0IS27zE05FI+b6l2b xuRYgY3iygm/tSqZAGZoLorTGas4Ez2PtmoypIF0SRmaB0856jPukIrWFSVW7/vu Ro91/9NgcZBZLk4Ci5zO+mgTAuPc+HYjASFYepfclHnhZqA1bCdLz3GzELQX/1ic = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=cGzDe3pGd0MIMLumYd9fZ0U1FoE=; b=ptmxuOVmxFxcE58js pmHP64pKWMLE+NaS/O0YDPoKl9w+5gFKby2+chk6qZzCprBN9bM2Zc3uklUXra/e zHWHXVQY88u22BLC6L9LDP4lGLgazU09TXf9Fs2vGrMCMnPZ5txKThMAtLShK5CX Bn1n2+oc94Vysw3yAH9UDXmyWk= Received: (qmail 60822 invoked by alias); 7 Oct 2019 15:52:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 60806 invoked by uid 89); 7 Oct 2019 15:51:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Oct 2019 15:51:57 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B7AF315C02C for ; Mon, 7 Oct 2019 15:51:56 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 325CE19C5B for ; Mon, 7 Oct 2019 15:51:55 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x97Fpsge014941 for ; Mon, 7 Oct 2019 17:51:54 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x97Fprp5014940 for gcc-patches@gcc.gnu.org; Mon, 7 Oct 2019 17:51:53 +0200 Date: Mon, 7 Oct 2019 17:51:53 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Fix up gcc.target/i386/pr71801.c testcase Message-ID: <20191007155153.GL15914@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.11.3 (2019-02-01) X-IsSubscribed: yes Hi! This testcase started FAILing on i?86-linux with r276603 (the -O2 inlining changes): /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/pr71801.c:12:3: warning: writing 24 bytes into a region of size 1 [-Wstringop-overflow=] /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/pr71801.c:14:5: warning: writing 24 bytes into a region of size 1 [-Wstringop-overflow=] Previously the function call wasn't inlined and thus it didn't warn that it is in fact invalid. The following patch makes it valid, and it still ICEs with r238210 the same way as the incorrect testcase, and succeeds with r238211, so I've committed this as obvious to trunk. 2019-10-07 Jakub Jelinek * gcc.target/i386/pr71801.c (uuidcache_init): Fix up size of d array. Jakub --- gcc/testsuite/gcc.target/i386/pr71801.c.jj 2016-07-11 22:18:04.470879189 +0200 +++ gcc/testsuite/gcc.target/i386/pr71801.c 2019-10-07 17:39:44.310698244 +0200 @@ -16,7 +16,7 @@ static int get_label_uuid(char *p1) { } void uuidcache_addentry(char *p1) { __builtin_memcpy(&c, p1, sizeof(c)); } void uuidcache_init() { - char d[1]; + char d[sizeof(a) + sizeof(c)]; get_label_uuid(d); uuidcache_addentry(d); }