public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem)
@ 2003-11-12 17:26 dgay at intel-research dot net
  2003-11-12 17:27 ` [Bug c/13025] " dgay at intel-research dot net
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dgay at intel-research dot net @ 2003-11-12 17:26 UTC (permalink / raw)
  To: gcc-bugs

The attached file reports 
  foo.c: In function `main':
  foo.c:19: warning: `result1' might be used uninitialized in this function
when compiled with avr-gcc -Os -Wall -c foo.c

gcc was built with
./configure --host=i686-pc-linux-gnu --enable-languages=c --target=avr --disable-nls

The same problem shows up in gcc-ss-3_3-20031110


foo.c:
char a;
 
static inline char rcombine(char r1, char r2)
{
  return r1 ? 0 : r2;
}
 
static inline char Mod1_xx(void)
{
  int i;
 
  for (i = 0; i < 6; i++) a += i;
 
  return 1;
}
 
static inline char Mod1_StdControl_init(void)
{
  char result1;
  char result2;
 
  result1 = rcombine(2, 1);
  result2 = Mod1_xx();
  result1 = rcombine(result1, result2);
  return result1;
}
 
int   main(void)
{
  Mod1_StdControl_init();
  return 0;
}

-- 
           Summary: incorrect "might be used uninitialized in this function"
                    warning (no, not the usual problem)
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dgay at intel-research dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr


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


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

* [Bug c/13025] incorrect "might be used uninitialized in this function" warning (no, not the usual problem)
  2003-11-12 17:26 [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) dgay at intel-research dot net
@ 2003-11-12 17:27 ` dgay at intel-research dot net
  2003-11-12 17:44 ` mnewman at dragonnorth dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dgay at intel-research dot net @ 2003-11-12 17:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dgay at intel-research dot net  2003-11-12 17:27 -------
Created an attachment (id=5123)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5123&action=view)
Test case that reproduces bug


-- 


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


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

* [Bug c/13025] incorrect "might be used uninitialized in this function" warning (no, not the usual problem)
  2003-11-12 17:26 [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) dgay at intel-research dot net
  2003-11-12 17:27 ` [Bug c/13025] " dgay at intel-research dot net
@ 2003-11-12 17:44 ` mnewman at dragonnorth dot com
  2003-11-12 18:06 ` [Bug optimization/13025] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mnewman at dragonnorth dot com @ 2003-11-12 17:44 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mnewman at dragonnorth dot
                   |                            |com


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


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

* [Bug optimization/13025] incorrect "might be used uninitialized in this function" warning (no, not the usual problem)
  2003-11-12 17:26 [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) dgay at intel-research dot net
  2003-11-12 17:27 ` [Bug c/13025] " dgay at intel-research dot net
  2003-11-12 17:44 ` mnewman at dragonnorth dot com
@ 2003-11-12 18:06 ` pinskia at gcc dot gnu dot org
  2003-11-20  7:33 ` sami dot kantoluoto at embedtronics dot fi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-12 18:06 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |optimization
           Keywords|                            |diagnostic


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


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

* [Bug optimization/13025] incorrect "might be used uninitialized in this function" warning (no, not the usual problem)
  2003-11-12 17:26 [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) dgay at intel-research dot net
                   ` (2 preceding siblings ...)
  2003-11-12 18:06 ` [Bug optimization/13025] " pinskia at gcc dot gnu dot org
@ 2003-11-20  7:33 ` sami dot kantoluoto at embedtronics dot fi
  2003-11-25 17:13 ` eric at ecentral dot com
  2003-12-19 14:43 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: sami dot kantoluoto at embedtronics dot fi @ 2003-11-20  7:33 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sami dot kantoluoto at
                   |                            |embedtronics dot fi


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


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

* [Bug optimization/13025] incorrect "might be used uninitialized in this function" warning (no, not the usual problem)
  2003-11-12 17:26 [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) dgay at intel-research dot net
                   ` (3 preceding siblings ...)
  2003-11-20  7:33 ` sami dot kantoluoto at embedtronics dot fi
@ 2003-11-25 17:13 ` eric at ecentral dot com
  2003-12-19 14:43 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: eric at ecentral dot com @ 2003-11-25 17:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric at ecentral dot com


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


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

* [Bug optimization/13025] incorrect "might be used uninitialized in this function" warning (no, not the usual problem)
  2003-11-12 17:26 [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) dgay at intel-research dot net
                   ` (4 preceding siblings ...)
  2003-11-25 17:13 ` eric at ecentral dot com
@ 2003-12-19 14:43 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-19 14:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-19 14:33 -------
Fixed on the mainline (20031219)..

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.4.0


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


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

end of thread, other threads:[~2003-12-19 14:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-12 17:26 [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) dgay at intel-research dot net
2003-11-12 17:27 ` [Bug c/13025] " dgay at intel-research dot net
2003-11-12 17:44 ` mnewman at dragonnorth dot com
2003-11-12 18:06 ` [Bug optimization/13025] " pinskia at gcc dot gnu dot org
2003-11-20  7:33 ` sami dot kantoluoto at embedtronics dot fi
2003-11-25 17:13 ` eric at ecentral dot com
2003-12-19 14:43 ` 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).