public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/20061] New: Certain flags generate warnings when they should not.
@ 2005-02-18 21:45 wmahoney at unomaha dot edu
  2005-02-18 22:30 ` [Bug middle-end/20061] " pinskia at gcc dot gnu dot org
  2005-04-15 20:24 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 4+ messages in thread
From: wmahoney at unomaha dot edu @ 2005-02-18 21:45 UTC (permalink / raw)
  To: gcc-bugs

I am interested in looking at the GCC loop optimization. There are some tree 
dump flags that are registered (via register_dump_files() in tree-optimize.c). 
In particular, -fdump-tree-loopinit-raw and -fdump-tree-loopdone-raw that 
generate warnings when they should not. Specifically:

gcc -O3 -S -fdump-tree-loopinit-raw short.c

The problem is that there is also -fdump-tree-loop-raw as well, and "loop" is 
a prefix of "loopinit" and "loopdone". The function dump_switch_p_1() in tree-
dump.c calls skip_leading_substring() which works correctly for "loopinit" but 
then skips only the first four bytes when processing "loop". This 
leaves "init" dangling, and generates:

cc1: warning: ignoring unknown option 'init' in '-fdump-tree-loop'

Same for "done" of course.

No need to do -save-temps or look at any of the compiler output - this happens 
before any processing of the input file (a 4-line C program will suffice). 

Also, no urgency because the --first-- encounter where it does match the 
entire option works, so you do get the requested dumps, just the incorrect 
warning.

-- 
           Summary: Certain flags generate warnings when they should not.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wmahoney at unomaha dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug middle-end/20061] Certain flags generate warnings when they should not.
  2005-02-18 21:45 [Bug c/20061] New: Certain flags generate warnings when they should not wmahoney at unomaha dot edu
@ 2005-02-18 22:30 ` pinskia at gcc dot gnu dot org
  2005-04-15 20:24 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-18 22:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-18 18:38 -------
Confirmed. Note this flag only turns on the dumping for the tree based loop optimizators and not for 
the RTL based ones.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |minor
             Status|UNCONFIRMED                 |NEW
          Component|c                           |middle-end
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-18 18:38:09
               date|                            |


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


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

* [Bug middle-end/20061] Certain flags generate warnings when they should not.
  2005-02-18 21:45 [Bug c/20061] New: Certain flags generate warnings when they should not wmahoney at unomaha dot edu
  2005-02-18 22:30 ` [Bug middle-end/20061] " pinskia at gcc dot gnu dot org
@ 2005-04-15 20:24 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-15 20:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-15 20:23 -------
I just ran into this today, as -fdump-tree-all is broken for a different reason.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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


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

* [Bug middle-end/20061] Certain flags generate warnings when they should not.
       [not found] <bug-20061-4@http.gcc.gnu.org/bugzilla/>
@ 2021-09-28  8:30 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-28  8:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20061

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.0
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 4.2.0 by r0-79126 which requires an exact match now.

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

end of thread, other threads:[~2021-09-28  8:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18 21:45 [Bug c/20061] New: Certain flags generate warnings when they should not wmahoney at unomaha dot edu
2005-02-18 22:30 ` [Bug middle-end/20061] " pinskia at gcc dot gnu dot org
2005-04-15 20:24 ` pinskia at gcc dot gnu dot org
     [not found] <bug-20061-4@http.gcc.gnu.org/bugzilla/>
2021-09-28  8:30 ` pinskia at gcc dot gnu.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).