This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57791] New: Waste work in gfc_check_pointer_assign()
- From: "pchang9 at cs dot wisc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Jul 2013 20:32:19 +0000
- Subject: [Bug fortran/57791] New: Waste work in gfc_check_pointer_assign()
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57791
Bug ID: 57791
Summary: Waste work in gfc_check_pointer_assign()
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: pchang9 at cs dot wisc.edu
CC: nistor1 at illinois dot edu
Created attachment 30430
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30430&action=edit
Suggested patch
The problem appears in revision 200588 in version 4.9. I have attached a
one-line patch that fixes it.
In method "gfc_check_pointer_assign()" in expr.c, the loop on line 3763 should
break immediately after "warn" is set to "true". All the iterations after
"warn" set to "true" do not perform any useful work, at best they just set
"warn" again to "true".