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: [Patch, fortran] [1/5] PR 45648: Inline transpose part 2: Support transposed descriptor whilst getting array bounds


On Tue, Sep 21, 2010 at 4:46 PM, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> Dominique,
>
> The loop takes dim from 0 to ndim-1. ?Therefore the condition of the
> gcc_assert is always going to be satisfied.

But if the loop terminates via its exit condition !(dim<ndim) then
obviously dim will be not < ndim ;)

RIchard.

> Cheers
>
> Paul
>
> On 9/21/10, Daniel Kraft <d@domob.eu> wrote:
>> Paul Richard Thomas wrote:
>>> Mikael,
>>>
>>> This is OK except that I do not understand what the gcc_assert is doing
>>> in:
>>> +
>>> + ? ? ?/* look for the corresponding scalarizer dimension: dim. ?*/
>>> + ? ? ?for (dim = 0; dim < ndim; dim++)
>>> + ? ? ? ?if (info->dim[dim] == n)
>>> + ? ? ? ? ?break;
>>> + ? ? ?gcc_assert (dim < ndim);
>>>
>>> Have I missed something?
>>
>> This seems like checking the loop is exited early in any case. ?(But
>> I've no idea about the rest of the patch.)
>>
>> Daniel
>>
>> --
>> http://www.pro-vegan.info/
>> --
>> Done: ?Arc-Bar-Cav-Kni-Ran-Rog-Sam-Tou-Val-Wiz
>> To go: Hea-Mon-Pri
>>
>
>
> --
> The knack of flying is learning how to throw yourself at the ground and miss.
> ? ? ? --Hitchhikers Guide to the Galaxy
>


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