This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [4.5/4.6 Regression] ICE: segmentation fault in mio_expr


duuuh!

On Tue, Apr 20, 2010 at 4:39 PM, Tobias Burnus <burnus@net-b.de> wrote:
> On 04/20/2010 04:26 PM, Paul Richard Thomas wrote:
>>> You can remove the first assignment to "cl" here, because in the next
>>> line it is assigned again! And why do you introduce this "cl" at all?
>>>
>> To make the code neater - I figured two pointer assignments would not
>> hurt the execution time too much but it looks much kinder on the eye.
>>
>
> Introducing a pointer is OK, however:
>
> ! ? ? ? ? ? ? ? ? gfc_charlen *cl = c->ts.u.cl;
> ! ? ? ? ? ? ? ? ? cl = gfc_new_charlen (sym->ns, ifc->ts.u.cl);
>
>
> In the first line you do the assignment "cl = c->ts.u.cl" - and in the
> second line you "override" the assignment by doing: "cl =
> gfc_new_charlen(...)". Note: The RHS does not use "cl".
>
> Thus, the assignment in the first line is pointless and can thus be
> removed. (Which is what Janus pointed out).
>
> Tobias
>



-- 
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]