[PATCH] Minor work-around for native HPPA compiler bug

Roger Sayle roger@eyesopen.com
Wed Dec 31 07:41:00 GMT 2003


Mainline currently fails to build on PA HPUX using the native host
compiler due to a problem/bug in HP's compilers.  The problem is
that the idiom "*ptr |= ! valid", where ptr is a _Bool* and valid
is a _Bool, triggers an internal backend abort, i.e. an ICE, about
an "unimplemented CVT".

The following minor change to cppfiles.c avoids this problematic
idiom, and allows me to bootstrap hppa64-hp-hpux11.22 with /usr/bin/cc.

Ok for mainline?


2003-12-30  Roger Sayle  <roger@eyesopen.com>

	* cppfiles.c (pch_open_file): Minor tweak to work-around native
	HPPA compiler bug.


Index: cppfiles.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cppfiles.c,v
retrieving revision 1.197
diff -c -3 -p -r1.197 cppfiles.c
*** cppfiles.c	21 Dec 2003 14:08:32 -0000	1.197
--- cppfiles.c	30 Dec 2003 19:23:44 -0000
*************** pch_open_file (cpp_reader *pfile, _cpp_f
*** 291,298 ****
  	    }
  	  closedir (pchdir);
  	}
!       file->pch |= valid;
!       *invalid_pch |= ! valid;
      }

    if (valid)
--- 291,300 ----
  	    }
  	  closedir (pchdir);
  	}
!       if (valid)
! 	file->pch = true;
!       else
! 	*invalid_pch = true;
      }

    if (valid)


Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833



More information about the Gcc-patches mailing list