From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12182 invoked by alias); 27 Oct 2003 18:51:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12170 invoked by uid 48); 27 Oct 2003 18:51:50 -0000 Date: Mon, 27 Oct 2003 19:05:00 -0000 From: "chris at pin dot lu" To: gcc-bugs@gcc.gnu.org Message-ID: <20031027185145.12792.chris@pin.lu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/12792] New: {u,}int64_t variables are incorrectly reported as used uninitialized X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg02415.txt.bz2 List-Id: 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 "" # 1 "" # 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.