From patchwork Mon Nov 15 12:42:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Bolton X-Patchwork-Id: 71215 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 1DB4BB7104 for ; Mon, 15 Nov 2010 23:43:18 +1100 (EST) Received: (qmail 8597 invoked by alias); 15 Nov 2010 12:43:15 -0000 Received: (qmail 8582 invoked by uid 22791); 15 Nov 2010 12:43:14 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, MSGID_MULTIPLE_AT, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (217.140.96.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Nov 2010 12:42:34 +0000 Received: from cam-owa1.Emea.Arm.com (cam-owa1.emea.arm.com [10.1.255.62]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id oAFCauF9024578 for ; Mon, 15 Nov 2010 12:36:56 GMT Received: from E102352 ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Mon, 15 Nov 2010 12:42:31 +0000 From: "Ian Bolton" To: Subject: [PATCH] Fix some tests that require no-short-enums Date: Mon, 15 Nov 2010 12:42:27 -0000 Message-ID: <000001cb84c2$8fcb7a70$af626f50$@bolton@arm.com> 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 The following two test cases were failing bare-metal on ARM, but working on Linux: gcc.c-torture/compile/pr39845.c c-c++-common/pr44832.c Both failed to compile: "error: width of 'code' exceeds its type". The fix was to make them compile with -fno-short-enums, as the tests implicitly require this (it's the default on Linux), but it needs to be explicitly requested on "short_enums" targets. The fixed tests now pass bare-metal (and Linux). OK for trunk? Cheers, Ian 2010-11-15 Ian Bolton * testsuite/c-c++-common/pr44832.c: Use -fno-short-enums option for "target short_enums". * testsuite/gcc.c-torture/compile/pr39845.c: Likewise. typedef struct rtx_def *rtx; Index: gcc/testsuite/gcc.c-torture/compile/pr39845.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr39845.c (revision 166433) +++ gcc/testsuite/gcc.c-torture/compile/pr39845.c (working copy) @@ -1,3 +1,5 @@ + +/* { dg-options "-fno-short-enums" {target short_enums} } */ typedef union tree_node *tree; enum tree_code { EXCESS_PRECISION_EXPR }; enum built_in_function { BUILT_IN_ACOS, BUILT_IN_FPCLASSIFY, BUILT_IN_ISFINITE }; Index: gcc/testsuite/c-c++-common/pr44832.c =================================================================== --- gcc/testsuite/c-c++-common/pr44832.c (revision 166433) +++ gcc/testsuite/c-c++-common/pr44832.c (working copy) @@ -1,6 +1,7 @@ /* PR debug/44832 */ /* { dg-do compile } */ /* { dg-options "-O2 -fcompare-debug" } */ +/* { dg-options "-O2 -fcompare-debug -fno-short-enums" {target short_enums} } */ struct rtx_def;