This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: wide-int branch now up for public comment and review
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Richard Biener <rguenther at suse dot de>, Kenneth Zadeck <zadeck at naturalbridge dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 05 Sep 2013 22:00:33 +0100
- Subject: Re: wide-int branch now up for public comment and review
- Authentication-results: sourceware.org; auth=none
- References: <520A9DCC dot 6080609 at naturalbridge dot com> <87ppt4e9hg dot fsf at talisman dot default> <alpine dot LNX dot 2 dot 00 dot 1308281040230 dot 20077 at zhemvz dot fhfr dot qr> <878uzmp2lg dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <alpine dot LNX dot 2 dot 00 dot 1308281200380 dot 20077 at zhemvz dot fhfr dot qr> <CD041122-850F-44C5-AC31-3BA9FDB079FC at comcast dot net> <alpine dot LNX dot 2 dot 00 dot 1308290934190 dot 20077 at zhemvz dot fhfr dot qr> <7A01F437-449D-4F23-B002-7132AA6350CD at comcast dot net> <87sixobaym dot fsf at talisman dot default>
Ping. I should have said that bootstrapping with rtl checking enabled
is broken as things stand.
Thanks,
Richard
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); \