public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/65686] New: incorrect warning maybe-uninitialized
@ 2015-04-07 12:25 dimhen at gmail dot com
  2015-04-14 11:14 ` [Bug middle-end/65686] [4.9 regression] inconsistent warning maybe-uninitialized: warn about 'unsigned', not warn about 'int' dimhen at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dimhen at gmail dot com @ 2015-04-07 12:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65686
           Summary: incorrect warning maybe-uninitialized
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dimhen at gmail dot com

gcc version 5.0.0 20150404 (experimental) [trunk revision 221866] (GCC)

$ cat x.i
typedef unsigned mytype; // 'int' fixes issue

struct S {
  mytype *pu;
};

mytype f(struct S *e)
{
  mytype x;
  if(&x != e->pu)
    __builtin_memcpy(&x, e->pu, sizeof(unsigned));
  return x;
}

$ gcc -fpreprocessed -Werror -Wall -O2 -c x.i
x.i: In function ‘f’:
x.i:9:10: error: ‘x’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   mytype x;
          ^
cc1: all warnings being treated as error
>From gcc-bugs-return-482861-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 07 12:29:45 2015
Return-Path: <gcc-bugs-return-482861-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 41625 invoked by alias); 7 Apr 2015 12:29:45 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 41573 invoked by uid 48); 7 Apr 2015 12:29:42 -0000
From: "rainer@emrich-ebersheim.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/65559] [5 Regression] lto1.exe: internal compiler error: in read_cgraph_and_symbols, at lto/lto.c:2947
Date: Tue, 07 Apr 2015 12:29:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rainer@emrich-ebersheim.de
X-Bugzilla-Status: WAITING
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65559-4-nxVtUmGg6i@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65559-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65559-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg00413.txt.bz2
Content-length: 469

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide559

--- Comment #10 from Rainer Emrich <rainer@emrich-ebersheim.de> ---
(In reply to Richard Biener from comment #8)
> Unfortunately -Wl,-debug is missing ;)
Ok, I uploaded a version including -Wl,-debug

>
> It would be interesting to see the lto-wrapper invocation (is there sth like
> strace on mingw?) and to eventually attach to lto-wrapper with a debugger...
I can't tell how to do this. Kai can you have a look?


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

end of thread, other threads:[~2024-05-16 12:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07 12:25 [Bug middle-end/65686] New: incorrect warning maybe-uninitialized dimhen at gmail dot com
2015-04-14 11:14 ` [Bug middle-end/65686] [4.9 regression] inconsistent warning maybe-uninitialized: warn about 'unsigned', not warn about 'int' dimhen at gmail dot com
2015-04-14 18:36 ` [Bug middle-end/65686] [5/6 " dimhen at gmail dot com
2015-04-15  7:46 ` rguenth at gcc dot gnu.org
2015-06-18 11:50 ` rguenth at gcc dot gnu.org
2015-06-18 12:09 ` dimhen at gmail dot com
2015-06-30 10:17 ` rguenth at gcc dot gnu.org
2015-07-16  9:11 ` rguenth at gcc dot gnu.org
2024-05-16 12:47 ` [Bug middle-end/65686] [5/6/7 " rguenth 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).