aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--gcc/ChangeLog32
-rw-r--r--gcc/config/i386/i386.c7
-rw-r--r--gcc/testsuite/ChangeLog17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52330.c7
4 files changed, 41 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 70b924b..48488af 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-22 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/52330
+ * config/i386/i386.c (ix86_print_operand) <case 'H'>: Error out if x
+ is not offsettable memory reference.
+
2012-02-22 Georg-Johann Lay <avr@gjlay.de>
PR target/18145
@@ -7,7 +13,7 @@
2012-02-22 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.h (avr_accumulate_outgoing_args): Return int.
- * config/avr/avr.c (avr_accumulate_outgoing_args): Return int.
+ * config/avr/avr.c (avr_accumulate_outgoing_args): Return int.
2012-02-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
@@ -422,8 +428,7 @@
2012-02-14 Bernd Schmidt <bernds@codesourcery.com>
* haifa-sched.c (prune_ready_list): Ensure that if there is a
- sched-group insn, it either remains alone or the entire list is
- pruned.
+ sched-group insn, it either remains alone or the entire list is pruned.
2012-02-14 Jonathan Wakely <jwakely.gcc@gmail.com>
@@ -543,8 +548,8 @@
* gcc.c (LINK_COMMAND_SPEC): Deal with -fgnu-tm.
(GTM_SELF_SPECS): Define if not already defined.
(driver_self_specs): Add GTM_SELF_SPECS.
- * config/darwin.h (LINK_COMMAND_SPEC_A): Deal with -fgnu-tm.
- (GTM_SELF_SPECS): Define.
+ * config/darwin.h (LINK_COMMAND_SPEC_A): Deal with -fgnu-tm.
+ (GTM_SELF_SPECS): Define.
* config/i386/cygwin.h (GTM_SELF_SPECS): Likewise.
* config/i386/mingw32.h (GTM_SELF_SPECS): Likewise.
@@ -553,13 +558,11 @@
* cselib.c (expand_loc): Return sp, fp, hfp or cfa base reg right
away if seen.
- * cselib.c (dump_cselib_val): Don't assume l->setting_insn is
- non-NULL.
+ * cselib.c (dump_cselib_val): Don't assume l->setting_insn is non-NULL.
PR middle-end/52230
- * omp-low.c (expand_omp_for): If a static schedule without
- chunk size has NULL region->cont, force fd.chunk_size to be
- integer_zero_node.
+ * omp-low.c (expand_omp_for): If a static schedule without chunk size
+ has NULL region->cont, force fd.chunk_size to be integer_zero_node.
2012-02-13 Andrew MacLeod <amacleod@redhat.com>
@@ -583,7 +586,7 @@
disallow changes from SFmode to mode with different size in FP regs.
2012-02-12 Robert Millan <rmh@gnu.org>
- Gerald Pfeifer <gerald@pfeifer.com>
+ Gerald Pfeifer <gerald@pfeifer.com>
* ginclude/stddef.h [__FreeBSD_kernel__] (__size_t): Do not define.
Tweak comment.
@@ -607,8 +610,7 @@
2012-02-11 Jakub Jelinek <jakub@redhat.com>
PR debug/52132
- * reg-stack.c (subst_stack_regs_in_debug_insn): Don't use
- get_true_reg.
+ * reg-stack.c (subst_stack_regs_in_debug_insn): Don't use get_true_reg.
2012-02-11 Uros Bizjak <ubizjak@gmail.com>
@@ -969,8 +971,8 @@
* config/mips/mips-dspr2.md (mips_prepend): Mask operand 3 rather
than operand 2.
-2012-02-02 Jan Hubicka <jh@suse.cz>
- Tom de Vries <tom@codesourcery.com>
+2012-02-02 Jan Hubicka <jh@suse.cz>
+ Tom de Vries <tom@codesourcery.com>
PR middle-end/51998
* cgraphunit.c (cgraph_analyze_function): Break cyclic aliases.
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);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d52a3c9..9134d73 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-22 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/52330
+ * gcc.target/i386/pr52330.c: New test.
+
2012-02-22 Tobias Burnus <burnus@net-b.de>
PR fortran/52335
@@ -10,8 +15,7 @@
2012-02-21 Kai Tietz <ktietz@redhat.com>
- * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield
- as extension.
+ * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield as extension.
2012-02-21 Richard Guenther <rguenther@suse.de>
@@ -154,10 +158,9 @@
2012-02-14 Hans-Peter Nilsson <hp@axis.com>
- * lib/target-supports.exp (check_effective_target_fgnu_tm): New
- proc.
+ * lib/target-supports.exp (check_effective_target_fgnu_tm): New proc.
* gfortran.dg/trans-mem-skel.f90: Gate test on effective_target
- fgnu_tm.
+ fgnu_tm.
* gcc.dg/lto/trans-mem-1_0.c, gcc.dg/lto/trans-mem-2_0.c,
gcc.dg/lto/trans-mem-3_0.c, gcc.dg/lto/trans-mem-4_0.c: Ditto.
* gcc.dg/tm/tm.exp: Gate the whole of gcc.dg/tm on
@@ -531,8 +534,8 @@
* gcc.target/mips/mips-prepend-1.c: New test.
-2012-02-02 Jan Hubicka <jh@suse.cz>
- Tom de Vries <tom@codesourcery.com>
+2012-02-02 Jan Hubicka <jh@suse.cz>
+ Tom de Vries <tom@codesourcery.com>
PR middle-end/51998
* testsuite/gcc.dg/alias-12.c: New testcase.
diff --git a/gcc/testsuite/gcc.target/i386/pr52330.c b/gcc/testsuite/gcc.target/i386/pr52330.c
new file mode 100644
index 0000000..22ba0b2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr52330.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+void foo (int a)
+{
+ asm volatile ("# %H0" : : "r" (a)); /* { dg-error "not an offsettable" } */
+}