From patchwork Sun Oct 17 10:11:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 68074 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 E9A59B70D4 for ; Sun, 17 Oct 2010 21:11:39 +1100 (EST) Received: (qmail 25624 invoked by alias); 17 Oct 2010 10:11:38 -0000 Received: (qmail 25616 invoked by uid 22791); 17 Oct 2010 10:11:37 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL, BAYES_00, TW_BJ, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 17 Oct 2010 10:11:32 +0000 Received: from eggs.gnu.org ([140.186.70.92]:55510) by fencepost.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P7QDC-0005Ni-UA for gcc-patches@gnu.org; Sun, 17 Oct 2010 06:11:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7QDC-0005Gx-0i for gcc-patches@gnu.org; Sun, 17 Oct 2010 06:11:31 -0400 Received: from smtp131.iad.emailsrvr.com ([207.97.245.131]:57608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7QDB-0005G4-Ua for gcc-patches@gnu.org; Sun, 17 Oct 2010 06:11:29 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp33.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 5B474301F1 for ; Sun, 17 Oct 2010 06:11:27 -0400 (EDT) X-Orig-To: gcc-patches@gnu.org Received: from dynamic12.wm-web.iad.mlsrvr.com (dynamic12.wm-web.iad1a.rsapps.net [192.168.2.219]) by smtp33.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 4B06E300B8 for ; Sun, 17 Oct 2010 06:11:27 -0400 (EDT) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic12.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 3DBFE2168082 for ; Sun, 17 Oct 2010 06:11:27 -0400 (EDT) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Sun, 17 Oct 2010 12:11:27 +0200 (CEST) Date: Sun, 17 Oct 2010 12:11:27 +0200 (CEST) Subject: libobjc - testcase for pr18255.m From: "Nicola Pero" To: "gcc-patches@gnu.org" MIME-Version: 1.0 X-Type: plain Message-ID: <1287310287.25177978@192.168.2.227> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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 I fixed objc/18255 (really, a libobjc bug) while working on the protocol initialization in libobjc the other day. This is the associated testcase (which segfaults my stock 4.1.2 GCC, but runs fine on trunk). :-) Committed to trunk. Thanks Index: ChangeLog =================================================================== --- ChangeLog (revision 165577) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2010-10-17 Nicola Pero + + PR objc/18255 + * objc.dg/pr18255.m: New. + 2010-10-16 Jan Hubicka PR middle-end/44206 Index: objc.dg/pr18255.m =================================================================== --- objc.dg/pr18255.m (revision 0) +++ objc.dg/pr18255.m (revision 0) @@ -0,0 +1,24 @@ +/* This is a test for a GNU Objective-C Runtime library bug. */ +/* { dg-do run } */ +/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ + +#include +#include + +@protocol a +- aMethod; +@end + + +@protocol b +- bMethod; +@end + + +int main (int argc, char **argv) +{ + if ([@protocol(b) descriptionForInstanceMethod: @selector(aMethod)] == NULL) + abort (); + + return 0; +}