public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/65244] New: Bogus -Wmaybe-uninitialized warning with posix_memalign() and -Og
@ 2015-02-27 18:51 ulfalizer at gmail dot com
  2015-02-27 19:10 ` [Bug c/65244] " ulfalizer at gmail dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: ulfalizer at gmail dot com @ 2015-02-27 18:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65244
           Summary: Bogus -Wmaybe-uninitialized warning with
                    posix_memalign() and -Og
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ulfalizer at gmail dot com

The warning

  posix_memalign_warn.c: In function ‘f’:
  posix_memalign_warn.c:9:5: warning: ‘ptr’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
       return ptr;
       ^

is generated when compiling the following with

  gcc -Og -Wmaybe-uninitialized -c posix_memalign_warn.c

No warning is produced for -O0/1/2/3/fast.


#include <stdlib.h>

void *f(void) {
    void *ptr;

    if (posix_memalign(&ptr, 16, 256) != 0)
        exit(EXIT_FAILURE);

    return ptr;
}
>From gcc-bugs-return-478776-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Feb 27 17:20:42 2015
Return-Path: <gcc-bugs-return-478776-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 117520 invoked by alias); 27 Feb 2015 17:20:41 -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 117138 invoked by uid 48); 27 Feb 2015 17:20:38 -0000
From: "bergner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65242] [5 Regression] ICE (in gen_add2_insn, at optabs.c:4761) on powerpc64le-linux-gnu
Date: Fri, 27 Feb 2015 18:54:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bergner at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-65242-4-TJMy9neNla@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65242-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65242-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-02/txt/msg03108.txt.bz2
Content-length: 499

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-27
     Ever confirmed|0                           |1

--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
Confirmed, I'll have a look.


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

end of thread, other threads:[~2022-08-31 11:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 18:51 [Bug c/65244] New: Bogus -Wmaybe-uninitialized warning with posix_memalign() and -Og ulfalizer at gmail dot com
2015-02-27 19:10 ` [Bug c/65244] " ulfalizer at gmail dot com
2015-02-27 21:02 ` manu at gcc dot gnu.org
2015-02-27 21:24 ` ulfalizer at gmail dot com
2015-02-27 21:48 ` manu at gcc dot gnu.org
2015-02-27 22:02 ` ulfalizer at gmail dot com
2015-02-27 22:07 ` howarth at bromo dot med.uc.edu
2015-02-27 23:04 ` ulfalizer at gmail dot com
2015-02-27 23:21 ` pinskia at gcc dot gnu.org
2015-02-28  1:24 ` manu at gcc dot gnu.org
2021-03-31 19:05 ` [Bug middle-end/65244] " msebor at gcc dot gnu.org
2022-08-30  8:27 ` [Bug tree-optimization/65244] " rguenth at gcc dot gnu.org
2022-08-31  9:07 ` rguenth at gcc dot gnu.org
2022-08-31 11:04 ` cvs-commit at gcc dot gnu.org
2022-08-31 11:04 ` 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).