From patchwork Thu Apr 19 17:56:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: -fdump-tree-original, bit_field_ref (was: Continue strict-volatile-bitfields fixes) From: Thomas Schwinge X-Patchwork-Id: 153846 Message-Id: <87y5prmwq7.fsf@schwinge.name> To: gcc-patches@gcc.gnu.org Date: Thu, 19 Apr 2012 19:56:32 +0200 Hi! On Thu, 19 Apr 2012 19:46:17 +0200, I wrote: > diff -ru fnsvb/20030922-1.c.003t.original fsvb/20030922-1.c.003t.original > --- fnsvb/20030922-1.c.003t.original 2012-04-19 16:51:18.322150866 +0200 > +++ fsvb/20030922-1.c.003t.original 2012-04-19 16:49:18.132088498 +0200 > @@ -7,7 +7,7 @@ > switch ((int) common->code) > { > case 0:; > - if (common->code != 0) > + if ((BIT_FIELD_REF <*common, 32, 0> & 255) != 0) > { > abort (); > } > > That is, for -fno-strict-volatile-bitfields the second instance of > »common->code« it is a component_ref, whereas for > -fstrict-volatile-bitfields it is a bit_field_ref. Looking at 20030922-1.c.001t.tu I see this: @2838 bit_field_ref type: @25 Where are the operands? Is the following patch correct/OK to check in? gcc/ * tree-dump.c (dequeue_and_dump) : Dump the three child nodes. Now I see: @2838 bit_field_ref type: @25 op 0: @2847 op 1: @2848 op 2: @20 Grüße, Thomas Index: tree-dump.c =================================================================== --- tree-dump.c (revision 186430) +++ tree-dump.c (working copy) @@ -596,6 +596,7 @@ dequeue_and_dump (dump_info_p di) break; case COMPONENT_REF: + case BIT_FIELD_REF: dump_child ("op 0", TREE_OPERAND (t, 0)); dump_child ("op 1", TREE_OPERAND (t, 1)); dump_child ("op 2", TREE_OPERAND (t, 2));