From 6b984df0dadb6a050587b6b161df9d8e976c7ac7 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 19 Jan 2015 23:02:04 +0100 Subject: [PATCH] re PR ipa/64668 (internal compiler error: in compare_ssa_name, at ipa-icf-gimple.c:120) Fix PR64668. * objc/compile/pr64668.m: New test. PR ipa/64668 * ipa-icf-gimple.c (func_checker::compare_operand): Call proper function for second argument of OBJ_TYPE_REF. From-SVN: r219861 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-icf-gimple.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/objc/compile/pr64668.m | 20 ++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/objc/compile/pr64668.m diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea61db20226..932485f135f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2015-01-19 Jan Hubicka PR ipa/64218 diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index b35d66c9a45..5b176d019d7 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/ChangeLog b/gcc/testsuite/ChangeLog index 03da146fe4a..13bc7ce82b7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-01-19 Martin Liska + + * objc/compile/pr64668.m: New test. + 2015-01-19 David Malcolm * jit.dg/test-arith-overflow.c: Include stdbool.h. diff --git a/gcc/testsuite/objc/compile/pr64668.m b/gcc/testsuite/objc/compile/pr64668.m new file mode 100644 index 00000000000..23a15d21c39 --- /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.30.2