Commit 7682ef83 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 7b61653a
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> 2004-07-05 Joseph S. Myers <jsm@polyomino.org.uk>
* doc/sourcebuild.texi: Revert previous patch. * doc/sourcebuild.texi: Revert previous patch.
......
...@@ -3802,7 +3802,9 @@ expand_assignment (tree to, tree from, int want_value) ...@@ -3802,7 +3802,9 @@ expand_assignment (tree to, tree from, int want_value)
MEM_KEEP_ALIAS_SET_P (to_rtx) = 1; 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 && bitpos + bitsize <= BITS_PER_WORD
&& bitsize < BITS_PER_WORD && bitsize < BITS_PER_WORD
&& GET_MODE_BITSIZE (GET_MODE (to_rtx)) <= BITS_PER_WORD && GET_MODE_BITSIZE (GET_MODE (to_rtx)) <= BITS_PER_WORD
......
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> 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2518 PR c++/2518
......
...@@ -4,9 +4,16 @@ ...@@ -4,9 +4,16 @@
extern void abort (void); extern void abort (void);
extern void exit (int); extern void exit (int);
struct { unsigned int i : 6, j : 11, k : 15; } b; #ifndef FIELDS1
struct { unsigned int i : 5, j : 1, k : 26; } c; #define FIELDS1
struct { unsigned int i : 16, j : 8, k : 8; } d; #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 ret1 (void) { return b.i; }
unsigned int ret2 (void) { return b.j; } unsigned int ret2 (void) { return b.j; }
......
#define FIELDS1 long long l;
#include "20040629-1.c"
#define FIELDS2 long long l;
#include "20040629-1.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment