rtl-optimization: Fix uninitialized use of opaque mode variable ICE [PR98872]

Peter Bergner bergner@linux.ibm.com
Fri Feb 12 23:30:05 GMT 2021


On 2/12/21 4:21 PM, Peter Bergner wrote:
> rtl-optimization: Fix uninitialized use of opaque mode variable ICE [PR98872]
> 
> The initialize_uninitialized_regs function emits (set (reg:) (CONST0_RTX))
> for all uninitialized pseudo uses.  However, some modes (eg, opaque modes)
> may not have a CONST0_RTX defined, leading to an ICE when we try and create
> the initialization insn.  The fix is to skip emitting the initialization
> if there is no CONST0_RTX defined for the mode.
> 
> This following patch fixes the ICE and is currently regtesting.
> Ok for trunk if the bootstrap and regtesting come back clean?
> 
> Peter
> 
> 
> 2021-02-12  Peter Bergner  <bergner@linux.ibm.com>
> 
> gcc/
> 	PR rtl-optimization/98872
> 	* init-regs.c (initialize_uninitialized_regs): Skip initialization
> 	if CONST0_RTX is NULL.
> 
> gcc/testsuite/
> 	PR rtl-optimization/98872
> 	* gcc.target/powerpc/pr98872.c: New test.

Testing came back clean with no regressions.

Peter



More information about the Gcc-patches mailing list