This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -fdump-tree-original, bit_field_ref (was: Continue strict-volatile-bitfields fixes)
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Apr 2012 10:28:33 +0200
- Subject: Re: -fdump-tree-original, bit_field_ref (was: Continue strict-volatile-bitfields fixes)
- References: <4EBD4BCB.4080807@codesourcery.com> <4ED50901.8090300@codesourcery.com> <DC8FF7F4C84BE44B907369AEF21D9D446E5D368C@NA-MBX-04.mgc.mentorg.com> <4F1D72CA.1060908@codesourcery.com> <874nupb2v4.fsf@schwinge.name> <CAFiYyc08w4PGPEgOGAPH0Ag_BBds_1_wLv=R-DnO+j0b7nPycQ@mail.gmail.com> <4F4282AF.7000804@codesourcery.com> <4F428565.1050508@arm.com> <4F42881B.80800@codesourcery.com> <4F436677.9090203@arm.com> <87obqpnj9i.fsf@schwinge.name> <4F8EE84C.20501@arm.com> <4F8EE8E0.6020907@codesourcery.com> <871unjobrq.fsf@schwinge.name> <87y5prmwq7.fsf@schwinge.name>
On Thu, Apr 19, 2012 at 7:56 PM, Thomas Schwinge
<thomas@codesourcery.com> wrote:
> 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?
Ok.
Thanks,
Richard.
> 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