From patchwork Fri Oct 20 13:52:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 156114 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp1071218vqb; Fri, 20 Oct 2023 06:53:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFB43efRBjJm0fQWAgu1f5aX4Aoc4UsyG9jvGV5TSqsq8xEgdM7eH34kUPMS3q9jwd4rpQP X-Received: by 2002:a05:622a:1314:b0:412:3d25:9019 with SMTP id v20-20020a05622a131400b004123d259019mr2824688qtk.6.1697810005837; Fri, 20 Oct 2023 06:53:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697810005; cv=pass; d=google.com; s=arc-20160816; b=ey7XXq31rj4jeEEhc4rfRSaJIpB4XDsAui4CQ37223HXosLU73D3bWtVUnHOLo9+Iq HXU4jJ3PcgmU7gxz2npLqL6lCGriiPkprB8lzWe+m6JyKvWymw6dXZjmW8MvKKovJrac d6LOYEjrFQRnAxW1bmly6Z9fF7tfoJ2J48Trj0CXst6DQd7GDtC/PJ8R1tE5zNsGN9nP tnFdZjzBIfbtylZoWTu6pncTHTo+Ck1wOVh7p9MCtMNx9XTZKGYhomnN4YAu7dY1HX8G 0A7/P2oaGvBjTzbKIOM4K2WMNnL2C4S/hy+i8OryUAfuob+HHHCIKhohC1cAC9Q3mvqy kH9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:mime-version:subject :to:from:date:dkim-signature:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=dxexLikryohVaZTL6WXEyA11eREPydSByIBIjOarXig=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=zgdDydHOhH5rmbTqRURZ26igtKHmYasuEqyaM1LpdffYoGJKiW8Y5EuB8/7YIsb28R Qo928t2azvEjHaYvvFQ0i0yvlEsBcGoxtnuPNubXlyxIQltNmScTBJIE0Z9ELmY3u2Mh zGIj15CviWbIgbvV+Q7kJQ/EqcTN5XukEA9N58pkBMtbFuanBfGyhHijdnmBzZf+INyv mcauSfdK8SgctqV4IEhmalezo7ONqwRqgnKTOYjj4c57GSkwwUOUdrjGdmXSDCjsg4zO /aXd4HaeX1fnzNv87c6MtWH2QKVe9lywrxLmbpR14ly3/9XB2SRftcPp3OV+bfIlaSqD wRjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wqKJuQRQ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=pxS6vIuX; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v20-20020a05622a131400b004032d91e8b7si1373453qtk.295.2023.10.20.06.53.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 06:53:25 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wqKJuQRQ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=pxS6vIuX; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B63138582B0 for ; Fri, 20 Oct 2023 13:53:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 206F53858D20 for ; Fri, 20 Oct 2023 13:53:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 206F53858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 206F53858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2178:6::1c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697809982; cv=none; b=HQDnOGRlJnIqAIqR+xleZWYZhB9MlAXCJHTuxL25AqCOKxo68evXvB3CwA6mSoQGHVe7b2dQFaSMDNwYDkIqWzKB2TEhyAZvxp8DV2KBXJtgMUA6lGB0u88/GIGKa/mbC3r+6Vx2NhGaia5X1Lz/G+fvCm8Lk8x5uI3W1tcBQgk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697809982; c=relaxed/simple; bh=/xU9c585DWXGMf49HPxuAlVg2J+bQTTeEwF8NfozHWI=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:MIME-Version: Message-Id; b=YQZwhU7OjoUoXnH41hx7YVVKvpPWPE4vkN1G/l6EcOIb2ErfJuP67kHkFX1b/8jbrIoecUQoLYVVcK6/L6iFPjSbdvj4OC1meCmm+yTTiW4YZCOgyXvjRTvNimC5XivLVhkC6NHIW3CchLsjiwEUEBHN1ibb++JCqPOOZJnCmu0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 12EF4218F9 for ; Fri, 20 Oct 2023 13:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1697809980; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=dxexLikryohVaZTL6WXEyA11eREPydSByIBIjOarXig=; b=wqKJuQRQeDZUxxm17wB6hhkJRc+KJGJ3l7OUQI4GNltVjoHTf1/pPaFDQWc3gHf3Zn/953 8yF4K2mZj2qmoUFNiqOwY4xQvCGuKK1Yg2ZC5FNYuo69Rv4/b+Zg4ePkqu3MrvMYBI79O0 Tm5o5t9iQDl823OR84+3c7u9QZElfvc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1697809980; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=dxexLikryohVaZTL6WXEyA11eREPydSByIBIjOarXig=; b=pxS6vIuXmBUnFV6b/iJ2sZKqOjVc4/17Oe/k02djthfU5us+ayglPYMGr6yDnyk6UjLOes yYbycpm02o5wN1Cg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id F1B4613584 for ; Fri, 20 Oct 2023 13:52:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ggHmOTuGMmXeMgAAMHmgww (envelope-from ) for ; Fri, 20 Oct 2023 13:52:59 +0000 Date: Fri, 20 Oct 2023 15:52:59 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] tree-optimization/111383 - testcase for fixed PR MIME-Version: 1.0 Message-Id: <20231020135259.F1B4613584@imap2.suse-dmz.suse.de> Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -7.10 X-Spamd-Result: default: False [-7.10 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gcc-patches@gcc.gnu.org]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780282824699771593 X-GMAIL-MSGID: 1780282824699771593 Pushed. PR tree-optimization/111383 PR tree-optimization/110243 gcc/testsuite/ * gcc.dg/torture/pr111383.c: New testcase. --- gcc/testsuite/gcc.dg/torture/pr111383.c | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr111383.c diff --git a/gcc/testsuite/gcc.dg/torture/pr111383.c b/gcc/testsuite/gcc.dg/torture/pr111383.c new file mode 100644 index 00000000000..cce873ba7ba --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr111383.c @@ -0,0 +1,29 @@ +/* { dg-do run } */ +/* { dg-require-effective-target int32plus } */ + +extern void abort (void); +int a, d = 1625015426; +char e; +short b; +short *f = &b, *g = &b; +void h(char *k) { + char c = *k; + for (; c;) + ; +} +int main() +{ + *g = 25330; + int i, j; + i = 0; + for (; *f + d - 1625040257 < 7;) + ; + for (; i < 4; i++) { + j = 0; + for (; (d - 1625015511) + (d - 1625015341) + j < 1; j++) + h(&e); + } + if (a != 0) + abort (); + return 0; +}