From patchwork Wed Jan 17 10:35:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 188784 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp818142dye; Wed, 17 Jan 2024 02:36:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGINWrcz+u91PerBAPNexasUs+E7Ky429nNP20I91hrl4IWZ7ihwsW0fsPKDXgi94UzxfCK X-Received: by 2002:a05:6214:252d:b0:680:d395:cff9 with SMTP id gg13-20020a056214252d00b00680d395cff9mr12410717qvb.93.1705487780846; Wed, 17 Jan 2024 02:36:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705487780; cv=pass; d=google.com; s=arc-20160816; b=BJj3d0UyAog7G9kzAWvGPzp1+/l+TIg2OpqaMLiSlN44BOEYi05zXrjxLk2Pr6eISh vSUSihrYMP22MRK2KdToHaoqBZC4ywx2smERvRjYxYZBP4C1L21M7bIyW//oPRlDgfEN BHO+kb99ZkYtbKTyEkrfqHPxHgQyJ0Oyn3qEom2rmBbLa9qGGtXBk1l5JqeeI1GCKEDc Lwg7mu2vN0Uu2bIdlpA8tv3grLJoDyilucpLDaFZXZWc/vbxvLKzSQvTc1+FlgvYD5Wk rppX6bmmsuNt5TI4vNau7zfCQNzCjJRSm0JDLN12vQSuQe5HyjGAGsoeNzQLHqJ26XJF sviw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=nth56fFFht9rllBOlFGI4K6uIkBPIOdelhbTRMVES2Y=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=iQKoHDh++cv2wsF7K6uVY/jmAUbb+gEPFiTDKbi5Udranv/fo4J4f6vVaEXIsuAgRo ofVstPQolny5YLJ3JTQ/KPeAnayXfr24cDB32IEj8BIxa4X71MvIJIainYUoUegivOx7 e4GqrI8U5yM3HkjiNRYIGsDXxV7kElK+aVCzPPQc0A4lMgPVXbCZwrWsWpvbuE+xq/u4 aIUB5pseOXd6bfl2FpZIRCaVXEyG+ntrjcSB/56WonI9M5F8jhPTHffRUzsvZUHB8GUy XIaUiG+JIQw1vYKXFKoq25hK96dUsCqOgDy7gOz9lsweNByUCimDJzL16yBV/zTDOVHn EHtA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RDnbbVoy; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a4-20020a0ce344000000b0067a9cfb87bcsi11485351qvm.331.2024.01.17.02.36.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:36:20 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RDnbbVoy; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8C9973858C42 for ; Wed, 17 Jan 2024 10:36:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 5AA7E3858C42 for ; Wed, 17 Jan 2024 10:35:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5AA7E3858C42 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5AA7E3858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705487739; cv=none; b=tP19diXy1ajMPXkJu1gADv2ukec9lKA7KN8JhI5yB046el1BfblOxDIPvhKJsS3UzHxSElCWCOQd5CeLKeM0Q3iXM1UMr2xCwdOqnphEzW9t1sd0ZdK5ocqvPgPdCwRqpQmrMWn0arSfu1R4MAWCVTwmtX99aVp0NqoJpU5l+Hc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705487739; c=relaxed/simple; bh=AVQbjdqsspzsAEYYNTlV8f/cqUdjXemVCvxDbtYiH9w=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=JmLvNXtGRiUaiNbXFmR0vJGJsumAPOglnrMNTOSbmTlsAUqfc9byMmLo//a8WT/SLcsBfm1ARk9nZR+y4uzf5P6w/gYB/vn+Fe8XJpBQZXeVBng3tcCUIz7CWYX6TS7P+KG1p6u6ulpWrODybRrmz3cAh7/49zxVXhxWpGM7Do8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705487737; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=nth56fFFht9rllBOlFGI4K6uIkBPIOdelhbTRMVES2Y=; b=RDnbbVoy2NJlRT5iqJ/KbaszBuPtIODEZbzI372DC47GHxImeGdZ4vip9MXun5ECJsdBUX l8GihNQHo9/XT+nWlw/M3b08QP5Obs13GHEtoCD/0ii2wtV+OtqXOTQvUFJSkaW/GJd9gt grld+3KH1rHuYyVhQ//ReqMla1Go/uw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-48-CcAkOS8bPg2yZsFCe466WA-1; Wed, 17 Jan 2024 05:35:35 -0500 X-MC-Unique: CcAkOS8bPg2yZsFCe466WA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE13E85A588 for ; Wed, 17 Jan 2024 10:35:34 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92D2AC15A0C for ; Wed, 17 Jan 2024 10:35:34 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 40HAZWKY2309353 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 17 Jan 2024 11:35:32 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 40HAZVNM2309352 for gcc-patches@gcc.gnu.org; Wed, 17 Jan 2024 11:35:31 +0100 Date: Wed, 17 Jan 2024 11:35:31 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Add testcase for already fixed PR [PR110251] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788333554987930406 X-GMAIL-MSGID: 1788333554987930406 Hi! This testcase started to hang at -O3 with r13-4208 and got fixed with r14-2097. Regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2024-01-17 Jakub Jelinek PR tree-optimization/110251 * gcc.c-torture/compile/pr110251.c: New test. Jakub --- gcc/testsuite/gcc.c-torture/compile/pr110251.c.jj 2024-01-16 20:39:50.605210933 +0100 +++ gcc/testsuite/gcc.c-torture/compile/pr110251.c 2024-01-16 20:39:43.568310057 +0100 @@ -0,0 +1,27 @@ +/* PR tree-optimization/110251 */ + +int a, b; +signed char c; + +int +foo (int e) +{ + if (e >= 'a') + return e; +} + +int +bar (unsigned short e) +{ + for (; e; a++) + e &= e - 1; +} + +void +baz (void) +{ + while (c < 1) + ; + for (; bar (c - 1); b = foo (c)) + ; +}