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 <mli...@suse.cz> Date: Mon, 19 Jan 2015 14:37:50 +0100 Subject: [PATCH] Fix PR64668. gcc/testsuite/ChangeLog: 2015-01-19 Martin Liska <mli...@suse.cz> * objc/compile/pr64668.m: New test. gcc/ChangeLog: 2015-01-19 Martin Liska <mli...@suse.cz> 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 <NSObject> {} +@end typedef double NSTimeInterval; +@interface NSString :NSObject <NSCoding, NSCopying, NSMutableCopying> + (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