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

Re: bug fix for c-torture test execute/bf-sign-2.c


>   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).


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