From patchwork Wed Jun 13 21:12:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Johnson X-Patchwork-Id: 164763 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 0A7D1B7002 for ; Thu, 14 Jun 2012 07:12:40 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1340226761; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-ID:Date:From:Reply-To:User-Agent:MIME-Version: To:Subject:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=Yr41x9ILW9DpWR30NiaxAaHbuyc=; b=agGzfzLa89Qw13z ZPf19Jt0QLncBly5zexm70hfI+9PlRY6tujppXuBaa8dhKYKgyQpt2ks3M2Q78qf RbWTe8gRnnWlzgmujbNH8r5rBXOiMzJuzKb9Uw47PUh1mIg3lKjGhkEpq7e2IiQD HjtYndoKIsV/LWfOR0uPlNeD9nSU= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Message-ID:Date:From:Reply-To:User-Agent:MIME-Version:To:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=anXOpwTDFjcqGpnXb9vXFO9j4pfwSXzMnvIwYEMS4Wsd1jPdeCsDhDFb1wZ3bA pkAAAG7us2Ay2Y6mnhEmErbW7ckCsdXI90yPYIbehh2PPy3Zc6l1BmyIj2se+IdH hDKIEgD5XhuBp+o/uqha1KCykfzFy+K+u1vWRoVwAfcXE=; Received: (qmail 27453 invoked by alias); 13 Jun 2012 21:12:36 -0000 Received: (qmail 27436 invoked by uid 22791); 13 Jun 2012 21:12:34 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jun 2012 21:12:17 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SeurQ-0004Of-4P from Janis_Johnson@mentor.com for gcc-patches@gcc.gnu.org; Wed, 13 Jun 2012 14:12:16 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 13 Jun 2012 14:11:40 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Wed, 13 Jun 2012 14:12:15 -0700 Message-ID: <4FD90237.2070104@mentor.com> Date: Wed, 13 Jun 2012 14:12:23 -0700 From: Janis Johnson Reply-To: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [testsuite] more gcc.dg tests: add comments to dg-error and friends 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 This patch modifies miscellaneous tests in gcc/testsuite/gcc.dg to specify comments in dg-message/dg-warning/dg-error test directives for checks for multiple messages for the same line of source code. Tested on i686-pc-linux-gnu. OK for mainline? Janis 2012-06-13 Janis Johnson * gcc.dg/di-longlong64-sync-1.c: Add comments to checks for multiple messages reported for one line of source code. * gcc.dg/format/few-1.c: Likewise. * gcc.dg/ia64-sync-2.c: Likewise. * gcc.dg/sync-2.c: Likewise. * gcc.dg/noncompile/pr44517.c: Likewise. * gcc.dg/noncompile/pr52290.c: Likewise. Index: gcc.dg/di-longlong64-sync-1.c =================================================================== --- gcc.dg/di-longlong64-sync-1.c (revision 188482) +++ gcc.dg/di-longlong64-sync-1.c (working copy) @@ -3,8 +3,8 @@ /* { dg-options "-std=gnu99" } */ /* { dg-additional-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ -/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */ -/* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */ +/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "fetch_and_nand" { target *-*-* } 0 } */ +/* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "nand_and_fetch" { target *-*-* } 0 } */ /* Test basic functionality of the intrinsics. The operations should Index: gcc.dg/format/few-1.c =================================================================== --- gcc.dg/format/few-1.c (revision 188482) +++ gcc.dg/format/few-1.c (working copy) @@ -4,15 +4,15 @@ int f(int *ip, char *cp) { __builtin_printf ("%*.*s"); -/* { dg-warning "field width specifier '\\*' expects a matching 'int' argument" "" { target *-*-* } 6 } */ -/* { dg-warning "field precision specifier '\\.\\*' expects a matching 'int' argument" "" { target *-*-* } 6 } */ -/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "" { target *-*-* } 6 } */ +/* { dg-warning "field width specifier '\\*' expects a matching 'int' argument" "width" { target *-*-* } 6 } */ +/* { dg-warning "field precision specifier '\\.\\*' expects a matching 'int' argument" "precision" { target *-*-* } 6 } */ +/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "format" { target *-*-* } 6 } */ __builtin_printf ("%*.*s", ip, *cp); -/* { dg-warning "field width specifier '\\*' expects argument of type 'int'" "" { target *-*-* } 10 } */ -/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "" { target *-*-* } 10 } */ +/* { dg-warning "field width specifier '\\*' expects argument of type 'int'" "width" { target *-*-* } 10 } */ +/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "format" { target *-*-* } 10 } */ __builtin_printf ("%s %i", ip, ip); -/* { dg-warning "format '%s' expects argument of type 'char \\*'" "" { target *-*-* } 13 } */ -/* { dg-warning "format '%i' expects argument of type 'int'" "" { target *-*-* } 13 } */ +/* { dg-warning "format '%s' expects argument of type 'char \\*'" "char" { target *-*-* } 13 } */ +/* { dg-warning "format '%i' expects argument of type 'int'" "int" { target *-*-* } 13 } */ __builtin_printf ("%s %i", cp); /* { dg-warning "format '%i' expects a matching 'int' argument" "" { target *-*-* } 16 } */ __builtin_printf ("%lc"); Index: gcc.dg/ia64-sync-2.c =================================================================== --- gcc.dg/ia64-sync-2.c (revision 188482) +++ gcc.dg/ia64-sync-2.c (working copy) @@ -4,8 +4,8 @@ /* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ /* { dg-options "-mcpu=v9" { target sparc*-*-* } } */ -/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */ -/* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */ +/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "fetch_and_nand" { target *-*-* } 0 } */ +/* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "nand_and_fetch" { target *-*-* } 0 } */ /* Test basic functionality of the intrinsics. */ Index: gcc.dg/sync-2.c =================================================================== --- gcc.dg/sync-2.c (revision 188482) +++ gcc.dg/sync-2.c (working copy) @@ -4,8 +4,8 @@ /* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ /* { dg-options "-mcpu=v9" { target sparc*-*-* } } */ -/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */ -/* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */ +/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "fetch_and_nand" { target *-*-* } 0 } */ +/* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "nand_and_fetch" { target *-*-* } 0 } */ /* Test functionality of the intrinsics for 'short' and 'char'. */ Index: gcc.dg/noncompile/pr44517.c =================================================================== --- gcc.dg/noncompile/pr44517.c (revision 188482) +++ gcc.dg/noncompile/pr44517.c (working copy) @@ -1,7 +1,7 @@ /* PR c/44517: Improve diagnostic for misspelled typename in function declaration. */ int f1(int x, pid_t y, long z, in t) { -/* { dg-error "unknown type name 'pid_t'" "" { target *-*-* } 2 } */ -/* { dg-error "unknown type name 'in'" "" { target *-*-* } 2 } */ +/* { dg-error "unknown type name 'pid_t'" "pid_t" { target *-*-* } 2 } */ +/* { dg-error "unknown type name 'in'" "in" { target *-*-* } 2 } */ return x + y + z + t; } Index: gcc.dg/noncompile/pr52290.c =================================================================== --- gcc.dg/noncompile/pr52290.c (revision 188482) +++ gcc.dg/noncompile/pr52290.c (working copy) @@ -1,3 +1,3 @@ -/* { dg-error "undeclared here" "" { target *-*-* } 3 } */ -/* { dg-error "expected" "" { target *-*-* } 3 } */ +/* { dg-error "undeclared here" "undeclared" { target *-*-* } 3 } */ +/* { dg-error "expected" "expected" { target *-*-* } 3 } */ int f()[j]