This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix bitfield-- != 0 transformation in fold-const.c
Hi Roger,
> My apologies, I pulled the test case straight from the bugzilla PR
> without consideration for "small" targets. I think its safe to
> either just completely remove the ubyte field from the sdata struct,
> i.e. for all platforms, or to pad it to a short using "ubyte:8;".
> The PR concerns overflow in a single bit field and isn't affected
> by this later structure padding.
OK.
> Consider such a patch pre-approved for mainline. At the risk of
> over stepping my authority, I also think its extremely safe to also
> fix this testcase on the 3.4 and 3.3 branches. Mark? Gaby?
To backport my patch to 3.4 and 3.3, I opened a new PR 14544.
Kazu Hirata
2004-03-12 Kazu Hirata <kazu@cs.umass.edu>
PR other/14544
* gcc.c-torture/execute/20040307-1.c: Remove the 24-bit
bit-field.
Index: 20040307-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/20040307-1.c,v
retrieving revision 1.1
diff -u -r1.1 20040307-1.c
--- 20040307-1.c 7 Mar 2004 14:45:42 -0000 1.1
+++ 20040307-1.c 12 Mar 2004 04:22:59 -0000
@@ -11,7 +11,6 @@
unsigned int bit5:1;
unsigned int bit6:1;
unsigned int bit7:1;
- unsigned int ubyte:24;
} sdata = {0x01};
while ( sdata.bit0-- > 0 ) {