This is the mail archive of the gcc-patches@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]

[PATCH] Workaround more _Bool problems on HP-UX (take 2)


On Fri, 23 Jan 2004, John David Anglin wrote:
> > The following patch has been tested on hppa64-hp-hpux11.00 with a full
> > bootstrap, all languages except Ada and treelang, hosted with the
> > native hpux compiler using CC="/usr/bin/cc +DD64".  The compilers
> > now build fine, but I then run into an unrelated(?) failure building
> > libstdc++-v3; an ICE in rtl_verify_flow_info, at cfgrtl.c:2129.
>
> Didn't happen for me starting with GCC:
> http://gcc.gnu.org/ml/gcc-testresults/2004-01/msg00997.html

Arghhh!  It turns out that there must be a latent bug in the handling
of bitfields on hppa64.  The following patch works around the _Bool
problems by removing the problematic idiom from GCC's source code.

This is not the cleanest solution, Zack has complained about such
work-arounds before, but it enables the compiler to bootstrap while
I investigate why changing "bool foo : 1" to "unsigned int foo : 1"
(or "CHAR_BITFIELD foo : 1") could possibly cause the compiler to ICE.

Ok for mainline?


2004-01-23  Roger Sayle  <roger@eyesopen.com>

	* cppfiles.c (pchf_adder): Work around a _Bool bug in one of HP's
	compilers for HPUX.


Index: cppfiles.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cppfiles.c,v
retrieving revision 1.200
diff -c -3 -p -r1.200 cppfiles.c
*** cppfiles.c	20 Jan 2004 07:35:21 -0000	1.200
--- cppfiles.c	23 Jan 2004 21:25:59 -0000
*************** pchf_adder (void **slot, void *data)
*** 1324,1330 ****
  	return 1;

        d->entries[count].once_only = f->once_only;
!       d->have_once_only |= f->once_only;
        if (f->buffer_valid)
  	  md5_buffer ((const char *)f->buffer,
  		      f->st.st_size, d->entries[count].sum);
--- 1324,1331 ----
  	return 1;

        d->entries[count].once_only = f->once_only;
!       if (f->once_only)
! 	d->have_once_only = true;
        if (f->buffer_valid)
  	  md5_buffer ((const char *)f->buffer,
  		      f->st.st_size, d->entries[count].sum);

Roger
--


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