summaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-30 14:20:29 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-30 14:20:29 +0000
commitd25c779e19b9c6d4f96ba4d6b0611b60d0ea0719 (patch)
tree16a9f77dfa88a4e960235838eb97546b981db960 /gcc/recog.c
parent485c79efee51e716fd14c0603d96fbc5775018ad (diff)
downloadgcc-d25c779e19b9c6d4f96ba4d6b0611b60d0ea0719.tar.gz
* recog.c (verify_changes): Verify that changes[i].old is non-zero
before applying REG_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202107 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 2d44416892e..690b20e4751 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -397,7 +397,10 @@ verify_changes (int num)
MEM_ADDR_SPACE (object)))
break;
}
- else if (REG_P (changes[i].old)
+ else if (/* changes[i].old might be zero, e.g. when putting a
+ REG_FRAME_RELATED_EXPR into a previously empty list. */
+ changes[i].old
+ && REG_P (changes[i].old)
&& asm_noperands (PATTERN (object)) > 0
&& REG_EXPR (changes[i].old) != NULL_TREE
&& DECL_ASSEMBLER_NAME_SET_P (REG_EXPR (changes[i].old))