Do not use TYPE_CANONICAL in useless_type_conversion

Richard Biener rguenther@suse.de
Thu Oct 8 10:51:00 GMT 2015


On Thu, 8 Oct 2015, Jan Hubicka wrote:

> > 
> > && TREE_CODE (outer_type) == OFFSET_TYPE
> > 
> > Ok with those changes.
> 
> Thank you! I commited the patch.
> At a hike today it appeared to me that for ipa-icf and other calling convetions
> checks we should not rely on useless_type_conversion_p because there may be
> types that are compatible in gimple type system but have different calling
> conventions.  I will hack calling convention comparer tomorrow - should not be
> too hard, just doing the cumulative walk and comparing that the RTL containers
> are the same.

I think the patch caused a bootstrap failure on x86_64-linux with Ada.
We're having an aggregate copy SImode = BLKmode and end up with
BLKmode from int_mode_for_mode (BLKmode) which later ICEs (obviously)
in gen_lowpart.

obj/gcc/ada/rts> /abuild/rguenther/obj/./gcc/xgcc 
-B/abuild/rguenther/obj/./gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/ 
-B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem 
/usr/local/x86_64-pc-linux-gnu/include -isystem 
/usr/local/x86_64-pc-linux-gnu/sys-include    -c -g -O2  -fpic  -W -Wall 
-gnatpg -nostdinc   s-regpat.adb -o s-regpat.o 
+===========================GNAT BUG 
DETECTED==============================+
| 6.0.0 20151008 (experimental) (x86_64-pc-linux-gnu) GCC error:           
|
| in gen_lowpart_common, at emit-rtl.c:1399                                
|
| Error detected around s-regpat.adb:1029:22                               
|
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            
|
| Use a subject line meaningful to you and us to track the bug.            
|
| Include the entire contents of this bug box in the report.               
|
| Include the exact command that you entered.                              
|
| Also include sources listed below.                                       
|
+==========================================================================+

Richard.

> Honza
> > 
> > Thanks,
> > Richard.
> > 
> > > +    return useless_type_conversion_p (TREE_TYPE (outer_type),
> > > +				      TREE_TYPE (inner_type))
> > > +	   && useless_type_conversion_p
> > > +	        (TYPE_OFFSET_BASETYPE (outer_type),
> > > +		 TYPE_OFFSET_BASETYPE (inner_type));
> > >  
> > >    return false;
> > >  }
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)



More information about the Gcc-patches mailing list