From patchwork Fri Jan 14 14:37:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Bolton X-Patchwork-Id: 78931 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 50EB6B70B3 for ; Sat, 15 Jan 2011 01:37:27 +1100 (EST) Received: (qmail 26546 invoked by alias); 14 Jan 2011 14:37:22 -0000 Received: (qmail 26377 invoked by uid 22791); 14 Jan 2011 14:37:21 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, MSGID_MULTIPLE_AT, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 14 Jan 2011 14:37:15 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 14 Jan 2011 14:37:11 +0000 Received: from E102352 ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 14 Jan 2011 14:37:08 +0000 From: "Ian Bolton" To: Subject: [patch, testsuite] Fix another short-enums testsuite error Date: Fri, 14 Jan 2011 14:37:04 -0000 Message-ID: <000001cbb3f8$8351ab60$89f50220$@bolton@arm.com> MIME-Version: 1.0 X-MC-Unique: 111011414371100401 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 The following test case was failing bare-metal on ARM, but working on Linux: gcc.dg/20100906-1.c The fix was to make it compile with -fno-short-enums, as the test implicitly requires this (it's the default on Linux), but it needs to be explicitly requested on "short_enums" targets. Note that this change leads to a linker warning due to a subsequent mismatch between variable-size enums for the file and 32-bit enums (for the gcc_tg.o "testglue" file), so I have also added a filter on this warning. The fixed test now passes bare-metal (and Linux). OK for trunk? Cheers, Ian 2011-01-14 Ian Bolton * testsuite/gcc.dg/20100906-1.c: Use -fno-short-enums option for "target short_enums", filter linker warning. Index: gcc/testsuite/gcc.dg/20100906-1.c =================================================================== --- gcc/testsuite/gcc.dg/20100906-1.c (revision 168543) +++ gcc/testsuite/gcc.dg/20100906-1.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-options "-O2 -fno-short-enums" {target short_enums} } */ +/* { dg-prune-output "yet the output is to use variable-size enums" } */ /* This testcase got misoptimized by combine due to a wrong setting of subst_low_luid in try_combine. */