public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/67196] New: Another false positive from -Wmaybe-uninitialized
@ 2015-08-12 19:03 dmalcolm at gcc dot gnu.org
  2015-08-12 20:26 ` [Bug tree-optimization/67196] " manu at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-08-12 19:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67196
           Summary: Another false positive from -Wmaybe-uninitialized
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 36176
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36176&action=edit
Reproducer

The attached generates a false -Wmaybe-uninitialized warning:

$ gcc -O1 -Wall -c diagnostic.cc
diagnostic.cc: In function ‘void test(int)’:
diagnostic.cc:28:28: warning: ‘first_caption_idx’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
     foo (first_caption_idx); /* get bogus warning here at -O1 and above */
                            ^
Seen with gcc 4.8.3 and with trunk (specifically, r226697).
>From gcc-bugs-return-494683-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 12 19:29:39 2015
Return-Path: <gcc-bugs-return-494683-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20872 invoked by alias); 12 Aug 2015 19:29:39 -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 20835 invoked by uid 48); 12 Aug 2015 19:29:33 -0000
From: "luto at mit dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug inline-asm/66631] inability to clobber segment regs makes tls problematic
Date: Wed, 12 Aug 2015 19:29:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: inline-asm
X-Bugzilla-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: luto at mit dot edu
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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: cc
Message-ID: <bug-66631-4-Zi9rrYC0BS@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66631-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66631-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-08/txt/msg00825.txt.bz2
Content-length: 1060

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

Andy Lutomirski <luto at mit dot edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luto at mit dot edu

--- Comment #17 from Andy Lutomirski <luto at mit dot edu> ---
I'll chime in, possibly uselessly.

Before Linux 4.1, only CS was saved.  (Unless you go *way* back.)  In  4.1 or
newer, SS is saved, too.

In 64-bit code, DS and ES have no effect*, so I don't think it should affect
code gen.

FS and GS are weird, and they may get weirder when WRGSBASE and friends are
enabled, which will happen at some point.

Anyway, I tend to agree with Andrew here, I think: if you want to fiddle with
FS and GS, write a little asm wrapper around the C code.

* Except in an odd case on AMD processors that is mostly invisible to
userspace.  On new enough kernels, it's completely invisible to userspace, and
I don't think it was ever visible without long jumps or such.


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

end of thread, other threads:[~2023-07-07  7:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 19:03 [Bug tree-optimization/67196] New: Another false positive from -Wmaybe-uninitialized dmalcolm at gcc dot gnu.org
2015-08-12 20:26 ` [Bug tree-optimization/67196] " manu at gcc dot gnu.org
2021-03-31 19:44 ` [Bug tree-optimization/67196] [9/10/11 Regression] loop-induced " msebor at gcc dot gnu.org
2021-04-08 14:24 ` rguenth at gcc dot gnu.org
2021-06-01  8:06 ` [Bug tree-optimization/67196] [9/10/11/12 " rguenth at gcc dot gnu.org
2022-01-21 13:53 ` rguenth at gcc dot gnu.org
2022-05-27  9:35 ` [Bug tree-optimization/67196] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:31 ` jakub at gcc dot gnu.org
2022-08-30  9:40 ` rguenth at gcc dot gnu.org
2022-08-30 11:15 ` cvs-commit at gcc dot gnu.org
2022-11-20  3:56 ` [Bug tree-optimization/67196] [10/11/12 " law at gcc dot gnu.org
2022-11-21  6:47 ` rguenth at gcc dot gnu.org
2023-07-07  7:28 ` [Bug tree-optimization/67196] [11/12 " 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).