This is the mail archive of the
mailing list for the GCC project.
[PATCH] Use ATTRIBUTE_PACKED in ree.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Nov 2012 21:42:16 +0100
- Subject: [PATCH] Use ATTRIBUTE_PACKED in ree.c
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
The PR55430 miscompilation of ree.c by LRA lead me to look at
this structure, which was really meant to be just 2 byte long, but
is unnecessarily 4 byte long. As it only contains 8, 2 and 1 bit bitfields,
it can always (except old alphas) be accessed by 1 byte loads/stores, so
packed attribute doesn't slow things down. Fixed thusly, bootstrapped/regtested on
x86_64-linux and i686-linux, ok for trunk?
2012-11-21 Jakub Jelinek <firstname.lastname@example.org>
* ree.c (struct ext_modified): Add ATTRIBUTE_PACKED.
--- gcc/ree.c.jj 2012-11-21 16:00:13.000000000 +0100
+++ gcc/ree.c 2012-11-21 18:43:27.025706082 +0100
@@ -475,7 +475,7 @@ enum ext_modified_kind
+struct ATTRIBUTE_PACKED ext_modified
/* Mode from which ree has zero or sign extended the destination. */
ENUM_BITFIELD(machine_mode) mode : 8;