Index: gcc/gcc/combine.c |
diff --git a/gcc/gcc/combine.c b/gcc/gcc/combine.c |
index 5078f3e4e7566528e0e4cc7de8fa38b80eece1f2..3eb2123dd3ced77621ee79c993aba92b78a467dd 100644 |
--- a/gcc/gcc/combine.c |
+++ b/gcc/gcc/combine.c |
@@ -9892,8 +9892,11 @@ gen_lowpart_for_combine (enum machine_mode omode, rtx x) |
return x; |
/* Return identity if this is a CONST or symbolic reference. */ |
+ /* HACK? |
pasko-google - do not use
2010/12/24 16:13:09
"TODO(eaeltsin)" would be more stylish than "HACK?
|
+ When ptr_mode != Pmode, we should not return CONST:ptr_mode for Pmode |
+ and vice versa as this confuses SUBST. */ |
if (omode == Pmode |
- && (GET_CODE (x) == CONST |
+ && ((GET_CODE (x) == CONST && ptr_mode == Pmode) |
|| GET_CODE (x) == SYMBOL_REF |
|| GET_CODE (x) == LABEL_REF)) |
return x; |