From: Iain Sandoe <idsandoe@googlemail.com>
To: Antoni Boucher <bouanto@zoho.com>
Cc: David Malcolm <dmalcolm@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
"jit@gcc.gnu.org" <jit@gcc.gnu.org>,
Rainer Orth <ro@cebitec.uni-bielefeld.de>
Subject: Re: [PATCH] libgccjit: Add ability to get the alignment of a type
Date: Sat, 29 Jun 2024 03:54:22 +0100 [thread overview]
Message-ID: <D5B6DE75-0CF3-453B-86A2-1408A7AF47E5@googlemail.com> (raw)
In-Reply-To: <CB69D79C-6EF2-4CFC-949D-B722E8C2BD9D@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 394 bytes --]
Hi Folks,
As noted, it seems to me that the fail here is false positives, but it still needs handling.
> On 29 Jun 2024, at 02:28, Iain Sandoe <idsandoe@googlemail.com> wrote:
>> On 28 Jun 2024, at 12:50, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
> … I am going to fix this with the obvious (provide a default init for the vars) - later today.
Fixed as attached,
Iain
[-- Attachment #2: 0001-jit-Fix-Darwin-bootstrap-after-r15-1699.patch --]
[-- Type: application/octet-stream, Size: 1690 bytes --]
From 45e74d5dfa4c5f372df0d3545bc342b6a2505e71 Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Sat, 29 Jun 2024 03:10:59 +0100
Subject: [PATCH] jit: Fix Darwin bootstrap after r15-1699.
r15-1699-g445c62ee492 contains changes that trigger two maybe-uninitialized
warnings on Darwin, which result in a bootstrap failure.
Note that the warnings are false positives, in fact the variables should be
initialized in the cases of a switch (all values of the switch condition are
covered).
Fixed here by providing default initializations for the relevant variables.
gcc/jit/ChangeLog:
* jit-recording.cc
(recording::memento_of_typeinfo::make_debug_string): Default the value
of ident.
(recording::memento_of_typeinfo::write_reproducer): Default the value
of type.
Signed-off-by: Iain Sandoe <iains@gcc.gnu.org>
---
gcc/jit/jit-recording.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
index f68d01fff55..43a6795f8f3 100644
--- a/gcc/jit/jit-recording.cc
+++ b/gcc/jit/jit-recording.cc
@@ -5516,7 +5516,7 @@ recording::memento_of_typeinfo::replay_into (replayer *r)
recording::string *
recording::memento_of_typeinfo::make_debug_string ()
{
- const char* ident;
+ const char* ident = "";
switch (m_info_type)
{
case TYPE_INFO_ALIGN_OF:
@@ -5538,7 +5538,7 @@ recording::memento_of_typeinfo::make_debug_string ()
void
recording::memento_of_typeinfo::write_reproducer (reproducer &r)
{
- const char* type;
+ const char* type = "";
switch (m_info_type)
{
case TYPE_INFO_ALIGN_OF:
--
2.39.2 (Apple Git-143)
prev parent reply other threads:[~2024-06-29 2:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 22:59 Antoni Boucher
2024-06-26 15:16 ` David Malcolm
2024-06-28 11:50 ` Rainer Orth
2024-06-29 1:28 ` Iain Sandoe
2024-06-29 2:54 ` Iain Sandoe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D5B6DE75-0CF3-453B-86A2-1408A7AF47E5@googlemail.com \
--to=idsandoe@googlemail.com \
--cc=bouanto@zoho.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jit@gcc.gnu.org \
--cc=ro@cebitec.uni-bielefeld.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).