public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/14771] New: gfortran frontend doesn't record parentheses
@ 2004-03-29 16:25 Tobias dot Schlueter at physik dot uni-muenchen dot de
  2004-03-29 16:26 ` [Bug fortran/14771] " Tobias dot Schlueter at physik dot uni-muenchen dot de
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-03-29 16:25 UTC (permalink / raw)
  To: gcc-bugs

gfortran parses
 c = a + b + c
as 
 (assign c (+ (+ a b) c))
which is the same parse tree as for
 c = (a + b) + c

Fortran allows a greater range of optimizations in the former case, but since it
is unable to distinguish between those two cases, the former case may be
unnecessarily pessimized by optimizers.

I have a patch to the parser and parse-tree dumper which makes gfortran record
the parentheses. It is covered by my copyright assignment to g95 as I prepared
the patch in Oct 2002. Since I have no copyright assignment for gcc I'm not sure
if I can update it for the current sources (mostly formatting and function name
changes) without running into copyright trouble. Therefore I point you to my old
patch, which I reposted to the gfortran list:
http://gcc.gnu.org/ml/fortran/2004-03/msg00048.html with the matchexp.c part
replaced by the patch from http://gcc.gnu.org/ml/fortran/2004-03/msg00046.html

The original postings on g95-develop@lists.sourceforge.net can be found in the
thread following this posting:
http://www.geocrawler.com/archives/3/3588/2002/10/50/9910846/

-- 
           Summary: gfortran frontend doesn't record parentheses
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Tobias dot Schlueter at physik dot uni-muenchen dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: all
  GCC host triplet: all
GCC target triplet: all


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14771


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-04-11  0:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-29 16:25 [Bug fortran/14771] New: gfortran frontend doesn't record parentheses Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-03-29 16:26 ` [Bug fortran/14771] " Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-03-29 16:33 ` pinskia at gcc dot gnu dot org
2004-04-12 17:50 ` [Bug fortran/14771] [gfortran] " Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-04-21 16:33 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-01 15:20 ` bdavis at gcc dot gnu dot org
2004-05-24 18:16 ` pinskia at gcc dot gnu dot org
2004-05-31  5:40 ` pinskia at gcc dot gnu dot org
2005-04-11  0:06 ` [Bug fortran/14771] " tobi at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).