From patchwork Mon Jan 19 18:15:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 430638 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 448BF14017D for ; Tue, 20 Jan 2015 05:16:13 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=tUUp788UTxlanaWj8YTdt21HLuXZMaVcp1TnzVyA94Z MGCroPvyAUBAsvXIgvEQZnnNK0b7PHW0Bf7JjRgTzfM1mvN3ft/QKzyJ51M6lg6L TN/tAvsBkaHsvTEm5a6txLbY46jF91uNteNlOAip6vclX2dKwuuRJ6bzD4SFFQp0 = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=suT7BIlqhfbP8coeNrCFwb7rh+o=; b=GvK8z+tT8WDmeY+5Z fukpieugEP9H+XmV53cvZbEeMEiwHwl+zULPSVvKkIYVdELXjiahaPLu0dJPr825 Ir3wa0aGAOhn9GGUZbwGEOS2QeKHK83rp13DQRQuAk/UrZmOr7jLBXrxqoHyY2r+ 9OQL0ial6cKsvid4HdQ9CjcBtY= Received: (qmail 31981 invoked by alias); 19 Jan 2015 18:15:46 -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 31883 invoked by uid 89); 19 Jan 2015 18:15:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00 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; Mon, 19 Jan 2015 18:15:43 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 45F59AD94; Mon, 19 Jan 2015 18:15:40 +0000 (UTC) Message-ID: <54BD49CB.5090803@suse.cz> Date: Mon, 19 Jan 2015 19:15:39 +0100 From: =?UTF-8?B?TWFydGluIExpxaFrYQ==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "gcc-pa >> GCC Patches" CC: "hubick >> Jan Hubicka" Subject: [PATCH] Fix PR ipa/64668 X-IsSubscribed: yes Hello. This is fix for PR64668, where I did a wrong assumption about an arguments of OBJ_TYPE_REF tree type. I've been testing the patch on x86_64-linux-pc, ready after it finishes? Thanks, Martin From 54840c592a866eca0a535cdda3714b4251042153 Mon Sep 17 00:00:00 2001 From: mliska Date: Mon, 19 Jan 2015 14:37:50 +0100 Subject: [PATCH] Fix PR64668. gcc/testsuite/ChangeLog: 2015-01-19 Martin Liska * objc/compile/pr64668.m: New test. gcc/ChangeLog: 2015-01-19 Martin Liska PR ipa/64668 * ipa-icf-gimple.c (func_checker::compare_operand): Call proper function for second argument of OBJ_TYPE_REF. --- gcc/ipa-icf-gimple.c | 2 +- gcc/testsuite/objc/compile/pr64668.m | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/objc/compile/pr64668.m diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index b35d66c..5b176d0 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -456,7 +456,7 @@ func_checker::compare_operand (tree t1, tree t2) z2 = TREE_OPERAND (t2, 2); ret = compare_ssa_name (x1, x2) - && compare_ssa_name (y1, y2) + && compare_operand (y1, y2) && compare_cst_or_decl (z1, z2); return return_with_debug (ret); diff --git a/gcc/testsuite/objc/compile/pr64668.m b/gcc/testsuite/objc/compile/pr64668.m new file mode 100644 index 0000000..23a15d2 --- /dev/null +++ b/gcc/testsuite/objc/compile/pr64668.m @@ -0,0 +1,20 @@ +typedef struct objc_object {} *id; +typedef struct _NSZone NSZone; +@class NSCoder; +@protocol NSObject - (Class) class; +@end @protocol NSCopying - (id) copyWithZone: (NSZone*)zone; +@end @protocol NSMutableCopying - (id) mutableCopyWithZone: (NSZone*)zone; +@end @protocol NSCoding - (void) encodeWithCoder: (NSCoder*)aCoder; +@end @interface NSObject {} +@end typedef double NSTimeInterval; +@interface NSString :NSObject + (id) string; +@end @interface NSConstantString : NSString {} +@end @class NSMutableArray, NSMutableDictionary, NSMutableData, NSData, NSString; +@interface NSBundle : NSObject {} +enum { NSMixedState = -1, NSOffState = 0, NSOnState = 1 }; +@end @class NSWindow; +@interface IBInspector : NSObject { id object; } +@end @interface GormScrollViewAttributesInspector : IBInspector { id verticalScroll; id horizontalScroll; } +@end @implementation GormScrollViewAttributesInspector - init {} +- (void) verticalSelected: (id)sender { [super ok: sender]; [object setHasVerticalScroller: ([verticalScroll state] == NSOnState)]; } +- (void) horizontalSelected: (id)sender { [super ok: sender]; [object setHasHorizontalScroller: ([horizontalScroll state] == NSOnState)]; } -- 2.1.2