From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18636 invoked by alias); 15 Sep 2012 00:29:46 -0000 Received: (qmail 18627 invoked by uid 22791); 15 Sep 2012 00:29:45 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_JS X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 15 Sep 2012 00:29:32 +0000 From: "jsm28 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/54552] [4.6/4.7 Regression] Cast to pointer to VLA crash the compiler Date: Sat, 15 Sep 2012 00:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jsm28 at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-09/txt/msg01145.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54552 --- Comment #5 from Joseph S. Myers 2012-09-15 00:29:31 UTC --- Author: jsm28 Date: Sat Sep 15 00:29:28 2012 New Revision: 191337 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191337 Log: PR c/54552 * c-typeck.c (c_cast_expr): When casting to a type requiring C_MAYBE_CONST_EXPR to be created, pass the inner expression to c_fully_fold first. testsuite: * gcc.c-torture/compile/pr54552-1.c: New test. Added: branches/gcc-4_6-branch/gcc/testsuite/gcc.c-torture/compile/pr54552-1.c Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/c-typeck.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog