expr.c (expand_assignment): Disable the bitfield += optimizations.
* expr.c (expand_assignment): Disable the bitfield += optimizations. * gcc.c-torture/execute/20040629-1.c (FIELDS1, FIELDS2): Define to nothing if not yet defined. Use it in b, c and d type definitions. * gcc.c-torture/execute/20040705-1.c: New test. * gcc.c-torture/execute/20040705-2.c: New test. From-SVN: r84133
This commit is contained in:
parent
7b61653a60
commit
7682ef833a
@ -1,3 +1,7 @@
|
||||
2004-07-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* expr.c (expand_assignment): Disable the bitfield += optimizations.
|
||||
|
||||
2004-07-05 Joseph S. Myers <jsm@polyomino.org.uk>
|
||||
|
||||
* doc/sourcebuild.texi: Revert previous patch.
|
||||
|
@ -3802,7 +3802,9 @@ expand_assignment (tree to, tree from, int want_value)
|
||||
MEM_KEEP_ALIAS_SET_P (to_rtx) = 1;
|
||||
}
|
||||
|
||||
while (mode1 == VOIDmode && !want_value
|
||||
/* Disabled temporarily. GET_MODE (to_rtx) is often not the right
|
||||
mode. */
|
||||
while (0 && mode1 == VOIDmode && !want_value
|
||||
&& bitpos + bitsize <= BITS_PER_WORD
|
||||
&& bitsize < BITS_PER_WORD
|
||||
&& GET_MODE_BITSIZE (GET_MODE (to_rtx)) <= BITS_PER_WORD
|
||||
|
@ -1,3 +1,10 @@
|
||||
2004-07-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.c-torture/execute/20040629-1.c (FIELDS1, FIELDS2): Define to
|
||||
nothing if not yet defined. Use it in b, c and d type definitions.
|
||||
* gcc.c-torture/execute/20040705-1.c: New test.
|
||||
* gcc.c-torture/execute/20040705-2.c: New test.
|
||||
|
||||
2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
||||
|
||||
PR c++/2518
|
||||
|
@ -4,9 +4,16 @@
|
||||
extern void abort (void);
|
||||
extern void exit (int);
|
||||
|
||||
struct { unsigned int i : 6, j : 11, k : 15; } b;
|
||||
struct { unsigned int i : 5, j : 1, k : 26; } c;
|
||||
struct { unsigned int i : 16, j : 8, k : 8; } d;
|
||||
#ifndef FIELDS1
|
||||
#define FIELDS1
|
||||
#endif
|
||||
#ifndef FIELDS2
|
||||
#define FIELDS2
|
||||
#endif
|
||||
|
||||
struct { FIELDS1 unsigned int i : 6, j : 11, k : 15; FIELDS2 } b;
|
||||
struct { FIELDS1 unsigned int i : 5, j : 1, k : 26; FIELDS2 } c;
|
||||
struct { FIELDS1 unsigned int i : 16, j : 8, k : 8; FIELDS2 } d;
|
||||
|
||||
unsigned int ret1 (void) { return b.i; }
|
||||
unsigned int ret2 (void) { return b.j; }
|
||||
|
2
gcc/testsuite/gcc.c-torture/execute/20040705-1.c
Normal file
2
gcc/testsuite/gcc.c-torture/execute/20040705-1.c
Normal file
@ -0,0 +1,2 @@
|
||||
#define FIELDS1 long long l;
|
||||
#include "20040629-1.c"
|
2
gcc/testsuite/gcc.c-torture/execute/20040705-2.c
Normal file
2
gcc/testsuite/gcc.c-torture/execute/20040705-2.c
Normal file
@ -0,0 +1,2 @@
|
||||
#define FIELDS2 long long l;
|
||||
#include "20040629-1.c"
|
Loading…
Reference in New Issue
Block a user