This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-fdump-tree-original, bit_field_ref (was: Continue strict-volatile-bitfields fixes)


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) <BIT_FIELD_REF>: Dump the three child
	nodes.

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));

Now I see:

    @2838   bit_field_ref    type: @25      op 0: @2847    op 1: @2848
                             op 2: @20


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]