[LV] New GCC 4.1.2 packages available, fixing a critical bug

Maciej W. Rozycki macro at linux-mips.org
Tue Oct 20 17:50:46 CEST 2009


Hello folks,

 I have uploaded a new source and a new binary GCC package to:

ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/SRPMS/

and

ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/RPMS/

respectively.  The packages to download are:

vax-linux-boot-gcc-4.1.2-20.src.rpm
i386/vax-linux-boot-gcc-4.1.2-20.i386.rpm

 The packages fix a critical bug in the compiler where the combiner would 
incorrectly attempt to simplify a masking operation applied to a result of 
a floating-point operation, resulting in an internal compiler error.  An 
example code triggering this looks like:

float foo = 1.0;

short frob(void)
{
	union {
		float f;
		short i[2];
	} bar = {
		.f = 2.0,
	};

	bar.f -= foo;
	return bar.i[0];
}

or in RTL-speak:

(and:SI (subreg:SI (minus:SF (reg:SF 61)
			     (mem/s/u:SF (reg/f:SI 60) [2 foo S4 A32])) 0)
	(const_int 65535 [0xffff]))

and the combiner would have thought the operation could be optimised by 
performing the floating-point addition on the lowest order 16 bits of the 
operands only, which is obviously not true.  I've seen it happen with the 
-fPIC option only.

 This bug has only been recently been fixed in upstream GCC 4.5, so anyone 
using either an older version of my package or an outdated version of GCC 
4.5 HEAD, please upgrade.

  Maciej
_______________________________________________
Linux-Vax mailing list
Linux-Vax at mail.pergamentum.com
http://mail.pergamentum.com/mailman/listinfo/linux-vax




More information about the Vax-linux mailing list