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]

Re: wide-int branch now up for public comment and review


On Sep 5, 2013, at 2:00 PM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
> Ping.  I should have said that bootstrapping with rtl checking enabled
> is broken as things stand.

Yes, this is fine.

> Richard Sandiford <rdsandiford@googlemail.com> writes:
>> Mike Stump <mikestump@comcast.net> writes:
>>> @@ -643,12 +653,14 @@ equality.  */
>>> 			       __FUNCTION__);				\
>>>      &_rtx->u.hwint[_n]; }))
>>> 
>>> -#define XHWIVEC_ELT(HWIVEC, I) __extension__				\
>>> -(*({ __typeof (HWIVEC) const _hwivec = (HWIVEC); const int _i = (I);	\
>>> -     if (_i < 0 || _i >= HWI_GET_NUM_ELEM (_hwivec))			\
>>> -       hwivec_check_failed_bounds (_hwivec, _i, __FILE__, __LINE__,	\
>>> -				  __FUNCTION__);			\
>>> -     &_hwivec->elem[_i]; }))
>>> +#define CWI_ELT(RTX, I) __extension__					\
>>> +(*({ __typeof (RTX) const _rtx = (RTX);					\
>>> +     int _max = CWI_GET_NUM_ELEM (_rtx);				\
>> 
>> CWI_GET_NUM_ELEM also uses "_rtx" for its temporary variable, so the
>> last line includes the equivalent of:
>> 
>>  __typeof (_rtx) _rtx = _rtx;
>> 
>> Is the fix below OK?  We do a similar thing for block symbols, etc.
>> 
>> Thanks,
>> Richard
>> 
>> 
>> Index: gcc/rtl.h
>> ===================================================================
>> --- gcc/rtl.h	2013-09-01 14:00:21.032885857 +0100
>> +++ gcc/rtl.h	2013-09-01 17:41:49.474023618 +0100
>> @@ -654,13 +654,13 @@ #define XWINT(RTX, N) __extension__
>>      &_rtx->u.hwint[_n]; }))
>> 
>> #define CWI_ELT(RTX, I) __extension__					\
>> -(*({ __typeof (RTX) const _rtx = (RTX);					\
>> -     int _max = CWI_GET_NUM_ELEM (_rtx);				\
>> +(*({ __typeof (RTX) const _cwi = (RTX);					\
>> +     int _max = CWI_GET_NUM_ELEM (_cwi);				\
>>      const int _i = (I);						\
>>      if (_i < 0 || _i >= _max)						\
>> -       cwi_check_failed_bounds (_rtx, _i, __FILE__, __LINE__,	\
>> +       cwi_check_failed_bounds (_cwi, _i, __FILE__, __LINE__,		\
>> 				__FUNCTION__);				\
>> -     &_rtx->u.hwiv.elem[_i]; }))
>> +     &_cwi->u.hwiv.elem[_i]; }))
>> 
>> #define XCWINT(RTX, N, C) __extension__					\
>> (*({ __typeof (RTX) const _rtx = (RTX);					\


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