This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/49721] convert_memory_address_addr_space may generate invalid new insns


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49721

--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-02 18:36:33 UTC ---
(In reply to comment #8)

> > #0  try_combine (i3=<optimized out>, i2=<optimized out>, i1=0x0, i0=<optimized
> > out>, new_direct_jump_p=0x7fffffffdf54, 
> >     last_combined_insn=0x7ffff1a12c60) at
> > ../../gcc-svn/trunk/gcc/combine.c:4154
> 
> That is because simplify-rtx.c generates new insns via
> convert_memory_address_addr_space.

Yeah, but during the combine pass?!

Every memory access before the combine is referred via DImode symbol and/or
DImode reg combination, which is perfectly OK.

It looks to me that combine pass needs some additional conditions to not do
stupid things. To confirm this, try disabling combine pass with:

Index: combine.c
===================================================================
--- combine.c    (revision 177171)
+++ combine.c    (working copy)
@@ -13861,7 +13861,7 @@
 static bool
 gate_handle_combine (void)
 {
-  return (optimize > 0);
+  return (0 && optimize > 0);
 }

 /* Try combining insns through substitution.  */

This ""patch"" fixes the segfault.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]