public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17518] New: [4.0 regression] Incorrect <var> is used uninitialized warning (-O1, -O2, -O3)
@ 2004-09-16 10:19 gerald at pfeifer dot com
  2004-09-16 10:22 ` [Bug tree-optimization/17518] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gerald at pfeifer dot com @ 2004-09-16 10:19 UTC (permalink / raw)
  To: gcc-bugs

% cat x.c
main(int, char **) {
  bool b;
  if( false )
    if( b ) /* this never shall be reached */
      return -1;
}

% gccvs x.c -W -O1
x.c: In function `int main(int, char**)':
x.c:4: warning: 'b' is used uninitialized in this function

-- 
           Summary: [4.0 regression] Incorrect <var> is used uninitialized
                    warning (-O1, -O2, -O3)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gerald at pfeifer dot com
                CC: gcc-bugs at gcc dot gnu dot org,steven at gcc dot gnu
                    dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

* [Bug tree-optimization/17518] [4.0 regression] Incorrect <var> is used uninitialized warning (-O1, -O2, -O3)
  2004-09-16 10:19 [Bug tree-optimization/17518] New: [4.0 regression] Incorrect <var> is used uninitialized warning (-O1, -O2, -O3) gerald at pfeifer dot com
@ 2004-09-16 10:22 ` pinskia at gcc dot gnu dot org
  2004-09-16 10:37 ` pinskia at gcc dot gnu dot org
  2004-10-12 13:10 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-16 10:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-16 10:22 -------
Hmm, I thought we ran cleanup_cfg before running warn_uninitialized.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |diagnostic
   Target Milestone|---                         |4.0.0


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


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

* [Bug tree-optimization/17518] [4.0 regression] Incorrect <var> is used uninitialized warning (-O1, -O2, -O3)
  2004-09-16 10:19 [Bug tree-optimization/17518] New: [4.0 regression] Incorrect <var> is used uninitialized warning (-O1, -O2, -O3) gerald at pfeifer dot com
  2004-09-16 10:22 ` [Bug tree-optimization/17518] " pinskia at gcc dot gnu dot org
@ 2004-09-16 10:37 ` pinskia at gcc dot gnu dot org
  2004-10-12 13:10 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-16 10:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-16 10:37 -------
Hmm, this is a very recent regression
: Search converges between 2004-09-12-trunk (#538) and 2004-09-14-trunk (#539).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-16 10:37:38
               date|                            |


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


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

* [Bug tree-optimization/17518] [4.0 regression] Incorrect <var> is used uninitialized warning (-O1, -O2, -O3)
  2004-09-16 10:19 [Bug tree-optimization/17518] New: [4.0 regression] Incorrect <var> is used uninitialized warning (-O1, -O2, -O3) gerald at pfeifer dot com
  2004-09-16 10:22 ` [Bug tree-optimization/17518] " pinskia at gcc dot gnu dot org
  2004-09-16 10:37 ` pinskia at gcc dot gnu dot org
@ 2004-10-12 13:10 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-12 13:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-12 13:10 -------
Fixed by:
        * fold-const.c (fold_build_cleanup_point_expr): New function.
        * tree.h (fold_build_cleanup_point_expr): Prototype.


cp/ChangeLog:
        * semantics.c (maybe_cleanup_point_expr): Call
        fold_build_cleanup_point_expr.
        (maybe_cleanup_point_expr_void): New function.
        (add_decl_expr): Call maybe_cleanup_point_expr_void.
        (finish_expr_stmt): Likewise.
        (finish_return_stmt): Likewise.
        (finish_for_expr): Likewise.
        (finish_asm_stmt): Likewise.
        * typeck.c (condition_conversion): Call
        fold_build_cleanup_point_expr.
        
testsuite/ChangeLog:


        * g++.dg/init/for3.C: New test.
        * g++.dg/opt/switch2.C: New test.
        * g++.dg/warn/Wreturn-2.C: New test.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-10-12 13:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-16 10:19 [Bug tree-optimization/17518] New: [4.0 regression] Incorrect <var> is used uninitialized warning (-O1, -O2, -O3) gerald at pfeifer dot com
2004-09-16 10:22 ` [Bug tree-optimization/17518] " pinskia at gcc dot gnu dot org
2004-09-16 10:37 ` pinskia at gcc dot gnu dot org
2004-10-12 13:10 ` pinskia 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).