public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12792] New: {u,}int64_t variables are incorrectly reported as used uninitialized
@ 2003-10-27 19:05 chris at pin dot lu
  2003-10-27 20:18 ` [Bug optimization/12792] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: chris at pin dot lu @ 2003-10-27 19:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: {u,}int64_t variables are incorrectly reported as used
                    uninitialized
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chris at pin dot lu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-netbsdelf
  GCC host triplet: m68k--netbsdelf
GCC target triplet: m68k--netbsdelf

long long int and long long unsigned int variables trigger the following 
warning even though the variables are initialized:
longlongint.c: In function `main':
longlongint.c:7: warning: `blkno' might be used uninitialized in this function

reduced test case:
---- cut here ----
# 1 "longlongint.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "longlongint.c"

int printf (const char * __restrict, ...);

int
main(int argc, char **argv)
{
  long long int blkno;
  long long int t5;

  t5 = 1;

  blkno = t5 * t5;

  printf("%lld\n", blkno);

  return 0;
}
---- cut here ----
compilation command:
> cc -O1 -Wall longlongint.c -c                                                
longlongint.c: In function `main':
longlongint.c:7: warning: `blkno' might be used uninitialized in this function

There's no warning at -O0, there's a warning at Os, O1 and above.


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

end of thread, other threads:[~2004-05-13 11:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27 19:05 [Bug optimization/12792] New: {u,}int64_t variables are incorrectly reported as used uninitialized chris at pin dot lu
2003-10-27 20:18 ` [Bug optimization/12792] " pinskia at gcc dot gnu dot org
2003-10-28 21:13 ` mycroft at netbsd dot org
2003-10-30  5:08 ` pinskia at gcc dot gnu dot org
2003-11-20  8:01 ` pinskia at gcc dot gnu dot org
2004-02-09  2:27 ` pinskia at gcc dot gnu dot org
2004-05-13 20:19 ` [Bug tree-optimization/12792] " 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).