From patchwork Fri Dec 16 23:11:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 131938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 780B31007D7 for ; Sat, 17 Dec 2011 10:12:00 +1100 (EST) Received: (qmail 8835 invoked by alias); 16 Dec 2011 23:11:58 -0000 Received: (qmail 8826 invoked by uid 22791); 16 Dec 2011 23:11:57 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Dec 2011 23:11:44 +0000 Received: by iakh37 with SMTP id h37so1718213iak.20 for ; Fri, 16 Dec 2011 15:11:44 -0800 (PST) Received: by 10.50.186.165 with SMTP id fl5mr11300184igc.86.1324077104424; Fri, 16 Dec 2011 15:11:44 -0800 (PST) Received: by 10.50.186.165 with SMTP id fl5mr11300163igc.86.1324077104184; Fri, 16 Dec 2011 15:11:44 -0800 (PST) Received: from coign.google.com ([2620:0:1000:2301:f2de:f1ff:fe40:72a8]) by mx.google.com with ESMTPS id d19sm37375025ibh.8.2011.12.16.15.11.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Dec 2011 15:11:43 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Subject: gcc testsuite patch committed: Add new test Date: Fri, 16 Dec 2011 15:11:41 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes 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 I committed this patch as a test case I worked up for PR 51592. It turns out that Jakub already fixed the problem, but he was only working from a Go test case. This patch adds a C test case in the hopes of making the problem less likely to recur. Committed to mainline. Ian 2011-12-16 Ian Lance Taylor PR middle-end/51592 * gcc.dg/20111216-1.c: New test. Index: gcc.dg/20111216-1.c =================================================================== --- gcc.dg/20111216-1.c (revision 0) +++ gcc.dg/20111216-1.c (revision 0) @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fexceptions -fnon-call-exceptions" } */ + +extern void f2 () __attribute__ ((noreturn)); +void +f1 () +{ + unsigned char a[8]; + unsigned int i; + + for (i = 0; i < 8; i++) + { + if (i > 8) + f2 (); + a[i] = i <= 8; + } +}