This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, PR 57800] Waste work in gfc_match_call()
- From: pchang9 at cs dot wisc dot edu
- To: "Bernhard Reutner-Fischer" <rep dot dot dot nop at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 24 Jul 2013 20:01:12 -0500
- Subject: Re: [Patch, PR 57800] Waste work in gfc_match_call()
- References: <759459e99760aaae0ab1d9905fe57939 dot squirrel at webmail dot cs dot wisc dot edu> <140117378f5 dot 2760 dot 0f39ed3bcad52ef2c88c90062b7714dc at gmail dot com>
> On 23 July 2013 23:32:27 firstname.lastname@example.org wrote:
>> The problem appears in revision 201034 in version 4.9. I attached a
>> one-line patch that fixes it. I also reported this problem
>> at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57800
>> Bootstrap and regression-tested on x86_64-linux.
>> In method "gfc_match_call()" in gcc/fortran/match.c, the loop on line
>> 4189 should break immediately after "i" is set to 1.
>> 2013-07-22 Chang <email@example.com>
>> * match.c (gfc_match_call): Exit loop after setting i.
>> Index: gcc/fortran/match.c
>> --- gcc/fortran/match.c (revision 201034)
>> +++ gcc/fortran/match.c (working copy)
>> @@ -4188,7 +4188,10 @@
>> i = 0;
>> for (a = arglist; a; a = a->next)
> for (a = arglist; a || i; a = a->next)
> Sounds more reasonable to me.
> To repeat the previous question, curious how you get at these? scev one-liner?
We found these by analysis tool using LLVM, but not so-fancy as scev one-linear.
Of course, at very beginning we inspected the code manually.