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

* [Bug fortran/14771] gfortran frontend doesn't record parentheses
  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 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
  2004-03-29 16:33 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-03-29 16:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de  2004-03-29 16:26 -------
(In reply to comment #0)
> 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.

"it" refers to gfortran, not Fortran. Sorry for being unclear.

-- 


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


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

* [Bug fortran/14771] gfortran frontend doesn't record parentheses
  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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-29 16:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-29 16:33 -------
Confirmed, I thought I saw a dup of this bug somewhere.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |pessimizes-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-29 16:33:50
               date|                            |
   Target Milestone|---                         |tree-ssa


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


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

* [Bug fortran/14771] [gfortran] frontend doesn't record parentheses
  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 ` 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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-04-12 17:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de  2004-04-12 17:29 -------
changed subject line to the canonical form

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gfortran frontend doesn't   |[gfortran] frontend doesn't
                   |record parentheses          |record parentheses


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


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

* [Bug fortran/14771] [gfortran] frontend doesn't record parentheses
  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
                   ` (2 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-04-21 16:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de  2004-04-21 15:58 -------
I have updated my patch, copyright assignment is in the works. No need for
anyone to work on this.

-- 


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


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

* [Bug fortran/14771] [gfortran] frontend doesn't record parentheses
  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
                   ` (3 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-05-01 15:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |Tobias dot Schlueter at
                   |dot org                     |physik dot uni-muenchen dot
                   |                            |de
             Status|NEW                         |ASSIGNED


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


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

* [Bug fortran/14771] [gfortran] frontend doesn't record parentheses
  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
                   ` (4 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 18:16 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

* [Bug fortran/14771] [gfortran] frontend doesn't record parentheses
  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
                   ` (5 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-31  5:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-30 04:44 -------
*** Bug 14741 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jv244 at cam dot ac dot uk


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


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

* [Bug fortran/14771] frontend doesn't record parentheses
  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
                   ` (6 preceding siblings ...)
  2004-05-31  5:40 ` pinskia at gcc dot gnu dot org
@ 2005-04-11  0:06 ` tobi at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-04-11  0:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-04-11 00:06 -------
Not recording parentheses does have correctness implications, see this thread:
http://gcc.gnu.org/ml/fortran/2005-04/msg00302.html

Upgrading the bug status accordingly.  Looks like I have to revive my patch
sometime soon.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|Tobias dot Schlueter at     |unassigned at gcc dot gnu
                   |physik dot uni-muenchen dot |dot org
                   |de                          |
           Severity|enhancement                 |normal
             Status|ASSIGNED                    |NEW
           Keywords|                            |accepts-invalid, wrong-code


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).