This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug fix for c-torture test execute/bf-sign-2.c
- To: law at cygnus dot com
- Subject: Re: bug fix for c-torture test execute/bf-sign-2.c
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Wed, 22 Oct 1997 16:07:50 +0100 (BST)
- Cc: amylaar at cygnus dot co dot uk, tege at matematik dot su dot se, egcs at cygnus dot com
> In message <199710221354.OAA31493@phal.cygnus.co.uk>you write:
> > execute/bf-sign-2.c currently fails for targets with 16 bit ints.
> > Here is a fix:
> >
> > Wed Oct 22 14:08:50 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
> >
> > * execute/bf-sign-2.c (struct X): New member u15.
> > (main): Check u15. Check for u31 depends on size of int.
> I don't remember this failing for the mn10200, which is a 16bit int
> target. Maybe you should describe why it's failing on yours so that
> we can understand your patch.
The 31 bit unsigned bitfield is promoted to unsigned long int, not
signed long int. Hence the check fails. I found this for the d10v
port (which also supports 64 bit long long), and then checked the h8300:
it does the promotion the same way (but it doesn't show for a torture
test because the h8300 has only 32 bit long long, hence the test is skipped).