From patchwork Thu Oct 7 14:58:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 67063 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 CE8C0B70AB for ; Fri, 8 Oct 2010 01:58:45 +1100 (EST) Received: (qmail 18999 invoked by alias); 7 Oct 2010 14:58:44 -0000 Received: (qmail 18990 invoked by uid 22791); 7 Oct 2010 14:58:43 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Oct 2010 14:58:38 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 6CD249417A for ; Thu, 7 Oct 2010 16:58:36 +0200 (CEST) Date: Thu, 7 Oct 2010 16:58:36 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Testcase for PR45732 Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 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 Committed. Richard. 2010-10-07 Richard Guenther PR tree-optimization/45732 * gcc.dg/torture/pr45732.c: New testcase. Index: gcc/testsuite/gcc.dg/torture/pr45732.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr45732.c (revision 0) +++ gcc/testsuite/gcc.dg/torture/pr45732.c (revision 0) @@ -0,0 +1,10 @@ +/* { dg-do compile } */ + +typedef char chars[5]; +const chars bad_chars[] = { "" }; + +int foo () +{ + const chars *c = bad_chars; + return c[0][0]; +}