aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2012-02-22 20:12:09 +0100
committerUros Bizjak <uros@gcc.gnu.org>2012-02-22 20:12:09 +0100
commit9517e33332fedbeb98a80a96b4ee434c4bca1023 (patch)
treef58ba8937095628d3d124a39c24ef2956e014e94 /gcc/config
parent4ff89fcbf2b77347a477f4f0725e1a11894eaf6d (diff)
downloadgcc-9517e33332fedbeb98a80a96b4ee434c4bca1023.zip
gcc-9517e33332fedbeb98a80a96b4ee434c4bca1023.tar.gz
gcc-9517e33332fedbeb98a80a96b4ee434c4bca1023.tar.bz2
re PR target/52330 (pr50305.c: valgrind problem on invalid asm)
PR target/52330 * config/i386/i386.c (ix86_print_operand) <case 'H'>: Error out if x is not offsettable memory reference. testsuite/ChangeLog: PR target/52330 * gcc.target/i386/pr52330.c: New test. From-SVN: r184488
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7c5ed4d..24dbc49 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -14091,6 +14091,13 @@ ix86_print_operand (FILE *file, rtx x, int code)
return;
case 'H':
+ if (!offsettable_memref_p (x))
+ {
+ output_operand_lossage ("operand is not an offsettable memory "
+ "reference, invalid operand "
+ "code 'H'");
+ return;
+ }
/* It doesn't actually matter what mode we use here, as we're
only going to use this for printing. */
x = adjust_address_nv (x, DImode, 8);