From patchwork Fri Aug 1 12:35:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 375745 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 92626140085 for ; Fri, 1 Aug 2014 22:39:04 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=a0dZ5yNmQ9Iy/3feJbnP5E59LWvi1teP8BsTHOBbdI4YVCdZ75rB0 yoNuQP0hU+RtYY3w0PwRPFszmRhB2unV01dhgid2EJjgoJV0M/awzYp5EjzBJ/IP 5ehl+KLF8jU0ujMIImkCplB6rOZCDOicikAAG6ox0kJtwfB6+WvVpM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=2PZKzzt/fdYfAP+mG6xX/vPqFeg=; b=ZQKC4asn611PJJ1LI2fe PtxPydWOubJayeeIH0C10uayDXxSEcI/fcrzX9QSRih01tsZyiZtkS51O8CvUXTy dKWanqwHcSZRAgJ/uJtecWfRGqoOhzXSU0Y0spRBMTXy7gdewEq/wrHZ0s5Zz2tF IP/2iGORLvzYJvwAYJuDTyc= Received: (qmail 26271 invoked by alias); 1 Aug 2014 12:38:57 -0000 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 Received: (qmail 26259 invoked by uid 89); 1 Aug 2014 12:38:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 01 Aug 2014 12:38:54 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EABE1ACFF for ; Fri, 1 Aug 2014 12:38:50 +0000 (UTC) Date: Fri, 1 Aug 2014 14:35:50 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR61762 testcase Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 After trying to fix the missed optimization on strict-align targets in a fancy way for some time I gave up and this fixes the testcase instead. Tested on a sparc cross and on x86_64-unknown-linux-gnu, applied. Richard. 2014-08-01 Richard Biener PR middle-end/61762 * gcc.dg/pr61762.c: Align the string to make the testcase work on strict-align targets. Index: gcc/testsuite/gcc.dg/pr61762.c =================================================================== --- gcc/testsuite/gcc.dg/pr61762.c (revision 213342) +++ gcc/testsuite/gcc.dg/pr61762.c (working copy) @@ -3,7 +3,7 @@ unsigned int f() { - static const char string[] = "Private"; + static const char string[] __attribute__((aligned(sizeof(int)))) = "Private"; unsigned int priv; __builtin_memcpy(&priv, &string[0], sizeof(priv));